1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[954],{18539:function(e,t,i){i.d(t,{A:function(){return v}});var a=i(20641),s=i(90033);const l={class:"o-wa-image"},o={key:0,class:"o-wa-image__preview"},n=["src"],r=["src"],d=["aria-label"],c={class:"o-wa-image__drop"},u={class:"o-wa-image__drop-text"},h={class:"o-wa-image__drop-hint"};function p(e,t,i,p,b,m){const g=(0,a.g2)("font-awesome-icon"),k=(0,a.g2)("b-upload");return(0,a.uX)(),(0,a.CE)("div",l,[m.previewUrl?((0,a.uX)(),(0,a.CE)("div",o,[m.isVideo?((0,a.uX)(),(0,a.CE)("video",{key:0,src:m.previewUrl,class:"o-wa-image__img",muted:"",loop:"",playsinline:"",controls:""},null,8,n)):((0,a.uX)(),(0,a.CE)("img",{key:1,src:m.previewUrl,alt:"",class:"o-wa-image__img"},null,8,r)),(0,a.Lk)("button",{class:"o-wa-image__remove","aria-label":e.$t("Remove"),onClick:t[0]||(t[0]=(...e)=>m.clear&&m.clear(...e))},[(0,a.bF)(g,{icon:["fal","xmark"]})],8,d)])):((0,a.uX)(),(0,a.Wv)(k,{key:1,loading:b.isUploading,accept:m.accept,"drag-drop":"",expanded:"","onUpdate:modelValue":m.upload},{default:(0,a.k6)(()=>[(0,a.Lk)("section",c,[(0,a.bF)(g,{icon:["fal",m.isVideo?"circle-play":"image"],class:"o-wa-image__drop-icon"},null,8,["icon"]),(0,a.Lk)("p",u,(0,s.v_)(m.isVideo?e.$t("Drop a video or click to upload"):e.$t("Drop an image or click to upload")),1),(0,a.Lk)("p",h,(0,s.v_)(m.isVideo?e.$t("MP4 or WebM, up to 25 MB"):e.$t("JPEG, PNG, GIF, WebP or AVIF")),1)])]),_:1},8,["loading","accept","onUpdate:modelValue"]))])}i(14603),i(47566),i(98721);var b=i(28782);const m=26214400,g=1600;var k={name:"WebsiteImagePicker",props:{kind:{type:String,default:"image"},modelValue:{type:String,default:null}},emits:["update:modelValue"],data(){return{isUploading:!1}},computed:{isVideo(){return"video"===this.kind},accept(){return this.isVideo?"video/mp4,video/webm":"image/jpeg,image/png,image/gif,image/webp,image/avif"},previewUrl(){return this.modelValue?`${b.hd}${b.DJ}website/${this.modelValue}`:null}},methods:{shrink(e){return new Promise(t=>{if(!e.type.startsWith("image/")||"image/gif"===e.type)return void t(e);const i=new Image;i.onload=()=>{URL.revokeObjectURL(i.src);const a=Math.max(i.width,i.height);if(a<=g)return void t(e);const s=g/a,l=document.createElement("canvas");l.width=Math.round(i.width*s),l.height=Math.round(i.height*s),l.getContext("2d").drawImage(i,0,0,l.width,l.height),l.toBlob(i=>t(i?new File([i],e.name,{type:"image/jpeg"}):e),"image/jpeg",.9)},i.onerror=()=>{URL.revokeObjectURL(i.src),t(e)},i.src=URL.createObjectURL(e)})},upload(e){if(!e)return;if(this.isVideo&&e.size>m)return void this.$buefy.snackbar.open({message:this.$t("That video is larger than 25 MB. Trim it or compress it first."),type:"is-danger"});this.isUploading=!0;const t=this.isVideo?Promise.resolve(e):this.shrink(e);t.then(e=>{const t=new FormData;return t.append("files",e),this.$http.plain.post("/s3-sign-builder-image-upload/website",t,{headers:{"Content-Type":"multipart/form-data"}})}).then(e=>{const t=e.data?.data?.[0];t?.fileName?this.$emit("update:modelValue",t.fileName):this.$buefy.snackbar.open({message:this.$t("Upload failed. Please try again."),type:"is-danger"})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Upload failed. Please try again."),type:"is-danger"})}).finally(()=>{this.isUploading=!1})},clear(){this.$emit("update:modelValue",null)}}},y=i(66262);const f=(0,y.A)(k,[["render",p],["__scopeId","data-v-ec62635e"]]);var v=f},30954:function(e,t,i){i.r(t),i.d(t,{default:function(){return Yl}});var a=i(20641),s=i(90033);const l={class:"o-wa"},o={class:"o-wa__head"},n={class:"o-wa__title"},r={class:"o-wa__subtitle"},d={class:"o-wa__side"},c={class:"o-wa__actions"},u={key:0,class:"o-wa__count"},h={key:0,class:"o-wa__pending"};function p(e,t,i,p,b,m){const g=(0,a.g2)("b-button"),k=(0,a.g2)("b-loading"),y=(0,a.g2)("WebsiteAdminPages"),f=(0,a.g2)("WebsiteAdminArticles"),v=(0,a.g2)("WebsiteAdminMenu"),w=(0,a.g2)("WebsiteAdminSettings"),_=(0,a.g2)("WebsiteAdminDesign"),$=(0,a.g2)("b-tab-item"),C=(0,a.g2)("b-tabs"),L=(0,a.g2)("WebsiteMcpGuide");return(0,a.uX)(),(0,a.CE)("div",l,[(0,a.Lk)("header",o,[(0,a.Lk)("div",null,[(0,a.Lk)("h1",n,(0,s.v_)(e.$t("Website")),1),(0,a.Lk)("p",r,(0,s.v_)(e.$t("Build and publish your public website.")),1)]),(0,a.Lk)("div",d,[(0,a.Lk)("div",c,[(0,a.bF)(g,{class:(0,s.C4)(["is-rounded is-small",{"is-primary is-light":b.isMcpOpen}]),"icon-left":"plug",onClick:m.openMcp},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Connect MCP")),1)]),_:1},8,["class","onClick"]),m.homepageUrl?((0,a.uX)(),(0,a.Wv)(g,{key:0,class:"is-rounded is-small","icon-left":"arrow-up-right-from-square",tag:"a",href:m.homepageUrl,target:"_blank",rel:"noopener noreferrer"},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Preview website")),1)]),_:1},8,["href"])):(0,a.Q3)("",!0),m.hasLiveWebsite?((0,a.uX)(),(0,a.Wv)(g,{key:1,class:"is-rounded is-small","icon-left":"globe",tag:"a",href:m.liveUrl,target:"_blank",rel:"noopener noreferrer"},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Live website")),1)]),_:1},8,["href"])):(0,a.Q3)("",!0),(0,a.bF)(g,{class:"is-rounded is-primary is-small","icon-left":"cloud-arrow-up",loading:e.isPublishing,disabled:e.isPublishing,onClick:e.publishEverything},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Publish live"))+" ",1),m.totalPendingCount>0?((0,a.uX)(),(0,a.CE)("span",u,(0,s.v_)(m.totalPendingCount),1)):(0,a.Q3)("",!0)]),_:1},8,["loading","disabled","onClick"])]),e.hasPendingChanges&&!e.isPublishing?((0,a.uX)(),(0,a.CE)("p",h,(0,s.v_)(m.pendingSummary),1)):(0,a.Q3)("",!0)])]),(0,a.bF)(k,{"is-full-page":!1,active:m.isLoadingTabs},null,8,["active"]),m.isLoadingTabs?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.Wv)(C,{key:0,modelValue:b.activeTab,"onUpdate:modelValue":[t[1]||(t[1]=e=>b.activeTab=e),m.onTabChange],class:(0,s.C4)(["o-wa__tabs",{"is-dimmed":b.isMcpOpen}])},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(m.tabs,(i,s)=>((0,a.uX)(),(0,a.Wv)($,{key:i.key,order:s,label:i.label},{default:(0,a.k6)(()=>[b.activeTab!==s||b.isMcpOpen?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)(a.FK,{key:0},["pages"===i.key?((0,a.uX)(),(0,a.Wv)(y,{key:0,"publish-pages":e.publishPages,"publishing-target":e.publishingTarget,"is-publishing":e.isPublishing,"is-loading":e.isLoadingPublishState,onArticlesChanged:t[0]||(t[0]=e=>b.hasArticles=e),onPublishPage:e.publishOnePage,onChanged:e.fetchPublishState},null,8,["publish-pages","publishing-target","is-publishing","is-loading","onPublishPage","onChanged"])):"articles"===i.key?((0,a.uX)(),(0,a.Wv)(f,{key:1,"publish-articles":e.publishArticles,"is-publishing":e.isPublishing,onPublish:e.publishEverything,onChanged:e.fetchPublishState},null,8,["publish-articles","is-publishing","onPublish","onChanged"])):"menus"===i.key?((0,a.uX)(),(0,a.Wv)(v,{key:2,"changed-areas":e.changedAreas,"dismissed-areas":b.dismissedAreas,"is-publishing":e.isPublishing,onPublish:e.publishEverything,onDismiss:m.dismissNotice,onChanged:e.fetchPublishState},null,8,["changed-areas","dismissed-areas","is-publishing","onPublish","onDismiss","onChanged"])):"settings"===i.key?((0,a.uX)(),(0,a.Wv)(w,{key:3,"changed-areas":e.changedAreas,"dismissed-areas":b.dismissedAreas,"is-publishing":e.isPublishing,onPublish:e.publishEverything,onDismiss:m.dismissNotice,onSaved:e.fetchPublishState},null,8,["changed-areas","dismissed-areas","is-publishing","onPublish","onDismiss","onSaved"])):"design"===i.key?((0,a.uX)(),(0,a.Wv)(_,{key:4,"changed-areas":e.changedAreas,"dismissed-areas":b.dismissedAreas,"is-publishing":e.isPublishing,onPublish:e.publishEverything,onDismiss:m.dismissNotice,onSaved:e.fetchPublishState,onApplied:m.onTemplateApplied},null,8,["changed-areas","dismissed-areas","is-publishing","onPublish","onDismiss","onSaved","onApplied"])):(0,a.Q3)("",!0)],64))]),_:2},1032,["order","label"]))),128))]),_:1},8,["modelValue","class","onUpdate:modelValue"])),b.isMcpOpen?((0,a.uX)(),(0,a.Wv)(L,{key:1,"mcp-url":b.mcpUrl,onClose:m.closeMcp},null,8,["mcp-url","onClose"])):(0,a.Q3)("",!0)])}i(44114),i(18111),i(22489),i(20116),i(13579);var b=i(53751);const m={class:"o-wa-toolbar"},g={class:"o-wa-toolbar__hint"},k={class:"orgo-table-wrap is-clickable"},y={class:"o-wa-page__name"},f={class:"o-wa-page__title"}
1,v=["aria-label","title"],w=["href","aria-label","title"],_=["disabled","aria-label","title","onClick"],$={key:0,class:"o-wa-empty"},C={class:"card p-5 o-wa-news"},L={class:"o-wa-news__hint"},A={class:"o-wa-news__hint"},S={class:"card p-5 o-wa-home-card"},F={class:"o-wa-home-card__row"},E={class:"o-wa-home-card__text"},x={class:"o-wa-home-card__label"},T={class:"o-wa-news__hint"},P={key:0,value:null},W=["disabled","value"],D={class:"o-wa-page__action-label"},V={class:"o-wa-page__action-label"};function I(e,t,i,l,o,n){const r=(0,a.g2)("b-button"),d=(0,a.g2)("font-awesome-icon"),c=(0,a.g2)("b-table-column"),u=(0,a.g2)("b-tag"),h=(0,a.g2)("b-table"),p=(0,a.g2)("b-switch"),I=(0,a.g2)("b-select"),U=(0,a.g2)("b-tooltip"),X=(0,a.g2)("WebsiteAdminPageEdit"),H=(0,a.g2)("ItemViewModal");return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.Lk)("div",m,[(0,a.Lk)("p",g,(0,s.v_)(e.$t("Pages you add here appear on your website the next time you publish.")),1),(0,a.bF)(r,{class:"is-rounded is-primary","icon-left":"plus",onClick:n.create},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("New page")),1)]),_:1},8,["onClick"])]),(0,a.Lk)("div",k,[(0,a.bF)(h,{data:n.pages,loading:i.isLoading,"mobile-cards":!1,hoverable:"",onClick:n.edit},{empty:(0,a.k6)(()=>[i.isLoading?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("p",$,(0,s.v_)(e.$t("No pages yet. Create your first one to get started.")),1))]),default:(0,a.k6)(()=>[(0,a.bF)(c,{label:e.$t("Title"),field:"title"},{default:(0,a.k6)(i=>[(0,a.Lk)("div",y,[(0,a.Lk)("span",f,(0,s.v_)(i.row.title),1),i.row.isHomepage?((0,a.uX)(),(0,a.CE)("span",{key:0,class:"o-wa-page__home","aria-label":e.$t("Homepage"),title:e.$t("Homepage")},[(0,a.bF)(d,{icon:["fal","house"]})],8,v)):(0,a.Q3)("",!0),"PUBLISHED"===i.row.status?((0,a.uX)(),(0,a.CE)("a",{key:1,class:"orgo-table-action-btn o-wa-page__action",href:n.publicUrl(i.row),target:"_blank",rel:"noopener noreferrer","aria-label":e.$t("Preview"),title:e.$t("Preview"),onClick:t[0]||(t[0]=(0,b.D$)(()=>{},["stop"]))},[(0,a.bF)(d,{icon:["fal","arrow-up-right-from-square"]})],8,w)):(0,a.Q3)("",!0),(0,a.Lk)("button",{class:(0,s.C4)(["orgo-table-action-btn o-wa-page__action",{"is-working":o.duplicatingUuid===i.row.uuid}]),disabled:n.isDuplicating,"aria-label":e.$t("Duplicate"),title:e.$t("Duplicate"),onClick:(0,b.D$)(e=>n.duplicate(i.row),["stop"])},[(0,a.bF)(d,{icon:o.duplicatingUuid===i.row.uuid?["fal","spinner-third"]:["fal","copy"],spin:o.duplicatingUuid===i.row.uuid},null,8,["icon","spin"])],10,_)])]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Address")},{default:(0,a.k6)(e=>[(0,a.Lk)("code",null,"/"+(0,s.v_)(e.row.slug),1)]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Status")},{default:(0,a.k6)(t=>[(0,a.bF)(u,{class:(0,s.C4)(["is-rounded",e.websiteStateTone(t.row)]),title:e.websiteStateHint(t.row)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.websiteStateLabel(t.row)),1)]),_:2},1032,["class","title"])]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Last updated")},{default:(0,a.k6)(t=>[(0,a.eW)((0,s.v_)(t.row.dateUpdated?e.$filters.fromNow(t.row.dateUpdated):"â"),1)]),_:1},8,["label"]),(0,a.bF)(c,{width:"150px"},{default:(0,a.k6)(l=>[(0,a.Lk)("div",{class:"o-wa-page__publish",onClick:t[1]||(t[1]=(0,b.D$)(()=>{},["stop"]))},[n.canPublish(l.row)?((0,a.uX)(),(0,a.Wv)(r,{key:0,class:(0,s.C4)(["is-rounded is-small","WITHDRAWING"===l.row.publishState?"is-danger is-light":"is-primary"]),loading:i.publishingTarget===l.row.slug,disabled:i.isPublishing,onClick:t=>e.$emit("publish-page",l.row)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)("WITHDRAWING"===l.row.publishState?e.$t("Take offline"):e.$t("Publish live")),1)]),_:2},1032,["class","loading","disabled","onClick"])):(0,a.Q3)("",!0)])]),_:1})]),_:1},8,["data","loading","onClick"])]),(0,a.Lk)("div",C,[(0,a.bF)(p,{modelValue:o.articlesEnabled,"onUpdate:modelValue":[t[2]||(t[2]=e=>o.articlesEnabled=e),n.saveArticles]},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Enable articles")),1)]),_:1},8,["modelValue","onUpdate:modelValue"]),(0,a.Lk)("p",L,(0,s.v_)(e.$t("Adds a News section to your website and an Articles tab here. Off by default â an empty news page says nobody is home.")),1),(0,a.Lk)("p",A,(0,s.v_)(e.$t("Turning it off hides the section. Nothing you have written is deleted.")),1)]),(0,a.Lk)("div",S,[(0,a.Lk)("div",F,[(0,a.Lk)("div",E,[(0,a.Lk)("p",x,
1(0,s.v_)(e.$t("Homepage")),1),(0,a.Lk)("p",T,(0,s.v_)(e.$t("The page visitors land on when they open your website. Only published pages can be chosen.")),1)]),(0,a.bF)(I,{modelValue:n.homepageUuid,"onUpdate:modelValue":[t[3]||(t[3]=e=>n.homepageUuid=e),n.saveHomepage],loading:o.isSavingHomepage,disabled:o.isSavingHomepage||i.isLoading},{default:(0,a.k6)(()=>[n.homepageUuid?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("option",P,(0,s.v_)(e.$t("Choose a page")),1)),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.pages,t=>((0,a.uX)(),(0,a.CE)("option",{key:t.uuid,disabled:"PUBLISHED"!==t.status,value:t.uuid},(0,s.v_)(t.title||e.$t("Untitled page"))+(0,s.v_)("PUBLISHED"===t.status?"":` â ${e.$t("Draft")}`),9,W))),128))]),_:1},8,["modelValue","loading","disabled","onUpdate:modelValue"])])]),(0,a.bF)(H,{"model-value":n.isEditing,title:o.editorState.title,"scroll-container-id":"websitePageEditorBody","can-cancel":[],onClose:n.requestClose},{"left-actions":(0,a.k6)(()=>[o.editorState.state?((0,a.uX)(),(0,a.Wv)(u,{key:0,class:(0,s.C4)(["is-rounded",e.websiteStateTone(o.editorState.state)]),title:e.websiteStateHint(o.editorState.state)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.websiteStateLabel(o.editorState.state)),1)]),_:1},8,["class","title"])):(0,a.Q3)("",!0)]),actions:(0,a.k6)(()=>[(0,a.bF)(U,{label:n.duplicateHint,position:"is-bottom","append-to-body":""},{default:(0,a.k6)(()=>[(0,a.bF)(r,{class:"is-rounded is-small is-light",disabled:!o.editorState.canPreview||o.editorState.isDirty||n.isDuplicating,loading:o.duplicatingUuid===n.editingUuid,"aria-label":e.$t("Duplicate"),onClick:n.duplicateCurrent},{default:(0,a.k6)(()=>[(0,a.bF)(d,{icon:["fal","copy"]})]),_:1},8,["disabled","loading","aria-label","onClick"])]),_:1},8,["label"]),(0,a.bF)(r,{class:"is-rounded is-small is-light",disabled:!o.editorState.canPreview,title:e.$t("Open the page"),onClick:t[4]||(t[4]=e=>n.triggerOpen(!1))},{default:(0,a.k6)(()=>[(0,a.bF)(d,{icon:["fal","arrow-up-right-from-square"]}),(0,a.Lk)("span",D,(0,s.v_)(e.$t("Preview")),1)]),_:1},8,["disabled","title"]),(0,a.bF)(r,{class:"is-rounded is-small is-light",disabled:!o.editorState.canPreview,title:e.$t("Visual editor"),onClick:t[5]||(t[5]=e=>n.triggerOpen(!0))},{default:(0,a.k6)(()=>[(0,a.bF)(d,{icon:["fal","pen"]}),(0,a.Lk)("span",V,(0,s.v_)(e.$t("Visual editor")),1)]),_:1},8,["disabled","title"]),o.editorState.isDirty?((0,a.uX)(),(0,a.Wv)(r,{key:0,class:"is-rounded is-primary is-small",disabled:!o.editorState.canSave,loading:o.editorState.isSaving,onClick:n.triggerSave},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Save")),1)]),_:1},8,["disabled","loading","onClick"])):(0,a.Q3)("",!0)]),default:(0,a.k6)(()=>[n.isEditing?((0,a.uX)(),(0,a.Wv)(X,{ref:"editor",key:n.editingUuid||"new",uuid:n.editingUuid,"publish-entry":n.editingEntry,"is-publishing":i.isPublishing,onDeleted:n.onPageDeleted,onPublish:n.publishFromEditor,onSaved:n.onPageSaved,onStateChange:t[6]||(t[6]=e=>o.editorState=e)},null,8,["uuid","publish-entry","is-publishing","onDeleted","onPublish","onSaved"])):(0,a.Q3)("",!0)]),_:1},8,["model-value","title","onClose"])])}const U={class:"o-wa-pageedit"},X={class:"card p-5 o-wa-pageedit__meta"},H={class:"columns is-multiline"},B={class:"column is-12-mobile is-6-tablet"},O={class:"column is-12-mobile is-6-tablet"},R={class:"column is-12 o-wa-pageedit__draft"},N={class:"o-wa-pageedit__switch-hint"},Q={class:"o-wa-pageedit__edit-body"},M={class:"o-wa-pageedit__edit-title"},K={class:"o-wa-pageedit__edit-text"},q={class:"o-wa-pageedit__edit-label"},G={class:"o-wa-pageedit__section"},j={class:"card p-5"},z={class:"o-wa-pageedit__section"},Y={class:"card p-5 o-wa-pageedit__danger"},J={class:"o-wa-pageedit__danger-text"},Z={class:"o-wa-pageedit__danger-label"};function ee(e,t,i,l,o,n){const r=(0,a.g2)("b-loading"),d=(0,a.g2)("b-input"),c=(0,a.g2)("b-field"),u=(0,a.g2)("b-checkbox"),h=(0,a.g2)("WebsitePagePreview"),p=(0,a.g2)("font-awesome-icon"),m=(0,a.g2)("b-button"),g=(0,a.g2)("WebsiteImagePicker");return(0,a.uX)(),(0,a.CE)("div",U,[(0,a.bF)(r,{"is-full-page":!1,active:o.isLoading},null,8,["active"]),(0,a.Lk)("div",X,[(0,a.Lk)("div",H,[(0,a.Lk)("div",B,[(0,a.bF)(c,{label:e.$t("Title"),type:o.errors.title?"is-danger":"",message:o.errors.title},{default:(0,a.k6)(()=>
1[(0,a.bF)(d,{ref:"titleInput",modelValue:o.form.title,"onUpdate:modelValue":t[0]||(t[0]=e=>o.form.title=e)},null,8,["modelValue"])]),_:1},8,["label","type","message"])]),(0,a.Lk)("div",O,[(0,a.bF)(c,{label:e.$t("Address"),message:e.$t("Leave empty to build it from the title.")},{default:(0,a.k6)(()=>[(0,a.bF)(c,{expanded:""},{default:(0,a.k6)(()=>[t[8]||(t[8]=(0,a.Lk)("p",{class:"control"},[(0,a.Lk)("span",{class:"button is-static is-rounded"},"/")],-1)),(0,a.bF)(d,{modelValue:o.form.slug,"onUpdate:modelValue":t[1]||(t[1]=e=>o.form.slug=e),expanded:""},null,8,["modelValue"])]),_:1})]),_:1},8,["label","message"])]),(0,a.Lk)("div",R,[(0,a.bF)(u,{modelValue:n.isDraft,"onUpdate:modelValue":t[2]||(t[2]=e=>n.isDraft=e)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Mark as draft")),1)]),_:1},8,["modelValue"]),(0,a.Lk)("p",N,(0,s.v_)(n.isDraft?e.$t("A draft: it stays off your website, menus included."):e.$t("Part of your website. Saving does not change what visitors see â publishing does.")),1)])])]),(0,a.Lk)("div",{class:(0,s.C4)(["o-wa-pageedit__edit",{"is-open":n.canPreview}]),onClick:t[4]||(t[4]=e=>n.openPage(!0))},[(0,a.bF)(h,{blocks:o.form.blocks},null,8,["blocks"]),(0,a.Lk)("div",Q,[(0,a.Lk)("div",null,[(0,a.Lk)("p",M,(0,s.v_)(e.$t("Edit page")),1),(0,a.Lk)("p",K,(0,s.v_)(n.canPreview?e.$t("Sections are added and arranged in the visual editor."):e.$t("Save the page first, then edit it visually.")),1)]),(0,a.bF)(m,{class:"is-rounded is-primary is-small",disabled:!n.canPreview,onClick:t[3]||(t[3]=(0,b.D$)(e=>n.openPage(!0),["stop"]))},{default:(0,a.k6)(()=>[(0,a.bF)(p,{icon:["fal","pen"]}),(0,a.Lk)("span",q,(0,s.v_)(e.$t("Visual editor")),1)]),_:1},8,["disabled"])])],2),(0,a.Lk)("h2",G,(0,s.v_)(e.$t("Search engines and sharing")),1),(0,a.Lk)("div",j,[(0,a.bF)(c,{label:e.$t("Search engine title")},{default:(0,a.k6)(()=>[(0,a.bF)(d,{modelValue:o.form.seoTitle,"onUpdate:modelValue":t[5]||(t[5]=e=>o.form.seoTitle=e),maxlength:"120"},null,8,["modelValue"])]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Search engine description")},{default:(0,a.k6)(()=>[(0,a.bF)(d,{modelValue:o.form.seoDescription,"onUpdate:modelValue":t[6]||(t[6]=e=>o.form.seoDescription=e),type:"textarea",rows:"2",maxlength:"320"},null,8,["modelValue"])]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Sharing image")},{default:(0,a.k6)(()=>[(0,a.bF)(g,{modelValue:o.form.ogImage,"onUpdate:modelValue":t[7]||(t[7]=e=>o.form.ogImage=e)},null,8,["modelValue"])]),_:1},8,["label"])]),n.isNew?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)(a.FK,{key:0},[(0,a.Lk)("h2",z,(0,s.v_)(e.$t("Delete page")),1),(0,a.Lk)("div",Y,[(0,a.Lk)("p",J,(0,s.v_)(e.$t("This page will be removed from your website. Menu entries pointing at it will stop showing.")),1),(0,a.bF)(m,{class:"is-rounded is-danger is-light",loading:o.isDeleting,onClick:n.confirmRemove},{default:(0,a.k6)(()=>[(0,a.bF)(p,{icon:["fal","trash"]}),(0,a.Lk)("span",Z,(0,s.v_)(e.$t("Delete page")),1)]),_:1},8,["loading","onClick"])])],64))])}const te={key:1,class:"o-wa-preview__empty"},ie={key:2,class:"o-wa-preview__fade"};function ae(e,t,i,l,o,n){const r=(0,a.g2)("WebsiteRenderer"),d=(0,a.g2)("font-awesome-icon");return(0,a.uX)(),(0,a.CE)("div",{ref:"viewport",class:(0,s.C4)(["o-wa-preview o-website",n.themeClasses]),"data-theme":"light",style:(0,s.Tr)(n.themeStyle)},[n.previewBlocks.length?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"o-wa-preview__page",style:(0,s.Tr)(n.pageStyle),"aria-hidden":"true"},[(0,a.bF)(r,{blocks:n.previewBlocks},null,8,["blocks"])],4)):((0,a.uX)(),(0,a.CE)("div",te,[(0,a.bF)(d,{icon:["fal","image"]}),(0,a.Lk)("span",null,(0,s.v_)(e.$t("This page has no sections yet.")),1)])),n.previewBlocks.length?((0,a.uX)(),(0,a.CE)("div",ie)):(0,a.Q3)("",!0)],6)}var se=i(65357),le=i(22539);const oe=1440,ne=2;var re={name:"WebsitePagePreview",components:{WebsiteRenderer:se.A},props:{blocks:{type:Array,default:()=>[]},settings:{type:Object,default:null},maxBlocks:{type:Number,default:ne}},data(){return{storedSettings:null,scale:1,observer:null}},computed:{previewBlocks(){return(this.blocks||[]).filter(e=>"donate"!==e?.type).slice(0,this.maxBlocks)},activeSettings(){return this.settings||this.storedSettings}
1,themeClasses(){return(0,le.bd)(this.activeSettings,this.previewBlocks[0])},themeStyle(){return(0,le.Ce)(this.activeSettings)},pageStyle(){return{width:`${oe}px`,transform:`scale(${this.scale})`}}},created(){this.settings||this.fetchSettings()},mounted(){this.measure(),this.observer=new ResizeObserver(this.measure),this.observer.observe(this.$refs.viewport)},beforeUnmount(){this.observer&&(this.observer.disconnect(),this.observer=null)},methods:{fetchSettings(){this.$http.plain.get("/website-settings").then(e=>{this.storedSettings=e.data.settings||null}).catch(e=>{console.log(e)})},measure(){const e=this.$refs.viewport?.clientWidth||0;e&&(this.scale=e/oe)}}},de=i(66262);const ce=(0,de.A)(re,[["render",ae],["__scopeId","data-v-7e14bdce"]]);var ue=ce,he=i(18539);const pe="DRAFT",be="REMOVE",me="SCHEDULED",ge="LIVE",ke="UPDATE",ye="NEW";var fe={methods:{websiteStateKey(e){return e?"PUBLISHED"!==e.status?"WITHDRAWING"===e.publishState?be:pe:e.publishedAt&&new Date(e.publishedAt)>new Date?me:"LIVE"===e.publishState?ge:"STALE"===e.publishState?ke:ye:pe},websiteStateLabel(e){switch(this.websiteStateKey(e)){case be:return this.$t("Publish to remove");case me:return this.$t("Scheduled");case ge:return this.$t("Live");case ke:return this.$t("Publish to update");case ye:return this.$t("Publish to go live");default:return this.$t("Draft")}},websiteStateTone(e){switch(this.websiteStateKey(e)){case be:return"is-danger is-passive";case me:return"is-info is-passive";case ge:return"is-success is-passive";case ke:case ye:return"is-warning is-passive";default:return"is-light"}},websiteStateHint(e){const t=e?.dateDeployed?this.$filters.fromNow(e.dateDeployed):null;switch(this.websiteStateKey(e)){case be:return this.$t("A draft here, but still on your website. Publishing takes it down.");case me:return this.$t("Dated in the future, so your website keeps it hidden until then.");case ge:return t?this.$t("Live since {when}.",{when:t}):this.$t("On your website as written here.");case ke:return t?this.$t("Live since {when} â your website still shows that version, not this one.",{when:t}):this.$t("Your website still shows an older version of this.");case ye:return this.$t("Not on your website yet. Publishing puts it up.");default:return this.$t("A draft. It stays off your website until you turn it on.")}}}},ve={name:"WebsiteAdminPageEdit",components:{WebsitePagePreview:ue,WebsiteImagePicker:he.A},mixins:[fe],props:{uuid:{type:String,default:null},publishEntry:{type:Object,default:null},isPublishing:{type:Boolean,default:!1}},emits:["deleted","publish","saved","state-change"],data(){return{form:{title:"",slug:"",status:"PUBLISHED",blocks:[],seoTitle:"",seoDescription:"",ogImage:null},errors:{},initial:null,isLoading:!1,isSaving:!1,isDeleting:!1}},computed:{isNew(){return!this.uuid},canSave(){return""!==this.form.title.trim()},canPreview(){return!this.isNew&&!!this.form.slug},state(){return{...this.publishEntry||{},status:this.form.status}},isDirty(){return null!==this.initial&&this.initial!==JSON.stringify(this.form)},editorState(){return{title:this.isNew?this.$t("New page"):this.form.title||this.$t("Untitled page"),state:this.isNew?null:this.state,canPreview:this.canPreview,canSave:this.canSave,isDirty:this.isDirty,isSaving:this.isSaving}},isDraft:{get(){return"PUBLISHED"!==this.form.status},set(e){this.form.status=e?"DRAFT":"PUBLISHED"}},publicRoute(){return{name:"WebsitePage",params:{slug:this.form.slug}}}},watch:{editorState:{immediate:!0,handler(e){this.$emit("state-change",e)}}},created(){this.isNew&&this.$nextTick(()=>this.$refs.titleInput?.focus()),this.isNew?this.initial=JSON.stringify(this.form):this.fetchPage()},methods:{fetchPage(){this.isLoading=!0,this.$http.plain.get(`/website_pages/${this.uuid}`).then(e=>{const t=e.data;this.form={title:t.title||"",slug:t.slug||"",status:t.status||"DRAFT",blocks:t.blocks||[],seoTitle:t.seoTitle||"",seoDescription:t.seoDescription||"",ogImage:t.ogImage||null},this.initial=JSON.stringify(this.form)}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Could not load the page"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},save(){if(this.errors={},!this.form.title.trim())return void(this.errors.title=this.$t("A page needs a title."));const{blocks:e,...t}=this.form,i=["LIVE","STALE","WITHDRAWING"].includes(this.publishEntry?.publishState);this.isSaving=!0;const a=this.isNew?this.$http.plain.post("/website_pages",t):this.$http.plain.patch(`/website_pages/${this.uuid}`,t);a.then(e=>{this.announceSave(e.data,i),this.$emit("saved",e.data),this.isNew?this.$router.replace({name:"WebsiteAdminPageEdit",params:{uuid:e.data.uuid}}):(this.form.slug=e.data.slug,this.form.status=e.data.status,this.form.blocks=e.data.blocks||[],this.initial=JSON.stringify(this.form))}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the page"),type:"is-danger",duration:6e3})}).finally(()=>{this.isSaving=!1})},announceSave(e,t){const i="PUBLISHED"===e.status;let a;a=i&&t?this.$t("Saved. Your website shows the version you last published."):i?this.$t("Saved. It is not on your website until you publish."):t?this.$t("Saved as a draft â but it is still on your website until you publish."):this.$t("Saved as a draft. It stays off your website.");const s=i||t;this.$buefy.snackbar.open({message:a,type:"is-success",duration:6e3,actionText:s?this.$t("Publish live"):this.$t("OK"),onAction:()=>{s&&!this.isPublishing&&this.$emit("publish",e)}})},openPage(e){if(!this.canPreview)return;const t={...this.publicRoute};e&&(t.query={edit:"1"}),window.open(this.$router.resolve(t).href,"_blank","noopener")},confirmRemove(){this.$buefy.dialog.confirm({title:this.$t("Delete page"),message:this.$t("This page will be removed from your website. Menu entries pointing at it will stop showing."),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>this.remove()})},remove(){this.isDeleting=!0,this.$http.plain.delete(`/website_pages/${this.uuid}`).then(()=>{this.$buefy.snackbar.open({message:this.$t("Page deleted"),type:"is-success"}),this.$emit("deleted",this.uuid)}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not delete the page"),type:"is-danger",duration:6e3})}).finally(()=>{this.isDeleting=!1})}}};const we=(0,de.A)(ve,[["render",ee],["__scopeId","data-v-e235a6be"]]);var _e=we,$e=i(80762),Ce={name:"WebsiteAdminPages",components:{WebsiteAdminPageEdit:_e,ItemViewModal:$e.A},mixins:[fe],props:{publishPages:{type:Array,default:()=>[]},publishingTarget:{type:String,default:null},isPublishing:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1}},emits:["articles-changed","publish-page","changed"],data(){return{articlesEnabled:!1,homepagePending:null,isSavingHomepage:!1,duplicatingUuid:null,editorState:{t
1itle:""},settings:null}},computed:{isEditing(){return["WebsiteAdminPageCreate","WebsiteAdminPageEdit"].includes(this.$route.name)},editingUuid(){return this.$route.params.uuid||null},pages(){return this.publishPages},editingEntry(){return this.pages.find(e=>e.uuid===this.editingUuid)||null},isDuplicating(){return null!==this.duplicatingUuid},duplicateHint(){return!this.editorState.canPreview||this.editorState.isDirty?this.$t("Save the page before duplicating it."):this.$t("Duplicate")},homepageUuid:{get(){return this.homepagePending||this.pages.find(e=>e.isHomepage)?.uuid||null},set(e){this.homepagePending=e}}},created(){this.fetchSettings()},methods:{canPublish(e){return"LIVE"!==e.publishState},publishFromEditor(e){this.$emit("publish-page",this.pages.find(t=>t.uuid===e.uuid)||e)},fetchSettings(){this.$http.plain.get("/website-settings").then(e=>{this.settings=e.data.settings,this.articlesEnabled=!0===e.data.settings?.articles?.isActive}).catch(e=>{console.log(e)})},saveArticles(e){this.settings&&this.$http.plain.patch("/website-settings",{...this.settings,articles:{isActive:e}}).then(e=>{this.settings=e.data.settings,this.articlesEnabled=!0===e.data.settings?.articles?.isActive,this.$emit("articles-changed",this.articlesEnabled),this.$emit("changed"),this.$buefy.snackbar.open({message:this.$t("Website settings saved"),type:"is-success"})}).catch(t=>{console.log(t),this.articlesEnabled=!e,this.$buefy.snackbar.open({message:this.$t("Could not save the settings"),type:"is-danger"})})},saveHomepage(e){const t=this.pages.find(e=>e.isHomepage)?.uuid||null;e&&e!==t?(this.isSavingHomepage=!0,this.$http.plain.patch(`/website_pages/${e}`,{isHomepage:!0}).then(()=>{this.$emit("changed"),this.$buefy.snackbar.open({message:this.$t("Homepage updated"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not change the homepage"),type:"is-danger",duration:6e3})}).finally(()=>{this.homepagePending=null,this.isSavingHomepage=!1})):this.homepagePending=null},create(){this.$router.push({name:"WebsiteAdminPageCreate"})},duplicate(e){this.isDuplicating||(this.duplicatingUuid=e.uuid,this.$http.plain.post(`/website_pages/${e.uuid}/duplicate`).then(e=>{this.$emit("changed"),this.$buefy.snackbar.open({message:this.$t("Page duplicated. The copy is a draft â rename it, then publish when you are ready."),type:"is-success",duration:6e3}),this.$router.push({name:"WebsiteAdminPageEdit",params:{uuid:e.data.uuid}})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not duplicate the page"),type:"is-danger",duration:6e3})}).finally(()=>{this.duplicatingUuid=null}))},duplicateCurrent(){this.editingUuid&&this.duplicate({uuid:this.editingUuid})},triggerSave(){this.$refs.editor?.save()},triggerOpen(e){this.$refs.editor?.openPage(e)},requestClose(){this.editorState.isDirty?this.$buefy.dialog.confirm({title:this.$t("Unsaved Changes"),message:this.$t("You have unsaved changes that will be lost. Are you sure you want to leave?"),confirmText:this.$t("Leave"),cancelText:this.$t("Stay"),type:"is-danger",hasIcon:!0,onConfirm:()=>this.closeEditor()}):this.closeEditor()},edit(e){e.uuid!==this.editingUuid&&this.$router.push({name:"WebsiteAdminPageEdit",params:{uuid:e.uuid}})},closeEditor(){this.$router.push({name:"WebsiteAdmin"})},onPageSaved(){this.$emit("changed")},publicUrl(e){return this.$router.resolve({name:"WebsitePage",params:{slug:e.slug}}).href},onPageDeleted(){this.closeEditor(),this.$emit("changed")}}};const Le=(0,de.A)(Ce,[["render",I],["__scopeId","data-v-145fbd1a"]]);var Ae=Le;const Se={class:"o-wa-toolbar"},Fe={class:"o-wa-toolbar__hint"},Ee={class:"orgo-table-wrap is-clickable"},xe={class:"o-wa-article__name"},Te={class:"o-wa-article__title"},Pe=["href","aria-label","title"],We={key:1,class:"o-wa-article__nocat"},De={key:0,class:"o-wa-empty"},Ve={class:"card p-5 o-wa-cats"},Ie={class:"o-wa-cats__head"},Ue={class:"o-wa-cats__label"},Xe={class:"o-wa-cats__hint"},He={key:0,class:"o-wa-cats__list"},Be={class:"o-wa-cats__name"},Oe={class:"o-wa-cats__count"},Re={class:"o-wa-cats__actions"}
1,Ne=["aria-label","title","onClick"],Qe=["aria-label","title","onClick"],Me={key:1,class:"o-wa-cats__hint"},Ke={class:"o-wa-article__action-label"},qe={class:"o-wa-article__action-label"};function Ge(e,t,i,l,o,n){const r=(0,a.g2)("b-button"),d=(0,a.g2)("font-awesome-icon"),c=(0,a.g2)("b-table-column"),u=(0,a.g2)("b-tag"),h=(0,a.g2)("b-table"),p=(0,a.g2)("WebsiteAdminArticleEdit"),m=(0,a.g2)("ItemViewModal");return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.Lk)("div",Se,[(0,a.Lk)("p",Fe,(0,s.v_)(e.$t("News and blog posts. They appear on /news, newest first, and in any Articles section you add to a page.")),1),(0,a.bF)(r,{class:"is-rounded is-primary","icon-left":"plus",onClick:n.create},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("New article")),1)]),_:1},8,["onClick"])]),(0,a.Lk)("div",Ee,[(0,a.bF)(h,{data:o.articles,loading:o.isLoading,"mobile-cards":!1,hoverable:"",onClick:n.edit},{empty:(0,a.k6)(()=>[o.isLoading?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("p",De,(0,s.v_)(e.$t("No articles yet. Write your first one and it appears on your website under News.")),1))]),default:(0,a.k6)(()=>[(0,a.bF)(c,{label:e.$t("Title"),field:"title"},{default:(0,a.k6)(i=>[(0,a.Lk)("div",xe,[(0,a.Lk)("span",Te,(0,s.v_)(i.row.title),1),"PUBLISHED"===i.row.status?((0,a.uX)(),(0,a.CE)("a",{key:0,class:"orgo-table-action-btn o-wa-article__preview",href:n.publicUrl(i.row),target:"_blank",rel:"noopener noreferrer","aria-label":e.$t("Preview"),title:e.$t("Preview"),onClick:t[0]||(t[0]=(0,b.D$)(()=>{},["stop"]))},[(0,a.bF)(d,{icon:["fal","arrow-up-right-from-square"]})],8,Pe)):(0,a.Q3)("",!0)])]),_:1},8,["label"]),n.hasCategories?((0,a.uX)(),(0,a.Wv)(c,{key:0,label:e.$t("Category"),field:"category"},{default:(0,a.k6)(e=>[e.row.category?((0,a.uX)(),(0,a.Wv)(u,{key:0,class:"is-rounded is-light"},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.row.category),1)]),_:2},1024)):((0,a.uX)(),(0,a.CE)("span",We," â "))]),_:1},8,["label"])):(0,a.Q3)("",!0),(0,a.bF)(c,{label:e.$t("Address")},{default:(0,a.k6)(e=>[(0,a.Lk)("code",null,"/news/"+(0,s.v_)(e.row.slug),1)]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Status")},{default:(0,a.k6)(t=>[(0,a.bF)(u,{class:(0,s.C4)(["is-rounded",e.websiteStateTone(n.stateOf(t.row))]),title:e.websiteStateHint(n.stateOf(t.row))},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.websiteStateLabel(n.stateOf(t.row))),1)]),_:2},1032,["class","title"])]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Date")},{default:(0,a.k6)(t=>[(0,a.eW)((0,s.v_)(t.row.publishedAt?e.$filters.format(t.row.publishedAt):"â"),1)]),_:1},8,["label"])]),_:1},8,["data","loading","onClick"])]),(0,a.Lk)("div",Ve,[(0,a.Lk)("div",Ie,[(0,a.Lk)("div",null,[(0,a.Lk)("p",Ue,(0,s.v_)(e.$t("Categories")),1),(0,a.Lk)("p",Xe,(0,s.v_)(e.$t("The labels an article can be filed under. Renaming one changes it on every article carrying it; removing one clears it and keeps the articles.")),1)]),(0,a.bF)(r,{class:"is-rounded is-small","icon-left":"plus",onClick:n.promptCreate},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("New category")),1)]),_:1},8,["onClick"])]),o.categories.length?((0,a.uX)(),(0,a.CE)("div",He,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(o.categories,t=>((0,a.uX)(),(0,a.CE)("div",{key:t.name,class:"o-wa-cats__row"},[(0,a.Lk)("span",Be,(0,s.v_)(t.name),1),t.isManaged?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.Wv)(u,{key:0,class:"is-rounded is-light"},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("From your articles")),1)]),_:1})),(0,a.Lk)("span",Oe,(0,s.v_)(e.$t("{count} articles",{count:t.count})),1),(0,a.Lk)("div",Re,[(0,a.Lk)("button",{class:"orgo-table-action-btn","aria-label":e.$t("Rename"),title:e.$t("Rename"),onClick:e=>n.promptRename(t)},[(0,a.bF)(d,{icon:["fal","pen"]})],8,Ne),(0,a.Lk)("button",{class:"orgo-table-action-btn is-danger","aria-label":e.$t("Delete"),title:e.$t("Delete"),onClick:e=>n.confirmDelete(t)},[(0,a.bF)(d,{icon:["fal","trash"]})],8,Qe)])]))),128))])):((0,a.uX)(),(0,a.CE)("p",Me,(0,s.v_)(e.$t("No categories yet. Articles can be published without one.")),1))]),(0,a.bF)(m,{"model-value":n.isEditing,title:o.editorState.title,"scroll-container-id":"websiteArticleEditorBody","can-cancel":[],onClose:n.requestClose},{"left-actions":(0,a.k6)(()=>[o.editorState.state?((0,a.uX)(),(0,a.Wv)(u,{key:0,class:(0,s.C4)(["is-rounded",e.websiteStateTone(o.editorState.state)]),title:e.websiteStateHint(o.editorState.state)},{default:(0,a.k6)(()=>
1[(0,a.eW)((0,s.v_)(e.websiteStateLabel(o.editorState.state)),1)]),_:1},8,["class","title"])):(0,a.Q3)("",!0)]),actions:(0,a.k6)(()=>[(0,a.bF)(r,{class:"is-rounded is-small is-light",disabled:!o.editorState.canPreview,title:e.$t("Open the article"),onClick:t[1]||(t[1]=e=>n.triggerOpen(!1))},{default:(0,a.k6)(()=>[(0,a.bF)(d,{icon:["fal","arrow-up-right-from-square"]}),(0,a.Lk)("span",Ke,(0,s.v_)(e.$t("Preview")),1)]),_:1},8,["disabled","title"]),(0,a.bF)(r,{class:"is-rounded is-small is-light",disabled:!o.editorState.canPreview,title:e.$t("Visual editor"),onClick:t[2]||(t[2]=e=>n.triggerOpen(!0))},{default:(0,a.k6)(()=>[(0,a.bF)(d,{icon:["fal","pen"]}),(0,a.Lk)("span",qe,(0,s.v_)(e.$t("Visual editor")),1)]),_:1},8,["disabled","title"]),o.editorState.isDirty?((0,a.uX)(),(0,a.Wv)(r,{key:0,class:"is-rounded is-primary is-small",disabled:!o.editorState.canSave,loading:o.editorState.isSaving,onClick:n.triggerSave},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Save")),1)]),_:1},8,["disabled","loading","onClick"])):(0,a.Q3)("",!0)]),default:(0,a.k6)(()=>[n.isEditing?((0,a.uX)(),(0,a.Wv)(p,{ref:"editor",key:n.editingUuid||"new",uuid:n.editingUuid,categories:o.categories,"publish-entry":n.editingEntry,"is-publishing":i.isPublishing,onDeleted:n.onArticleDeleted,onPublish:t[3]||(t[3]=t=>e.$emit("publish")),onSaved:n.onArticleSaved,onStateChange:t[4]||(t[4]=e=>o.editorState=e)},null,8,["uuid","categories","publish-entry","is-publishing","onDeleted","onSaved"])):(0,a.Q3)("",!0)]),_:1},8,["model-value","title","onClose"])])}const je={class:"o-wa-pageedit"},ze={class:"card p-5 o-wa-pageedit__meta"},Ye={class:"columns is-multiline"},Je={class:"column is-12-mobile is-6-tablet"},Ze={class:"column is-12-mobile is-6-tablet"},et={class:"column is-12-mobile is-6-tablet"},tt={class:"column is-12-mobile is-6-tablet"},it={value:""},at=["value"],st={class:"column is-12 o-wa-pageedit__draft"},lt={class:"o-wa-pageedit__switch-hint"},ot={class:"column is-12"},nt={class:"column is-12"},rt={class:"o-wa-pageedit__edit-body"},dt={class:"o-wa-pageedit__edit-title"},ct={class:"o-wa-pageedit__edit-text"},ut={class:"o-wa-pageedit__edit-label"},ht={class:"o-wa-pageedit__section"},pt={class:"card p-5"},bt={class:"o-wa-pageedit__section"},mt={class:"card p-5 o-wa-pageedit__danger"},gt={class:"o-wa-pageedit__danger-text"},kt={class:"o-wa-pageedit__danger-label"};function yt(e,t,i,l,o,n){const r=(0,a.g2)("b-loading"),d=(0,a.g2)("b-input"),c=(0,a.g2)("b-field"),u=(0,a.g2)("b-datetimepicker"),h=(0,a.g2)("b-select"),p=(0,a.g2)("b-checkbox"),m=(0,a.g2)("WebsiteImagePicker"),g=(0,a.g2)("WebsitePagePreview"),k=(0,a.g2)("font-awesome-icon"),y=(0,a.g2)("b-button");return(0,a.uX)(),(0,a.CE)("div",je,[(0,a.bF)(r,{"is-full-page":!1,active:o.isLoading},null,8,["active"]),(0,a.Lk)("div",ze,[(0,a.Lk)("div",Ye,[(0,a.Lk)("div",Je,[(0,a.bF)(c,{label:e.$t("Title"),type:o.errors.title?"is-danger":"",message:o.errors.title},{default:(0,a.k6)(()=>
1[(0,a.bF)(d,{ref:"titleInput",modelValue:o.form.title,"onUpdate:modelValue":t[0]||(t[0]=e=>o.form.title=e)},null,8,["modelValue"])]),_:1},8,["label","type","message"])]),(0,a.Lk)("div",Ze,[(0,a.bF)(c,{label:e.$t("Address"),message:e.$t("Leave empty to build it from the title.")},{default:(0,a.k6)(()=>[(0,a.bF)(c,{expanded:""},{default:(0,a.k6)(()=>[t[11]||(t[11]=(0,a.Lk)("p",{class:"control"},[(0,a.Lk)("span",{class:"button is-static is-rounded"},"/news/")],-1)),(0,a.bF)(d,{modelValue:o.form.slug,"onUpdate:modelValue":t[1]||(t[1]=e=>o.form.slug=e),expanded:""},null,8,["modelValue"])]),_:1})]),_:1},8,["label","message"])]),(0,a.Lk)("div",et,[(0,a.bF)(c,{label:e.$t("Date"),message:e.$t("A date in the future keeps the article hidden until then.")},{default:(0,a.k6)(()=>[(0,a.bF)(u,{modelValue:n.publishedAt,"onUpdate:modelValue":t[2]||(t[2]=e=>n.publishedAt=e),"append-to-body":"",editable:"",placeholder:e.$t("Set when published")},null,8,["modelValue","placeholder"])]),_:1},8,["label","message"])]),(0,a.Lk)("div",tt,[(0,a.bF)(c,{label:e.$t("Category"),message:e.$t("Optional. Manage the list on the Articles tab.")},{default:(0,a.k6)(()=>[(0,a.bF)(h,{modelValue:o.form.category,"onUpdate:modelValue":t[3]||(t[3]=e=>o.form.category=e),expanded:""},{default:(0,a.k6)(()=>[(0,a.Lk)("option",it,(0,s.v_)(e.$t("No category")),1),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.categoryOptions,e=>((0,a.uX)(),(0,a.CE)("option",{key:e,value:e},(0,s.v_)(e),9,at))),128))]),_:1},8,["modelValue"])]),_:1},8,["label","message"])]),(0,a.Lk)("div",st,[(0,a.bF)(p,{modelValue:n.isDraft,"onUpdate:modelValue":t[4]||(t[4]=e=>n.isDraft=e)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Mark as draft")),1)]),_:1},8,["modelValue"]),(0,a.Lk)("p",lt,(0,s.v_)(n.isDraft?e.$t("A draft: it stays off your website and out of News."):e.$t("Part of your website. Saving does not change what visitors see â publishing does.")),1)]),(0,a.Lk)("div",ot,[(0,a.bF)(c,{label:e.$t("Excerpt"),message:e.$t("The summary shown in listings and when the article is shared. Leave empty and the opening lines are used.")},{default:(0,a.k6)(()=>[(0,a.bF)(d,{modelValue:o.form.excerpt,"onUpdate:modelValue":t[5]||(t[5]=e=>o.form.excerpt=e),type:"textarea",rows:"2",maxlength:"320"},null,8,["modelValue"])]),_:1},8,["label","message"])]),(0,a.Lk)("div",nt,[(0,a.bF)(c,{label:e.$t("Cover image")},{default:(0,a.k6)(()=>[(0,a.bF)(m,{modelValue:o.form.coverImage,"onUpdate:modelValue":t[6]||(t[6]=e=>o.form.coverImage=e)},null,8,["modelValue"])]),_:1},8,["label"])])])]),(0,a.Lk)("div",{class:(0,s.C4)(["o-wa-pageedit__edit",{"is-open":n.canPreview}]),onClick:t[8]||(t[8]=e=>n.openArticle(!0))},[(0,a.bF)(g,{blocks:o.form.blocks},null,8,["blocks"]),(0,a.Lk)("div",rt,[(0,a.Lk)("div",null,[(0,a.Lk)("p",dt,(0,s.v_)(e.$t("Write the article")),1),(0,a.Lk)("p",ct,(0,s.v_)(n.canPreview?e.$t("Sections are added and arranged in the visual editor."):e.$t("Save the article first, then write it visually.")),1)]),(0,a.bF)(y,{class:"is-rounded is-primary is-small",disabled:!n.canPreview,onClick:t[7]||(t[7]=(0,b.D$)(e=>n.openArticle(!0),["stop"]))},{default:(0,a.k6)(()=>[(0,a.bF)(k,{icon:["fal","pen"]}),(0,a.Lk)("span",ut,(0,s.v_)(e.$t("Visual editor")),1)]),_:1},8,["disabled"])])],2),(0,a.Lk)("h2",ht,(0,s.v_)(e.$t("Search engines and sharing")),1),(0,a.Lk)("div",pt,[(0,a.bF)(c,{label:e.$t("Search engine title")},{default:(0,a.k6)(()=>[(0,a.bF)(d,{modelValue:o.form.seoTitle,"onUpdate:modelValue":t[9]||(t[9]=e=>o.form.seoTitle=e),maxlength:"120"},null,8,["modelValue"])]),_:1},8,["label"]),(0,a.bF)(c,{label:e.$t("Search engine description")},{default:(0,a.k6)(()=>[(0,a.bF)(d,{modelValue:o.form.seoDescription,"onUpdate:modelValue":t[10]||(t[10]=e=>o.form.seoDescription=e),type:"textarea",rows:"2",maxlength:"320"},null,8,["modelValue"])]),_:1},8,["label"])]),n.isNew?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)(a.FK,{key:0},[(0,a.Lk)("h2",bt,(0,s.v_)(e.$t("Delete article")),1),(0,a.Lk)("div",mt,[(0,a.Lk)("p",gt,(0,s.v_)(e.$t("This article will be removed from your website. Links to it will stop working.")),1),(0,a.bF)(y,{class:"is-rounded is-danger is-light",loading:o.isDeleting,onClick:n.confirmRemove},{default:(0,a.k6)(()=>[(0,a.bF)(k,{icon:["fal","trash"]}),(0,a.Lk)("span",kt,(0,s.v_)(e.$t("Delete article")),1)]),_:1},8,["loading","onClick"])])],64))])}i(61701);var ft={name:"WebsiteAdminArticleEdit",components:{WebsitePagePreview:ue,WebsiteImagePicker:he.A},mixins:[fe],props:{uuid:{type:String,default:null},categories:{type:Array,default:()=>[]},publishEntry:{type:Object,default:null},isPublishing:{type:Boolean,default:!1}},emits:["deleted","publish","saved","state-change"],data(){return{form:{title:"",slug:"",excerpt:"",category:"",coverImage:null,status:"PUBLISHED",publishedAt:null,blocks:[],seoTitle:"",seoDescription:""},errors:{},initial:null,isLoading:!1,isSaving:!1,isDeleting:!1}},computed:{isNew(){return!this.uuid},canSave(){return""!==this.form.title.trim()},canPreview(){return!this.isNew&&!!this.form.slug},state(){return{...this.publishEntry||{},status:this.form.status,publishedAt:this.form.publishedAt}},isDirty(){return null!==this.initial&&this.initial!==JSON.stringify(this.form)},editorState(){return{title:this.isNew?this.$t("New article"):this.form.title||this.$t("Untitled article"),state:this.isNew?null:this.state,canPreview:this.canPreview,canSave:this.canSave,isDirty:this.isDirty,isSaving:this.isSaving}},isDraft:{get(){return"PUBLISHED"!==this.form.status},set(e){this.form.status=e?"DRAFT":"PUBLISHED"}},categoryOptions(){const e=this.categories.map(e=>e.name),t=(this.form.category||"").trim();return t&&!e.includes(t)?[...e,t]:e},publishedAt:{get(){return this.form.publishedAt?new Date(this.form.publishedAt):null},set(e){this.form.publishedAt=e?e.toISOString():null}}},watch:{editorState:{immediate:!0,handler(e){this.$emit("state-change",e)}}},created(){this.isNew&&this.$nextTick(()=>this.$refs.titleInput?.focus()),this.isNew?this.initial=JSON.stringify(this.form):this.fetchArticle()},methods:{fetchArticle(){this.isLoading=!0,this.$http.plain.get(`/website_articles/${this.uuid}`).then(e=>{const t=e.data;
1this.form={title:t.title||"",slug:t.slug||"",excerpt:t.excerpt||"",category:t.category||"",coverImage:t.coverImage||null,status:t.status||"DRAFT",publishedAt:t.publishedAt||null,blocks:t.blocks||[],seoTitle:t.seoTitle||"",seoDescription:t.seoDescription||""},this.initial=JSON.stringify(this.form)}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Could not load the article"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},save(){if(this.errors={},!this.form.title.trim())return void(this.errors.title=this.$t("An article needs a title."));const e=(this.form.category||"").trim(),{blocks:t,...i}=this.form,a={...i,category:e},s=["LIVE","STALE","WITHDRAWING"].includes(this.publishEntry?.publishState);this.isSaving=!0;const l=this.isNew?this.$http.plain.post("/website_articles",a):this.$http.plain.patch(`/website_articles/${this.uuid}`,a);l.then(t=>{this.announceSave(t.data,s),this.form.category=e,this.$emit("saved",t.data),this.isNew?this.$router.replace({name:"WebsiteAdminArticleEdit",params:{uuid:t.data.uuid}}):(this.form.slug=t.data.slug,this.form.status=t.data.status,this.form.publishedAt=t.data.publishedAt||null,this.form.blocks=t.data.blocks||[],this.initial=JSON.stringify(this.form))}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the article"),type:"is-danger",duration:6e3})}).finally(()=>{this.isSaving=!1})},announceSave(e,t){const i="PUBLISHED"===e.status;let a;a=i&&t?this.$t("Saved. Your website shows the version you last published."):i?this.$t("Saved. It is not on your website until you publish."):t?this.$t("Saved as a draft â but it is still on your website until you publish."):this.$t("Saved as a draft. It stays off your website.");const s=i||t;this.$buefy.snackbar.open({message:a,type:"is-success",duration:6e3,actionText:s?this.$t("Publish live"):this.$t("OK"),onAction:()=>{s&&!this.isPublishing&&this.$emit("publish")}})},openArticle(e){if(!this.canPreview)return;const t=this.$router.resolve({name:"WebsiteArticle",params:{slug:this.form.slug},query:e?{edit:"1"}:{}});window.open(t.href,"_blank","noopener")},confirmRemove(){this.$buefy.dialog.confirm({title:this.$t("Delete article"),message:this.$t("This article will be removed from your website. Links to it will stop working."),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>this.remove()})},remove(){this.isDeleting=!0,this.$http.plain.delete(`/website_articles/${this.uuid}`).then(()=>{this.$buefy.snackbar.open({message:this.$t("Article deleted"),type:"is-success"}),this.$emit("deleted",this.uuid)}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not delete the article"),type:"is-danger",duration:6e3})}).finally(()=>{this.isDeleting=!1})}}};const vt=(0,de.A)(ft,[["render",yt],["__scopeId","data-v-3afbd43f"]]);var wt=vt,_t={name:"WebsiteAdminArticles",components:{WebsiteAdminArticleEdit:wt,ItemViewModal:$e.A},mixins:[fe],props:{publishArticles:{type:Array,default:()=>[]},isPublishing:{type:Boolean,default:!1}},emits:["changed","publish"],data(){return{articles:[],categories:[],editorState:{title:""},isLoading:!1}},computed:{isEditing(){return["WebsiteAdminArticleCreate","WebsiteAdminArticleEdit"].includes(this.$route.name)},editingUuid(){return this.$route.params.uuid||null},hasCategories(){return this.categories.length>0||this.articles.some(e=>!!e.category)},editingEntry(){const e=this.articles.find(e=>e.uuid===this.editingUuid);return e&&this.publishArticles.find(t=>t.slug===e.slug)||null}},created(){this.fetchArticles(),this.fetchCategories()},methods:{fetchArticles(){this.isLoading=!0,this.$http.plain.get("/website_articles").then(e=>{this.articles=e.data["hydra:member"]||e.data["member"]||[]}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},fetchCategories(){this.$http.plain.get("/website-article-categories").then(e=>{this.categories=e.data.categories||[]}).catch(e=>{console.log(e)})},stateOf(e){return{...this.publishArticles.find(t=>t.slug===e.slug)||{},status:e.status,publishedAt:e.publishedAt}},create(){this.$router.push({name:"WebsiteAdminArticleCreate"})},triggerSave(){this.$refs.editor?.save()},triggerOpen(e){this.$refs.editor?.openArticle(e)},requestClose(){this.editorState.isDirty?this.$buefy.dialog.confirm({title:this.$t("Unsaved Changes"),message:this.$t("You have unsaved changes that will be lost. Are you sure you want to leave?"),confirmText:this.$t("Leave"),cancelText:this.$t("Stay"),type:"is-danger",hasIcon:!0,onConfirm:()=>this.closeEditor()}):this.closeEditor()},edit(e){e.uuid!==this.editingUuid&&this.$router.push({name:"WebsiteAdminArticleEdit",params:{uuid:e.uuid}})},closeEditor(){this.$router.push({name:"WebsiteAdmin"})},publicUrl(e){return this.$router.resolve({name:"WebsiteArticle",params:{slug:e.slug}}).href},onArticleSaved(){this.fetchArticles(),this.fetchCategories(),this.$emit("changed")},onArticleDeleted(){this.closeEditor(),this.fetchArticles(),this.fetchCategories(),this.$emit("changed")},promptCreate(){this.$buefy.dialog.prompt({title:this.$t("New category"),message:this.$t("Articles can be filed under it straight away, from the editor."),inputAttrs:{maxlength:60,required:!0},confirmText:this.$t("Add"),cancelText:this.$t("Cancel"),trapFocus:!0,onConfirm:e=>
1this.saveCategory(this.$http.plain.post("/website-article-categories",{name:(e||"").trim()}),"Category added")})},promptRename(e){this.$buefy.dialog.prompt({title:this.$t("Rename category"),message:this.$t("This changes the category on every article filed under it."),inputAttrs:{value:e.name,maxlength:60,required:!0},confirmText:this.$t("Rename"),cancelText:this.$t("Cancel"),trapFocus:!0,onConfirm:t=>{const i=(t||"").trim();""!==i&&i!==e.name&&this.saveCategory(this.$http.plain.patch("/website-article-categories",{from:e.name,to:i}),"Category renamed")}})},confirmDelete(e){this.$buefy.dialog.confirm({title:this.$t("Delete category"),message:e.count?this.$t("{count} articles are filed under this. They will stay, without a category.",{count:e.count}):this.$t("Nothing is filed under this category."),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>this.saveCategory(this.$http.plain.delete(`/website-article-categories/${encodeURIComponent(e.name)}`),"Category removed")})},saveCategory(e,t){e.then(e=>{this.categories=e.data.categories||[],this.fetchArticles(),this.$emit("changed"),this.$buefy.snackbar.open({message:this.$t(t),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the category"),type:"is-danger",duration:6e3})})}}};const $t=(0,de.A)(_t,[["render",Ge],["__scopeId","data-v-7191dcc3"]]);var Ct=$t;i(29314);const Lt={class:"o-wa-split"},At={class:"o-wa-side"},St=["onClick"],Ft={class:"o-wa-split__body"},Et={class:"o-wa-toolbar"},xt={class:"o-wa-menu__title"},Tt={class:"o-wa-toolbar__hint"},Pt={class:"card p-5"},Wt={key:0,class:"o-wa-empty"},Dt=["onDragstart","onDragover"],Vt=["title"],It={class:"o-wa-menu__label"},Ut={class:"o-wa-menu__target"},Xt={class:"orgo-table-actions o-wa-menu__actions"},Ht=["aria-label","onClick"],Bt=["aria-label","onClick"],Ot=["aria-label","onClick"],Rt=["onDragstart","onDragover"],Nt=["title"],Qt={class:"o-wa-menu__label"},Mt={key:0,class:"o-wa-menu__description"},Kt={class:"o-wa-menu__target"},qt={class:"orgo-table-actions o-wa-menu__actions"},Gt=["aria-label","onClick"],jt=["aria-label","onClick"],zt={key:0,class:"o-wa-menu"},Yt={class:"o-wa-toolbar"},Jt={class:"o-wa-menu__title"},Zt={class:"o-wa-toolbar__hint"},ei={class:"card p-5"},ti={class:"o-wa-subsection"},ii={class:"o-wa-subsection__hint"},ai={class:"columns is-multiline"},si={class:"modal-card"},li={class:"modal-card-head"},oi={class:"modal-card-title"},ni={class:"modal-card-body"},ri={value:"PRIMARY"},di={value:"SECONDARY"},ci={value:"TEXT"},ui={value:"PAGE"},hi={value:"ROUTE"},pi={value:"URL"},bi={value:"ANCHOR"},mi=["value"],gi=["value"],ki={class:"modal-card-foot"};function yi(e,t,i,l,o,n){const r=(0,a.g2)("b-loading"),d=(0,a.g2)("WebsitePublishNotice"),c=(0,a.g2)("b-button"),u=(0,a.g2)("font-awesome-icon"),h=(0,a.g2)("b-tooltip"),p=(0,a.g2)("b-input"),m=(0,a.g2)("b-field"),g=(0,a.g2)("b-select"),k=(0,a.g2)("b-switch"),y=(0,a.g2)("b-modal");return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.bF)(r,{"is-full-page":!1,active:o.isLoading},null,8,["active"]),(0,a.Lk)("div",Lt,[(0,a.Lk)("nav",At,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.panes,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.key,class:(0,s.C4)(["o-wa-side__item",{"is-active":o.activePane===t.key}]),type:"button",onClick:e=>o.activePane=t.key},(0,s.v_)(e.$t(t.label)),11,St))),128))]),(0,a.Lk)("div",Ft,[(0,a.bF)(d,{area:"chrome","changed-areas":i.changedAreas,"dismissed-areas":i.dismissedAreas,"is-publishing":i.isPublishing,onPublish:t[0]||(t[0]=t=>e.$emit("publish")),onDismiss:t[1]||(t[1]=t=>e.$emit("dismiss",t))},null,8,["changed-areas","dismissed-areas","is-publishing"]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.visibleLocations,i=>((0,a.uX)(),(0,a.CE)("div",{key:i.key,class:"o-wa-menu"},[(0,a.Lk)("div",Et,[(0,a.Lk)("div",null,[(0,a.Lk)("h2",xt,(0,s.v_)(e.$t(i.label)),1
1),(0,a.Lk)("p",Tt,(0,s.v_)(e.$t(i.hint)),1)]),!i.max||n.tree(i.key).length<i.max?((0,a.uX)(),(0,a.Wv)(c,{key:0,class:"is-rounded is-primary is-small","icon-left":"plus",onClick:e=>n.openForm(i.key,null)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t(i.addLabel)),1)]),_:2},1032,["onClick"])):(0,a.Q3)("",!0)]),(0,a.Lk)("div",Pt,[n.tree(i.key).length?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("p",Wt,(0,s.v_)(e.$t(i.empty)),1)),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.tree(i.key),(l,o)=>((0,a.uX)(),(0,a.CE)("div",{key:l.uuid,class:"o-wa-menu__group"},[(0,a.Lk)("div",{class:(0,s.C4)(["o-wa-menu__row",{"is-drop-target":n.isDropTarget(i.key,null,o)}]),draggable:"true",onDragstart:e=>n.startDrag(i.key,null,o),onDragover:(0,b.D$)(e=>n.dragOver(i.key,null,o),["prevent"]),onDrop:t[2]||(t[2]=(0,b.D$)((...e)=>n.drop&&n.drop(...e),["prevent"])),onDragend:t[3]||(t[3]=(...e)=>n.endDrag&&n.endDrag(...e))},[(0,a.Lk)("span",{class:"o-wa-menu__handle",title:e.$t("Drag to reorder")},[(0,a.bF)(u,{icon:["fal","grip-dots-vertical"]})],8,Vt),(0,a.Lk)("span",It,(0,s.v_)(l.label),1),"HEADER_ACTIONS"===i.key?((0,a.uX)(),(0,a.CE)("span",{key:0,class:(0,s.C4)(["tag is-rounded",n.styleTag(l).class])},(0,s.v_)(e.$t(n.styleTag(l).label)),3)):(0,a.Q3)("",!0),(0,a.Lk)("span",Ut,(0,s.v_)(n.describe(l)),1),(0,a.Lk)("div",Xt,["HEADER_ACTIONS"!==i.key?((0,a.uX)(),(0,a.Wv)(h,{key:0,label:e.$t("Add submenu entry"),position:"is-left","append-to-body":""},{default:(0,a.k6)(()=>[(0,a.Lk)("button",{class:"orgo-table-action-btn","aria-label":e.$t("Add submenu entry"),onClick:e=>n.openForm(i.key,l)},[(0,a.bF)(u,{icon:["fal","diagram-subtask"]})],8,Ht)]),_:2},1032,["label"])):(0,a.Q3)("",!0),(0,a.Lk)("button",{class:"orgo-table-action-btn","aria-label":e.$t("Edit"),onClick:e=>n.editItem(l)},[(0,a.bF)(u,{icon:["fal","pen"]})],8,Bt),(0,a.Lk)("button",{class:"orgo-table-action-btn is-danger","aria-label":e.$t("Delete"),onClick:e=>n.confirmRemove(l)},[(0,a.bF)(u,{icon:["fal","trash"]})],8,Ot)])],42,Dt),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(l.children,(o,r)=>((0,a.uX)(),(0,a.CE)("div",{key:o.uuid,class:(0,s.C4)(["o-wa-menu__row is-child",{"is-drop-target":n.isDropTarget(i.key,l.uuid,r)}]),draggable:"true",onDragstart:e=>n.startDrag(i.key,l.uuid,r),onDragover:(0,b.D$)(e=>n.dragOver(i.key,l.uuid,r),["prevent"]),onDrop:t[4]||(t[4]=(0,b.D$)((...e)=>n.drop&&n.drop(...e),["prevent"])),onDragend:t[5]||(t[5]=(...e)=>n.endDrag&&n.endDrag(...e))},[(0,a.Lk)("span",{class:"o-wa-menu__handle",title:e.$t("Drag to reorder")},[(0,a.bF)(u,{icon:["fal","grip-dots-vertical"]})],8,Nt),(0,a.Lk)("span",Qt,(0,s.v_)(o.label),1),o.description?((0,a.uX)(),(0,a.CE)("span",Mt,(0,s.v_)(o.description),1)):(0,a.Q3)("",!0),(0,a.Lk)("span",Kt,(0,s.v_)(n.describe(o)),1),(0,a.Lk)("div",qt,[(0,a.Lk)("button",{class:"orgo-table-action-btn","aria-label":e.$t("Edit"),onClick:e=>n.editItem(o)},[(0,a.bF)(u,{icon:["fal","pen"]})],8,Gt),(0,a.Lk)("button",{class:"orgo-table-action-btn is-danger","aria-label":e.$t("Delete"),onClick:e=>n.confirmRemove(o)},[(0,a.bF)(u,{icon:["fal","trash"]})],8,jt)])],42,Rt))),128))]))),128))])]))),128)),"footer"===o.activePane?((0,a.uX)(),(0,a.CE)("div",zt,[(0,a.Lk)("div",Yt,[(0,a.Lk)("div",null,[(0,a.Lk)("h2",Jt,(0,s.v_)(e.$t("Footer content")),1),(0,a.Lk)("p",Zt,(0,s.v_)(e.$t("The line under your logo and the social links, shown at the bottom of every page.")),1)])]),(0,a.Lk)("div",ei,[(0,a.bF)(m,{label:e.$t("Tagline")},{default:(0,a.k6)(()=>[(0,a.bF)(p,{modelValue:o.settings.footer.tagline,"onUpdate:modelValue":t[6]||(t[6]=e=>o.settings.footer.tagline=e),maxlength:"200","has-counter":!1},null,8,["modelValue"])]),_:1},8,["label"]),(0,a.Lk)("h3",ti,(0,s.v_)(e.$t("Social media")),1),(0,a.Lk)("p",ii,(0,s.v_)(e.$t("These are your organisation's links. Changing them here changes them everywhere in Orgo.")),1),(0,a.Lk)("div",ai,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.socialNetworks,e=>((0,a.uX)(),(0,a.CE)("div",{key:e.network,class:"column is-12-mobile is-6-tablet"},[(0,a.bF)(m,{label:e.label},{default:(0,a.k6)(()=>[(0,a.bF)(p,{modelValue:o.social[e.network],"onUpdate:modelValue":t=>o.social[e.network]=t,placeholder:"https://"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]))),128))]),(0,a.bF)(c,{class:"is-rounded is-primary",loading:o.isSavingFooter,onClick:n.saveFooter},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"])])])):(0,a.Q3)("",!0)])]),(0,a.bF)(y,{modelValue:o.isFormOpen,"onUpdate:modelValue":t[17]||(t[17]=e=>o.isFormOpen=e),"has-modal-card":"","can-cancel":["escape","outside"]},{default:(0,a.k6)(()=>[(0,a.Lk)("div",si,[(0,a.Lk)("header",li,[(0,a.Lk)("p",oi,(0,s.v_)(n.formTitle),1)]),(0,a.Lk)("section",ni,[(0,a.bF)(m,{label:e.$t("Label")},{default:(0,a.k6)(()=>[(0,a.bF)(p,{ref:"labelInput",modelValue:o.form.label,"onUpdate:modelValue":t[7]||(t[7]=e=>o.form.label=e),maxlength:"120"},null,8,["modelValue"])]),_:1},8,["label"]),"HEADER_ACTIONS"===o.form.location?((0,a.uX)(),(0,a.Wv)(m,{key:0,label:e.$t("Style")},{default:(0,a.k6)(()=>[(0,a.bF)(g,{modelValue:o.form.style,"onUpdate:modelValue":t[8]||(t[8]=e=>o.form.style=e),expanded:""},{default:(0,a.k6)(()=>
1[(0,a.Lk)("option",ri,(0,s.v_)(e.$t("Primary button")),1),(0,a.Lk)("option",di,(0,s.v_)(e.$t("Secondary button")),1),(0,a.Lk)("option",ci,(0,s.v_)(e.$t("Text link (no background)")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):(0,a.Q3)("",!0),n.isSubmenuEntry?((0,a.uX)(),(0,a.Wv)(m,{key:1,label:e.$t("Description"),message:e.$t("One line under the label in the submenu. Optional.")},{default:(0,a.k6)(()=>[(0,a.bF)(p,{modelValue:o.form.description,"onUpdate:modelValue":t[9]||(t[9]=e=>o.form.description=e),maxlength:"160"},null,8,["modelValue"])]),_:1},8,["label","message"])):(0,a.Q3)("",!0),(0,a.bF)(m,{label:e.$t("Links to")},{default:(0,a.k6)(()=>[(0,a.bF)(g,{modelValue:o.form.linkType,"onUpdate:modelValue":t[10]||(t[10]=e=>o.form.linkType=e),expanded:""},{default:(0,a.k6)(()=>[(0,a.Lk)("option",ui,(0,s.v_)(e.$t("A page of my website")),1),(0,a.Lk)("option",hi,(0,s.v_)(e.$t("A built-in page")),1),(0,a.Lk)("option",pi,(0,s.v_)(e.$t("An external address")),1),(0,a.Lk)("option",bi,(0,s.v_)(e.$t("A section of the homepage")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),"PAGE"===o.form.linkType?((0,a.uX)(),(0,a.Wv)(m,{key:2,label:e.$t("Page")},{default:(0,a.k6)(()=>[(0,a.bF)(g,{modelValue:o.form.page,"onUpdate:modelValue":t[11]||(t[11]=e=>o.form.page=e),expanded:""},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(o.pages,e=>((0,a.uX)(),(0,a.CE)("option",{key:e["@id"],value:e["@id"]},(0,s.v_)(e.title),9,mi))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])):"ROUTE"===o.form.linkType?((0,a.uX)(),(0,a.Wv)(m,{key:3,label:e.$t("Destination")},{default:(0,a.k6)(()=>[(0,a.bF)(g,{modelValue:o.form.url,"onUpdate:modelValue":t[12]||(t[12]=e=>o.form.url=e),expanded:""},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.allowedRoutes,t=>((0,a.uX)(),(0,a.CE)("option",{key:t.value,value:t.value},(0,s.v_)(e.$t(t.label)),9,gi))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])):"URL"===o.form.linkType?((0,a.uX)(),(0,a.Wv)(m,{key:4,label:e.$t("Address")},{default:(0,a.k6)(()=>[(0,a.bF)(p,{modelValue:o.form.url,"onUpdate:modelValue":t[13]||(t[13]=e=>o.form.url=e),placeholder:"https://"},null,8,["modelValue"])]),_:1},8,["label"])):((0,a.uX)(),(0,a.Wv)(m,{key:5,label:e.$t("Section id"),message:e.$t("For example: about, events, donate, newsletter.")},{default:(0,a.k6)(()=>[(0,a.bF)(p,{modelValue:o.form.url,"onUpdate:modelValue":t[14]||(t[14]=e=>o.form.url=e)},null,8,["modelValue"])]),_:1},8,["label","message"])),(0,a.bF)(k,{modelValue:o.form.isActive,"onUpdate:modelValue":t[15]||(t[15]=e=>o.form.isActive=e)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Visible on the website")),1)]),_:1},8,["modelValue"])]),(0,a.Lk)("footer",ki,[(0,a.bF)(c,{class:"is-rounded",onClick:t[16]||(t[16]=e=>o.isFormOpen=!1)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Cancel")),1)]),_:1}),(0,a.bF)(c,{class:"is-rounded is-primary",loading:o.isSaving,onClick:n.submit},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"])])])]),_:1},8,["modelValue"])])}i(7588);var fi=i(93811);const vi={key:0,class:"o-wa-notice"},wi={class:"o-wa-notice__icon"},_i={class:"o-wa-notice__text"},$i={class:"o-wa-notice__actions"};function Ci(e,t,i,l,o,n){const r=(0,a.g2)("font-awesome-icon"),d=(0,a.g2)("b-button");return n.isPending&&!n.isDismissed?((0,a.uX)(),(0,a.CE)("div",vi,[(0,a.Lk)("span",wi,[(0,a.bF)(r,{icon:["fal","cloud-arrow-up"]})]),(0,a.Lk)("p",_i,(0,s.v_)(e.$t("Saved here, but not on your website yet. Publishing rebuilds every page with this change.")),1),(0,a.Lk)("div",$i,[(0,a.bF)(d,{class:"is-rounded is-small is-primary",loading:i.isPublishing,disabled:i.isPublishing,onClick:t[0]||(t[0]=t=>e.$emit("publish"))},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Publish live")),1)]),_:1},8,["loading","disabled"]),(0,a.bF)(d,{class:"is-rounded is-small is-ghost o-wa-notice__later",onClick:t[1]||(t[1]=t=>e.$emit("dismiss",i.area))},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Ok, I'll do it later")),1)]),_:1})])])):(0,a.Q3)("",!0)}var Li={name:"WebsitePublishNotice",props:{area:{type:String,required:!0},changedAreas:{type:Array,default:()=>[]},dismissedAreas:{type:Array,default:()=>[]},isPublishing:{type:Boolean,default:!1}},emits:["publish","dismiss"],computed:{isPending(){return this.changedAreas.includes(this.area)},isDismissed(){return this.dismissedAreas.includes(this.area)}}};const Ai=(0,de.A)(Li,[["render",Ci],["__scopeId","data-v-b5fcb858"]]);var Si=Ai;const Fi=3,Ei=[{value:"Register",label:"Become a member"},{value:"Login",label:"Login"},{value:"EventsPublic",label:"Events"},{value:"ChaptersPublic",label:"Chapters"},{value:"WebsiteArticles",label:"News"},{value:"RegisterNewsletter",label:"Newsletter"},{value:"Adhesion",label:"Membership application"}];var xi={name:"WebsiteAdminMenu",components:{WebsitePublishNotice:Si},props:{changedAreas:{type:Array,default:()=>[]},dismissedAreas:{type:Array,default:()=>[]},isPublishing:{type:Boolean,default:!1}},emits:["changed","publish","dismiss"],data(){return{items:[],pages:[],activePane:"header",drag:null,isLoading:!1,isSaving:!1,isSavingFooter:!1,settings:{footer:{tagline:null}},social:{},isFormOpen:!1,editing:null,form:this.emptyForm()}},computed:{locations(){return[{key:"HEADER",label:"Header menu",hint:"Shown at the top of every page. Entries can have a submenu.",addLabel:"Add entry",empty:"No entries yet."},{key:"HEADER_ACTIONS",label:"Header buttons",hint:"The buttons at the right of the header. At most three, no submenus.",addLabel:"Add button",empty:"No buttons yet â the header shows Login and Become a member. Adding a button replaces both.",max:Fi},{key:"FOOTER",label:"Footer menu",hint:"Shown at the bottom. An entry with children becomes a column.",addLabel:"Add entry",empty:"No entries yet."}]},panes(){return[{key:"header",label:"Header"},{key:"footer",label:"Footer"}]},visibleLocations(){const e="header"===this.activePane?["HEADER","HEADER_ACTIONS"]:["FOOTER"];return this.locations.filter(t=>e.includes(t.key))},socialNetworks(){return fi._},allowedRoutes(){return Ei},isSubmenuEntry(){return"HEADER"===this.form.location&&(this.editing?!!this.editing.parentUuid:!!this.form.parent)},formTitle(){return"HEADER_ACTIONS"===this.form.location?this.editing?this.$t("Edit button"):this.$t("Add button"):this.editing?this.$t("Edit entry"):this.$t("Add entry")}}
1,created(){this.fetchAll(),this.fetchFooterContent()},methods:{fetchFooterContent(){this.$http.plain.get("/website-settings").then(e=>{this.settings=e.data.settings,this.social={...e.data.settings.social}}).catch(e=>{console.log(e)})},saveFooter(){this.isSavingFooter=!0,this.$http.plain.patch("/website-settings",{...this.settings,social:this.social}).then(e=>{this.settings=e.data.settings,this.social={...e.data.settings.social},this.$emit("changed"),this.$buefy.snackbar.open({message:this.$t("Website settings saved"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the settings"),type:"is-danger",duration:6e3})}).finally(()=>{this.isSavingFooter=!1})},emptyForm(){return{label:"",description:null,linkType:"PAGE",page:null,url:null,style:"PRIMARY",isActive:!0,location:"HEADER",parent:null}},fetchAll(){this.isLoading=!0,Promise.all([this.$http.plain.get("/website_menu_items"),this.$http.plain.get("/website_pages")]).then(([e,t])=>{this.items=e.data["hydra:member"]||e.data["member"]||[],this.pages=t.data["hydra:member"]||t.data["member"]||[]}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},tree(e){const t=this.items.filter(t=>t.location===e),i=t.filter(e=>!e.parentUuid).sort((e,t)=>e.position-t.position);return i.map(e=>({...e,children:t.filter(t=>t.parentUuid===e.uuid).sort((e,t)=>e.position-t.position)}))},styleTag(e){return"TEXT"===e.style?{class:"is-light",label:"Text link"}:"SECONDARY"===e.style?{class:"is-light",label:"Secondary button"}:{class:"is-primary",label:"Primary button"}},describe(e){return"PAGE"===e.linkType?e.page?.slug?`/${e.page.slug}`:this.$t("Page removed"):"ROUTE"===e.linkType?this.$t(Ei.find(t=>t.value===e.url)?.label||e.url):"ANCHOR"===e.linkType?`#${e.url}`:e.url},focusLabel(){this.$nextTick(()=>this.$refs.labelInput?.focus())},openForm(e,t){this.editing=null,this.form={...this.emptyForm(),location:e,parent:t?t["@id"]:null},this.isFormOpen=!0,this.focusLabel()},editItem(e){this.editing=e,this.form={label:e.label,description:e.description||null,linkType:e.linkType,page:e.page?.["@id"]||null,url:e.url||null,style:e.style||"PRIMARY",isActive:e.isActive,location:e.location,parent:null},this.isFormOpen=!0},submit(){const e={label:this.form.label,description:this.isSubmenuEntry&&this.form.description||null,linkType:this.form.linkType,location:this.form.location,style:this.form.style,isActive:this.form.isActive,page:"PAGE"===this.form.linkType?this.form.page:null,url:"PAGE"===this.form.linkType?null:this.form.url};!this.editing&&this.form.parent&&(e.parent=this.form.parent),this.isSaving=!0;const t=this.editing?this.$http.plain.patch(`/website_menu_items/${this.editing.uuid}`,e):this.$http.plain.post("/website_menu_items",e);t.then(()=>{this.isFormOpen=!1,this.fetchAll(),this.$emit("changed")}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the entry"),type:"is-danger",duration:6e3})}).finally(()=>{this.isSaving=!1})},confirmRemove(e){const t="HEADER_ACTIONS"===e.location;this.$buefy.dialog.confirm({title:t?this.$t("Delete button"):this.$t("Delete entry"),message:t?this.$t("The button will be removed from the header."):this.$t("The entry and any submenu entries under it will be removed."),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>{this.$http.plain.delete(`/website_menu_items/${e.uuid}`).then(()=>{this.fetchAll(),this.$emit("changed")}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Could not delete the entry"),type:"is-danger"})})}})},startDrag(e,t,i){this.drag={location:e,parentUuid:t,from:i,over:i}},dragOver(e,t,i){this.drag&&this.drag.location===e&&this.drag.parentUuid===t&&(this.drag.over=i)},isDropTarget(e,t,i){return Boolean(this.drag)&&this.drag.location===e&&this.drag.parentUuid===t&&this.drag.over===i&&this.drag.over!==this.drag.from},endDrag(){this.drag=null},drop(){const e=this.drag;if(this.drag=null,!e||e.from===e.over)return;const t=this.tree(e.location);if(null===e.parentUuid)return this.reorder(t,e.from,e.over),void this.persistTree(e.location,t);const i=t.find(t=>t.uuid===e.parentUuid);i&&(this.reorder(i.children,e.from,e.over),this.persistTree(e.location,t))},reorder(e,t,i){e.splice(i,0,e.splice(t,1)[0])},persistTree(e,t){const i=[];t.forEach((t,a)=>{i.push({uuid:t.uuid,parentUuid:null,position:a,location:e}
1),t.children.forEach((e,a)=>{i.push({uuid:e.uuid,parentUuid:t.uuid,position:a})})}),this.persistOrder(i)},persistOrder(e){this.$http.plain.post("/website-menu/reorder",{items:e}).then(()=>{this.fetchAll(),this.$emit("changed")}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Could not reorder the menu"),type:"is-danger"}),this.fetchAll()})}}};const Ti=(0,de.A)(xi,[["render",yi],["__scopeId","data-v-44b43a9a"]]);var Pi=Ti;const Wi={class:"o-wa-split"},Di={class:"o-wa-side"},Vi=["onClick"],Ii={class:"o-wa-split__body"},Ui={class:"card p-5 o-wa-card"},Xi={class:"o-wa-hint"},Hi={class:"o-wa-section"},Bi={class:"card p-5 o-wa-card"},Oi={class:"o-wa-address"},Ri=["href"],Ni=["title"],Qi={class:"o-wa-hint"},Mi={key:0,class:"o-wa-host-status__detail"},Ki={value:null},qi=["value"],Gi=["aria-expanded"],ji={class:"o-wa-dns"},zi={class:"orgo-table-wrap"},Yi={class:"table is-fullwidth"},Ji={class:"o-wa-record"},Zi=["title"],ea={key:1,class:"card p-5 o-wa-card"},ta={class:"o-wa-hint o-wa-hint--lead"},ia={class:"o-wa-hint"};function aa(e,t,i,l,o,n){const r=(0,a.g2)("b-loading"),d=(0,a.g2)("WebsitePublishNotice"),c=(0,a.g2)("b-switch"),u=(0,a.g2)("font-awesome-icon"),h=(0,a.g2)("b-field"),p=(0,a.g2)("b-message"),b=(0,a.g2)("b-input"),m=(0,a.g2)("b-select"),g=(0,a.g2)("b-collapse"),k=(0,a.g2)("WebsiteRedirects"),y=(0,a.g2)("WebsiteAdminSaveBar");return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.bF)(r,{"is-full-page":!1,active:e.isLoading},null,8,["active"]),(0,a.Lk)("div",Wi,[(0,a.Lk)("nav",Di,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.panes,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.key,class:(0,s.C4)(["o-wa-side__item",{"is-active":o.activePane===t.key}]),type:"button",onClick:e=>o.activePane=t.key},(0,s.v_)(e.$t(t.label)),11,Vi))),128))]),(0,a.Lk)("div",Ii,[(0,a.bF)(d,{area:o.activePane,"changed-areas":i.changedAreas,"dismissed-areas":i.dismissedAreas,"is-publishing":i.isPublishing,onPublish:t[0]||(t[0]=t=>e.$emit("publish")),onDismiss:t[1]||(t[1]=t=>e.$emit("dismiss",t))},null,8,["area","changed-areas","dismissed-areas","is-publishing"]),"domain"===o.activePane?((0,a.uX)(),(0,a.CE)(a.FK,{key:0},[(0,a.Lk)("div",Ui,[(0,a.bF)(c,{modelValue:e.form.isActive,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.isActive=t)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("My website is live")),1)]),_:1},8,["modelValue"]),(0,a.Lk)("p",Xi,(0,s.v_)(e.$t("While this is off, visitors to your website address see nothing. Your pages stay saved.")),1)]),(0,a.Lk)("h2",Hi,(0,s.v_)(e.$t("Website address")),1),(0,a.Lk)("div",Bi,[e.websiteHostDefault?((0,a.uX)(),(0,a.Wv)(h,{key:0,label:e.$t("Your Orgo website address")},{default:(0,a.k6)(()=>[(0,a.Lk)("div",Oi,[(0,a.Lk)("a",{href:"https://"+e.websiteHostDefault,target:"_blank",rel:"noopener"},(0,s.v_)(e.websiteHostDefault),9,Ri),(0,a.Lk)("button",{class:"o-wa-copy",type:"button",title:e.$t("Copy"),onClick:t[3]||(t[3]=t=>n.copy(e.websiteHostDefault))},[(0,a.bF)(u,{icon:["fal","copy"]})],8,Ni)])]),_:1},8,["label"])):(0,a.Q3)("",!0),e.websiteHostEnvMarker?((0,a.uX)(),(0,a.Wv)(p,{key:1,type:"is-warning","has-icon":"",closable:!1,class:"o-wa-envnote"},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("This is a {marker} environment, so every address it publishes carries that mark. The live website of this organisation is somewhere else and is not touched from here.",{marker:e.websiteHostEnvMarker.replace("-","")})),1)]),_:1})):(0,a.Q3)("",!0),(0,a.Lk)("p",Qi,(0,s.v_)(e.$t("Your website is always reachable here, with or without a domain of your own."))+" "+(0,s.v_)(e.$t("This is not the same as your Orgo address ({appHost}), where your members sign in.",{appHost:e.appHost||"app.orgo.space"})),1),(0,a.bF)(h,{label:e.$t("Your domain"),class:"o-wa-domain",message:e.$t("The address visitors type to reach your website. Point its DNS at Orgo, then save it here.")},{default:(0,a.k6)(()=>[(0,a.bF)(b,{modelValue:e.websiteHost,"onUpdate:modelValue":t[4]||(t[4]=t=>e.websiteHost=t),placeholder:"www.example.org",maxlength:"253","has-counter":!1},null,8,["modelValue"])]),_:1},8,["label","message"]),n.hostStatus?((0,a.uX)(),(0,a.Wv)(p,{key:2,type:n.hostStatus.type,"has-icon":"",closable:!1,class:"o-wa-host-status"},{default:(0,a.k6)(()=>[(0,a.Lk)("p",null,(0,s.v_)(e.$t(n.hostStatus.title)),1),n.hostStatus.detail?((0,a.uX)(),(0,a.CE)("p",Mi,(0,s.v_)(n.hostStatus.detail),1)):(0,a.Q3)("",!0)]),_:1},8,["type"])):(0,a.Q3)("",!0),(0,a.bF)(h,{label:e.$t("Where your website is stored"),class:"o-wa-domain",message:e.$t("Pages load fastest near where they are stored, and this is also where your website's content lives. Takes effect at your next publish.")},{default:(0,a.k6)(()=>[(0,a.bF)(m,{modelValue:e.websiteRegion,"onUpdate:modelValue":t[5]||(t[5]=t=>e.websiteRegion=t),expanded:""},{default:(0,a.k6)(()=>
1[(0,a.Lk)("option",Ki,(0,s.v_)(e.$t("Automatic ({region})",{region:e.$t(n.regionLabel(e.websiteRegionDefault))})),1),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.websiteRegions,t=>((0,a.uX)(),(0,a.CE)("option",{key:t,value:t},(0,s.v_)(e.$t(n.regionLabel(t))),9,qi))),128))]),_:1},8,["modelValue"])]),_:1},8,["label","message"]),(0,a.bF)(g,{modelValue:o.isDnsOpen,"onUpdate:modelValue":t[7]||(t[7]=e=>o.isDnsOpen=e),animation:"slide","aria-id":"websiteDns"},{trigger:(0,a.k6)(t=>[(0,a.Lk)("a",{class:"o-wa-toggle","aria-controls":"websiteDns","aria-expanded":t.open},[(0,a.bF)(u,{icon:["fal",t.open?"chevron-down":"chevron-right"]},null,8,["icon"]),(0,a.eW)(" "+(0,s.v_)(e.$t("How to point your domain here")),1)],8,Gi)]),default:(0,a.k6)(()=>[(0,a.Lk)("div",ji,[(0,a.Lk)("p",null,(0,s.v_)(e.$t("Add this record with whoever manages your domain name:")),1),(0,a.Lk)("div",zi,[(0,a.Lk)("table",Yi,[(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[(0,a.Lk)("th",null,(0,s.v_)(e.$t("Type")),1),(0,a.Lk)("th",null,(0,s.v_)(e.$t("Name")),1),(0,a.Lk)("th",null,(0,s.v_)(e.$t("Value")),1)])]),(0,a.Lk)("tbody",null,[(0,a.Lk)("tr",null,[t[10]||(t[10]=(0,a.Lk)("td",null,"CNAME",-1)),(0,a.Lk)("td",null,(0,s.v_)(n.recordName),1),(0,a.Lk)("td",Ji,[(0,a.eW)((0,s.v_)(n.cnameTarget)+" ",1),(0,a.Lk)("button",{class:"o-wa-copy",type:"button",title:e.$t("Copy"),onClick:t[6]||(t[6]=e=>n.copy(n.cnameTarget))},[(0,a.bF)(u,{icon:["fal","copy"]})],8,Zi)])])])])]),(0,a.Lk)("p",null,(0,s.v_)(e.$t("For a bare domain such as example.org, use an ALIAS or ANAME record with the same value. If your provider does not offer one, move the domain to a provider that does - Cloudflare, Route 53 and DNSimple all do - or point the bare domain at www.")),1),(0,a.Lk)("p",null,(0,s.v_)(e.$t("DNS changes can take a few hours to travel. Your site answers on the new address from your next publish onwards.")),1)])]),_:1},8,["modelValue"])])],64)):"code"===o.activePane?((0,a.uX)(),(0,a.CE)("div",ea,[(0,a.Lk)("p",ta,(0,s.v_)(e.$t("For an analytics snippet, a chat widget, a font, or a few rules of CSS. Added exactly as you write it.")),1),(0,a.Lk)("p",ia,(0,s.v_)(e.$t("This runs on your published website only â not here in the builder, and not in the preview.")),1),(0,a.bF)(h,{label:e.$t("Inside <head>"),message:e.$t("Styles, fonts, verification tags, anything that must load before the page draws.")},{default:(0,a.k6)(()=>[(0,a.bF)(b,{modelValue:e.form.code.head,"onUpdate:modelValue":t[8]||(t[8]=t=>e.form.code.head=t),type:"textarea",rows:"4",maxlength:"8000","has-counter":!1},null,8,["modelValue"])]),_:1},8,["label","message"]),(0,a.bF)(h,{label:e.$t("Before </body>"),message:e.$t("Scripts that should not hold up the page â analytics, chat widgets.")},{default:(0,a.k6)(()=>[(0,a.bF)(b,{modelValue:e.form.code.bodyEnd,"onUpdate:modelValue":t[9]||(t[9]=t=>e.form.code.bodyEnd=t),type:"textarea",rows:"4",maxlength:"8000","has-counter":!1},null,8,["modelValue"])]),_:1},8,["label","message"])])):"redirects"===o.activePane?((0,a.uX)(),(0,a.Wv)(k,{key:2})):(0,a.Q3)("",!0),"redirects"!==o.activePane?((0,a.uX)(),(0,a.Wv)(y,{key:3,"is-saving":e.isSaving,onSave:e.save},null,8,["is-saving","onSave"])):(0,a.Q3)("",!0)])])])}var sa={emits:["saved"],data(){return{form:{isActive:!1,theme:"business",colors:{primary:null,secondary:null,accent:null,surface:null,surfaceAlt:null,text:null,headerBg:null,footerBg:null},typography:{heading:"inter",body:"inter",scale:"normal"},radius:"soft",social:{},header:{menuHover:"background",layout:"logoLeft",sticky:!0,overHero:!1,topBar:{show:!1,text:null,showSocial:!1}},footer:{tagline:null,layout:"simple",showNewsletter:!1,showSocial:!0},seo:{defaultTitle:null,defaultDescription:null,ogImage:null},code:{head:null,bodyEnd:null},articles:{isActive:!1,layout:"standard"}},themes:[],fonts:[],scales:[],headerLayouts:[],footerLayouts:[],articleLayouts:[],warnings:[],websiteHost:null,websiteHostStatus:null,websiteCnameTarget:null,websiteHostDefault:null,websiteHostEnvMarker:null,websiteRegion:null,websiteRegionDefault:null,websiteRegions:[],appHost:null,isLoading:!1,isSaving:!1,savedSnapshot:null}},created(){this.fetchSettings()},computed:{isDirty(){return null!==this.savedSnapshot&&JSON.stringify(this.settingsPayload())!==this.savedSnapshot}},methods:{snapshotSaved(){this.savedSnapshot=JSON.stringify(this.settingsPayload())},settingsPayload(){return this.form}
1,fetchSettings(){this.isLoading=!0,this.$http.plain.get("/website-settings").then(e=>{this.form=e.data.settings,this.themes=e.data.themes||[],this.fonts=e.data.fonts||[],this.scales=e.data.scales||[],this.headerLayouts=e.data.headerLayouts||[],this.footerLayouts=e.data.footerLayouts||[],this.articleLayouts=e.data.articleLayouts||[],this.warnings=e.data.warnings||[],this.websiteHost=e.data.websiteHost||null,this.websiteHostStatus=e.data.websiteHostStatus||null,this.websiteCnameTarget=e.data.websiteCnameTarget||null,this.websiteHostDefault=e.data.websiteHostDefault||null,this.websiteHostEnvMarker=e.data.websiteHostEnvMarker||null,this.websiteRegion=e.data.websiteRegion||null,this.websiteRegionDefault=e.data.websiteRegionDefault||null,this.websiteRegions=e.data.websiteRegions||[],this.appHost=e.data.appHost||null,this.snapshotSaved()}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},save(){this.isSaving=!0,this.$http.plain.patch("/website-settings",this.settingsPayload()).then(e=>{this.form=e.data.settings,this.websiteHost=e.data.websiteHost||null,this.websiteHostStatus=e.data.websiteHostStatus||null,this.warnings=e.data.warnings||[],this.snapshotSaved(),this.$emit("saved",e.data),this.$buefy.snackbar.open({message:this.$t("Website settings saved"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the settings"),type:"is-danger",duration:6e3})}).finally(()=>{this.isSaving=!1})}}};const la={class:"o-wa-savebar"};function oa(e,t,i,l,o,n){const r=(0,a.g2)("b-button");return(0,a.uX)(),(0,a.CE)("div",la,[(0,a.bF)(r,{class:"is-rounded is-primary",loading:i.isSaving,onClick:t[0]||(t[0]=t=>e.$emit("save"))},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(i.label||e.$t("Save")),1)]),_:1},8,["loading"])])}var na={name:"WebsiteAdminSaveBar",props:{isSaving:{type:Boolean,default:!1},label:{type:String,default:null}},emits:["save"]};const ra=(0,de.A)(na,[["render",oa],["__scopeId","data-v-cc3f073a"]]);var da=ra;const ca={class:"o-wa-toolbar"},ua={class:"o-wa-hint"},ha={key:1,class:"o-wa-empty"},pa={key:0,class:"o-wa-empty"},ba={key:1,class:"orgo-table-wrap"},ma={class:"o-wa-path"},ga={class:"o-wa-path"},ka=["title","onClick"],ya=["title","onClick"],fa={key:3,class:"o-wa-hint"},va={class:"modal-card"},wa={class:"modal-card-head"},_a={class:"modal-card-title"},$a={class:"modal-card-body"},Ca={class:"o-wa-tiles"},La=["onClick"],Aa={class:"o-wa-tile__code"},Sa={class:"o-wa-tile__name"},Fa={class:"o-wa-tile__hint"},Ea={class:"modal-card-foot"};function xa(e,t,i,l,o,n){const r=(0,a.g2)("b-loading"),d=(0,a.g2)("b-button"),c=(0,a.g2)("b-input"),u=(0,a.g2)("b-field"),h=(0,a.g2)("b-table-column"),p=(0,a.g2)("font-awesome-icon"),m=(0,a.g2)("b-table"),g=(0,a.g2)("b-modal");return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.bF)(r,{"is-full-page":!1,active:o.isLoading},null,8,["active"]),(0,a.Lk)("div",ca,[(0,a.Lk)("p",ua,(0,s.v_)(e.$t("When a page moves or an address changes, a redirect keeps the old one working â visitors land on the new page instead of an error, and search engines follow.")),1),(0,a.bF)(d,{class:"is-rounded is-primary","icon-left":"plus",disabled:o.redirects.length>=o.max,onClick:t[0]||(t[0]=e=>n.openForm(null))},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Add a redirect")),1)]),_:1},8,["disabled"])]),o.redirects.length>o.searchThreshold?((0,a.uX)(),(0,a.Wv)(u,{key:0,class:"o-wa-search"},{default:(0,a.k6)(()=>[(0,a.bF)(c,{modelValue:o.search,"onUpdate:modelValue":t[1]||(t[1]=e=>o.search=e),type:"search",icon:"magnifying-glass",placeholder:e.$t("Search redirects"),expanded:""},null,8,["modelValue","placeholder"])]),_:1})):(0,a.Q3)("",!0),o.redirects.length||o.isLoading?((0,a.uX)(),(0,a.CE)(a.FK,{key:2},[n.visibleRedirects.length?((0,a.uX)(),(0,a.CE)("div",ba,[(0,a.bF)(m,{data:n.visibleRedirects,"mobile-cards":!1,hoverable:""},{default:(0,a.k6)(()=>[(0,a.bF)(h,{label:e.$t("Old address"),field:"from"},{default:(0,a.k6)(e=>[(0,a.Lk)("span",ma,(0,s.v_)(e.row.from),1)]),_:1},8,["label"]),(0,a.bF)(h,{label:e.$t("Goes to"),field:"to"},{default:(0,a.k6)(e=>[(0,a.Lk)("span",ga,(0,s.v_)(e.row.to),1)]),_:1},8,["label"]),(0,a.bF)(h,{label:e.$t("Type"),field:"code",width:"150px"},{default:(0,a.k6)(t=>[(0,a.Lk)("span",{class:(0,s.C4)(["tag is-rounded",301===t.row.code?"is-info":"is-warning"])},(0,s.v_)(t.row.code)+" · "+(0,s.v_)(301===t.row.code?e.$t("Permanent"):e.$t("Temporary")),3)]
1),_:1},8,["label"]),(0,a.bF)(h,{width:"80px"},{default:(0,a.k6)(i=>[(0,a.Lk)("div",{class:"orgo-table-actions",onClick:t[2]||(t[2]=(0,b.D$)(()=>{},["stop"]))},[(0,a.Lk)("button",{class:"orgo-table-action-btn",title:e.$t("Edit"),onClick:e=>n.openForm(i.row)},[(0,a.bF)(p,{icon:["fal","pen"]})],8,ka),(0,a.Lk)("button",{class:"orgo-table-action-btn is-danger",title:e.$t("Delete"),onClick:e=>n.confirmRemove(i.row)},[(0,a.bF)(p,{icon:["fal","trash"]})],8,ya)])]),_:1})]),_:1},8,["data"])])):((0,a.uX)(),(0,a.CE)("p",pa,(0,s.v_)(e.$t("No redirect matches â{term}â.",{term:o.search})),1))],64)):((0,a.uX)(),(0,a.CE)("p",ha,(0,s.v_)(e.$t("No redirects yet. Add one when you rename a page or move a website here.")),1)),o.redirects.length>=o.max?((0,a.uX)(),(0,a.CE)("p",fa,(0,s.v_)(e.$t("You have reached the limit of {count} redirects.",{count:o.max})),1)):(0,a.Q3)("",!0),(0,a.bF)(g,{modelValue:o.isFormOpen,"onUpdate:modelValue":t[6]||(t[6]=e=>o.isFormOpen=e),"has-modal-card":"","can-cancel":["escape","outside"]},{default:(0,a.k6)(()=>[(0,a.Lk)("div",va,[(0,a.Lk)("header",wa,[(0,a.Lk)("p",_a,(0,s.v_)(o.editing?e.$t("Edit redirect"):e.$t("Add a redirect")),1)]),(0,a.Lk)("section",$a,[(0,a.bF)(u,{label:e.$t("Old address"),message:e.$t("The path visitors still arrive on, such as /our-story. A full address is accepted and shortened to its path.")},{default:(0,a.k6)(()=>[(0,a.bF)(c,{ref:"fromInput",modelValue:o.form.from,"onUpdate:modelValue":t[3]||(t[3]=e=>o.form.from=e),placeholder:"/our-story",maxlength:"512","has-counter":!1},null,8,["modelValue"])]),_:1},8,["label","message"]),(0,a.bF)(u,{label:e.$t("Goes to"),message:e.$t("A page on this website, such as /about â or a full address on another site.")},{default:(0,a.k6)(()=>[(0,a.bF)(c,{modelValue:o.form.to,"onUpdate:modelValue":t[4]||(t[4]=e=>o.form.to=e),placeholder:"/about",maxlength:"512","has-counter":!1},null,8,["modelValue"])]),_:1},8,["label","message"]),(0,a.bF)(u,{label:e.$t("Type")},{default:(0,a.k6)(()=>[(0,a.Lk)("div",Ca,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.codeOptions,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.value,type:"button",class:(0,s.C4)(["o-wa-tile",{"is-selected":o.form.code===t.value}]),onClick:e=>o.form.code=t.value},[(0,a.Lk)("span",Aa,(0,s.v_)(t.value),1),(0,a.Lk)("span",Sa,(0,s.v_)(e.$t(t.label)),1),(0,a.Lk)("span",Fa,(0,s.v_)(e.$t(t.hint)),1)],10,La))),128))])]),_:1},8,["label"])]),(0,a.Lk)("footer",Ea,[(0,a.bF)(d,{class:"is-rounded",onClick:t[5]||(t[5]=e=>o.isFormOpen=!1)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Cancel")),1)]),_:1}),(0,a.bF)(d,{class:"is-rounded is-primary",loading:o.isSaving,onClick:n.save},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"])])])]),_:1},8,["modelValue"])])}var Ta={name:"WebsiteRedirects",emits:["changed"],data(){return{redirects:[],max:500,isLoading:!1,isSaving:!1,isFormOpen:!1,editing:null,search:"",searchThreshold:10,form:{from:"",to:"",code:301}}},computed:{visibleRedirects(){const e=this.search.trim().toLowerCase();return e?this.redirects.filter(t=>`${t.from} ${t.to}`.toLowerCase().includes(e)):this.redirects},codeOptions(){return[{value:301,label:"Permanent",hint:"The page has moved for good. Search engines pass its ranking on."},{value:302,label:"Temporary",hint:"Only for now. The old address keeps its ranking and stays the real one."}]}},created(){this.fetchRedirects()},methods:{fetchRedirects(){this.isLoading=!0,this.$http.plain.get("/website-redirects").then(e=>{this.redirects=e.data.redirects||[],this.max=e.data.max||this.max}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},openForm(e){this.editing=e,this.form=e?{from:e.from,to:e.to,code:e.code}:{from:"",to:"",code:301},this.isFormOpen=!0,this.$nextTick(()=>{this.$refs.fromInput?.focus()})},save(){this.isSaving=!0;const e=this.editing?this.$http.plain.patch(`/website-redirects/${this.editing.uuid}`,this.form):this.$http.plain.post("/website-redirects",this.form);e.then(()=>{this.isFormOpen=!1,this.$buefy.snackbar.open({message:this.$t("Redirect saved"),type:"is-success"}),this.fetchRedirects(),this.$emit("changed")}
1).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not save the redirect"),type:"is-danger",duration:6e3})}).finally(()=>{this.isSaving=!1})},confirmRemove(e){this.$buefy.dialog.confirm({title:this.$t("Delete redirect"),message:this.$t("Visitors arriving on {path} will get an error page instead.",{path:e.from}),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>this.remove(e)})},remove(e){this.$http.plain.delete(`/website-redirects/${e.uuid}`).then(()=>{this.$buefy.snackbar.open({message:this.$t("Redirect deleted"),type:"is-success"}),this.fetchRedirects(),this.$emit("changed")}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Could not delete the redirect"),type:"is-danger"})})}}};const Pa=(0,de.A)(Ta,[["render",xa],["__scopeId","data-v-b07c3908"]]);var Wa=Pa;const Da={eeur:"Eastern Europe",weur:"Western Europe",enam:"Eastern North America",wnam:"Western North America"};function Va(e){return Da[e]||Da.weur}var Ia={name:"WebsiteAdminSettings",components:{WebsiteImagePicker:he.A,WebsiteAdminSaveBar:da,WebsiteRedirects:Wa,WebsitePublishNotice:Si},mixins:[sa],props:{changedAreas:{type:Array,default:()=>[]},dismissedAreas:{type:Array,default:()=>[]},isPublishing:{type:Boolean,default:!1}},emits:["publish","dismiss"],data(){return{isDnsOpen:!1,activePane:"domain"}},computed:{panes(){return[{key:"domain",label:"Domain"},{key:"code",label:"Custom code"},{key:"redirects",label:"Redirects"}]},cnameTarget(){return this.websiteCnameTarget||this.websiteHostDefault},hostStatus(){if(!this.websiteHost||!this.websiteHostStatus)return null;const{state:e,detail:t}=this.websiteHostStatus,i={active:{type:"is-success",title:"This domain is live. Visitors reach your website here over a secure connection."},pending:{type:"is-info",title:"Setting up the secure certificate for this domain. This usually takes a few minutes once the DNS record is in place."},blocked:{type:"is-warning",title:"This domain is not reaching Orgo yet. Check the DNS record below with whoever manages the domain name."},error:{type:"is-danger",title:"We could not set this domain up. It will be retried; contact support if it stays this way."}};return i[e]?{...i[e],detail:t||null}:null},recordName(){const e=(this.websiteHost||"").trim();return!e||e.split(".").length<3?e?"@":"www":e.split(".")[0]}},methods:{settingsPayload(){return{...this.form,websiteHost:this.websiteHost,websiteRegion:this.websiteRegion}},regionLabel(e){return Va(e)},copy(e){e&&navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-success"})}).catch(e=>{console.log(e)})}}};const Ua=(0,de.A)(Ia,[["render",aa],["__scopeId","data-v-418b54a1"]]);var Xa=Ua;const Ha={class:"o-wa-design"},Ba={class:"o-wa-design__bar"},Oa={class:"o-wa-side o-wa-side--row"},Ra=["onClick"],Na={class:"o-wa-design__bar-actions"},Qa=["href"],Ma={class:"o-wa-design__body"},Ka={class:"o-wa-design__preview"},qa={class:"o-wa-design__panel"},Ga={key:0,class:"card p-5 o-wa-card o-wa-style"},ja={class:"o-wa-style__title"},za={class:"o-wa-style__hint"},Ya={class:"columns is-multiline o-wa-theme-options"},Ja={class:"column is-12-mobile is-6-tablet"},Za={class:"o-wa-color"},es=["value"],ts=["aria-label"],is={class:"column is-12-mobile is-6-tablet"},as={class:"o-wa-color"},ss=["value"],ls=["aria-label"],os={class:"column is-12"},ns={class:"o-wa-tiles"},rs=["onClick"],ds={class:"column is-12"},cs={class:"o-wa-tiles"},us=["onClick"],hs={class:"o-wa-more"},ps=["aria-expanded"],bs={key:0,class:"columns is-multiline o-wa-theme-options"},ms={class:"column is-12-mobile is-6-tablet"},gs={class:"column is-12-mobile is-6-tablet"},ks={class:"o-wa-color"},ys=["value","onInput"],fs=["aria-label","onClick"],vs={class:"column is-12-mobile is-6-tablet"},ws=["value"],_s={class:"column is-12-mobile is-6-tablet"},$s=["value"],Cs={key:0,class:"column is-12-mobile is-6-tablet"},Ls=["value"],As={class:"column is-12"},Ss={key:0,class:"o-wa-warnings"};function Fs(e,t,i,l,o,n){const r=(0,a.g2)("b-loading"),d=(0,a.g2)("font-awesome-icon"),c=(0,a.g2)("b-button"),u=(0,a.g2)("WebsitePublishNotice"),h=(0,a.g2)("WebsiteTemplatePicker"),p=(0,a.g2)("WebsiteDesignPreview"),m=(0,a.g2)("WebsiteStylePicker"),g=(0,a.g2)("b-input"),k=(0,a.g2)("b-tooltip"),y=(0,a.g2)("b-field"),f=(0,a.g2)("b-dropdown-item"),v=(0,a.g2)("b-dropdown"),w=(0,a.g2)("b-select"),_=(0,a.g2)("b-switch");return(0,a.uX)(),(0,a.CE)("div",Ha,[(0,a.bF)(r,{"is-full-page":!1,active:e.isLoading},null,8,["active"]),(0,a.Lk)("div",Ba,[(0,a.Lk)("nav",Oa,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.panes,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.key,type:"button",class:(0,s.C4)(["o-wa-side__item",{"is-active":o.activePane===t.key}]),onClick:e=>o.activePane=t.key},(0,s.v_)(e.$t(t.label)),11,Ra))),128))]),(0,a.Lk)("div",Na,["templates"===o.activePane&&n.demoHref?((0,a.uX)(),(0,a.CE)("a",{key:0,class:"button is-rounded o-wa-demo",href:n.demoHref,target:"_blank",rel:"noopener"},[(0,a.bF)(d,{icon:["fal","arrow-up-right-from-square"]}),(0,a.Lk)("span",null,(0,s.v_)(e.$t("View demo website")),1)],8,Qa)):(0,a.Q3)("",!0),"theme"===o.activePane&&(e.isDirty||o.themeTouched)?((0,a.uX)(),(0,a.Wv)(c,{key:1,class:"is-rounded is-primary",loading:e.isSaving,onClick:n.saveTheme},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"])):(0,a.Q3)("",!0),"templates"===o.activePane?((0,a.uX)(),(0,a.Wv)(c,{key:2,class:"is-rounded is-primary",loading:!!o.applyingKey,disabled:!o.selectedTemplate,onClick:n.confirmApply},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t(n.applyLabel)),1)]),_:1},8,["loading","disabled","onClick"])):(0,a.Q3)("",!0)])]),(0,a.bF)(u,{area:"design","changed-areas":i.changedAreas,"dismissed-areas":i.dismissedAreas,"is-publishing":i.isPublishing,onPublish:t[0]||(t[0]=t=>e.$emit("publish")),onDismiss:t[1]||(t[1]=t=>e.$emit("dismiss",t))},null,8,["changed-areas","dismissed-areas","is-publishing"]),"templates"===o.activePane?((0,a.uX)(),(0,a.Wv)(h,{key:0,templates:o.templates,"selected-key":o.selectedTemplate&&o.selectedTemplate.key,onSelect:n.selectTemplate},null,8,["templates","selected-key","onSelect"])):(0,a.Q3)("",!0),(0,a.Lk)("div",Ma,[(0,a.Lk)("div",Ka,[(0,a.bF)(p,{settings:n.previewSettings,"blocks-override":n.previewBlocks},null,8,["settings","blocks-override"])]),(0,a.Lk)("div",qa,["templates"===o.activePane&&o.selectedTemplate&&o.templateStyle?((0,a.uX)(),(0,a.CE)("div",Ga,[(0,a.Lk)("h3",ja,(0,s.v_)(e.$t("Make it yours")),1),(0,a.Lk)("p",za,(0,s.v_)(e.$t("Applied to the preview, and to the site when you install the template.")),1),(0,a.bF)(m,{modelValue:o.templateStyle,"onUpdate:modelValue":t[2]||(t[2]=e=>o.templateStyle=e),themes:e.themes,"show-labels":!1},null,8,["modelValue","themes"])])):(0,a.Q3)("",!0),(0,a.bo)((0,a.Lk)("div",{class:"card p-5 o-wa-card",onClick:t[20]||(t[20]=e=>o.themeTouched=!0),onInput:t[21]||(t[21]=e=>o.themeTouched=!0)},[(0,a.bF)(m,{"model-value":n.styleValue,themes:e.themes,"onUpdate:modelValue":n.applyStyle},null,8,["model-value","themes","onUpdate:modelValue"]),(0,a.Lk)("div",Ya,[(0,a.Lk)("div",Ja,[(0,a.bF)(y,{label:e.$t("Main colour")},{default:(0,a.k6)(()=>[(0,a.Lk)("div",Za,[(0,a.Lk)("input",{type:"color",class:"o-wa-color__input",value:n.swatchValue(e.form.colors.primary,"primary"),onInput:t[3]||(t[3]=t=>e.form.colors.primary=t.target.value)},null,40,es),(0,a.bF)(g,{modelValue:e.form.colors.primary,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.colors.primary=t),placeholder:n.selectedPalette.primary,expanded:""},null,8,["modelValue","placeholder"]),(0,a.bF)(k,{label:e.$t("Use theme colour"),position:"is-left","append-to-body":""},{default:(0,a.k6)(()=>[(0,a.Lk)("button",{type:"button",class:"o-wa-color__reset","aria-label":e.$t("Use theme colour"),onClick:t[5]||(t[5]=t=>e.form.colors.primary=null)},[(0,a.bF)(d,{icon:["fal","arrow-rotate-left"]})],8,ts)]),_:1},8,["label"])])]),_:1},8,["label"])]),(0,a.Lk)("div",is,[(0,a.bF)(y,{label:e.$t("Accent colour")},{default:(0,a.k6)(()=>[(0,a.Lk)("div",as,[(0,a.Lk)("input",{type:"color",class:"o-wa-color__input",value:n.swatchValue(e.form.colors.secondary,"accent"),onInput:t[6]||(t[6]=t=>e.form.colors.secondary=t.target.value)},null,40,ss),(0,a.bF)(g,{modelValue:e.form.colors.secondary,"onUpdate:modelValue":t[7]||(t[7]=t=>e.form.colors.secondary=t),placeholder:n.selectedPalette.accent,expanded:""},null,8,["modelValue","placeholder"]),(0,a.bF)(k,{label:e.$t("Use theme colour"),position:"is-left","append-to-body":""},{default:(0,a.k6)(()=>[(0,a.Lk)("button",{type:"button",class:"o-wa-color__reset","aria-label":e.$t("Use theme colour"),onClick:t[8]||(t[8]=t=>e.form.colors.secondary=null)},[(0,a.bF)(d,{icon:["fal","arrow-rotate-left"]})],8,ls)]),_:1},8,["label"])])]),_:1},8,["label"])]),(0,a.Lk)("div",os,[(0,a.bF)(y,{label:e.$t("Density")},{default:(0,a.k6)(()=>[(0,a.Lk)("div",ns,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.scales,t=>((0,a.uX)(),(0,a.CE)("button",{key:t,type:"button",class:(0,s.C4)(["o-wa-tile",{"is-selected":e.form.typography.scale===t}]),onClick:i=>e.form.typography.scale=t},[(0,a.bF)(d,{icon:["fal",n.scaleIcon(t)]},null,8,["icon"]),(0,a.Lk)("span",null,(0,s.v_)(e.$t(n.scaleLabel(t))),1)],10,rs))),128))])]),_:1},8,["label"])]),(0,a.Lk)("div",ds,[(0,a.bF)(y,{label:e.$t("Menu hover"),message:e.$t("How a header menu entry reacts to the pointer.")},{default:(0,a.k6)(()=>[(0,a.Lk)("div",cs,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.menuHovers,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.value,type:"button",class:(0,s.C4)(["o-wa-tile",{"is-selected":e.form.header.menuHover===t.value}]),onClick:i=>e.form.header.menuHover=t.value},[(0,a.bF)(d,{icon:["fal",t.icon]},null,8,["icon"]),(0,a.Lk)("span",null,(0,s.v_)(e.$t(t.label)),1
1)],10,us))),128))])]),_:1},8,["label","message"])])]),(0,a.Lk)("div",hs,[(0,a.Lk)("button",{class:"o-wa-more__toggle",type:"button","aria-expanded":String(o.moreOpen),onClick:t[9]||(t[9]=e=>o.moreOpen=!o.moreOpen)},[(0,a.bF)(d,{icon:["fal",o.moreOpen?"chevron-down":"chevron-right"]},null,8,["icon"]),(0,a.eW)(" "+(0,s.v_)(e.$t("Advanced: individual fonts, colours and chrome")),1)],8,ps),o.moreOpen?((0,a.uX)(),(0,a.CE)("div",bs,[(0,a.Lk)("div",ms,[(0,a.bF)(y,{label:e.$t("Headings")},{default:(0,a.k6)(()=>[(0,a.bF)(v,{modelValue:e.form.typography.heading,"onUpdate:modelValue":t[10]||(t[10]=t=>e.form.typography.heading=t),expanded:"",scrollable:"","max-height":"320px","aria-role":"list"},{trigger:(0,a.k6)(()=>[(0,a.bF)(c,{class:"o-wa-font__trigger is-rounded",expanded:""},{default:(0,a.k6)(()=>[(0,a.Lk)("span",{style:(0,s.Tr)({fontFamily:n.fontStack(e.form.typography.heading)})},(0,s.v_)(n.fontLabel(e.form.typography.heading)),5),(0,a.bF)(d,{icon:["fal","chevron-down"]})]),_:1})]),default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.fonts,e=>((0,a.uX)(),(0,a.Wv)(f,{key:e,value:e,"aria-role":"listitem"},{default:(0,a.k6)(()=>[(0,a.Lk)("span",{class:"o-wa-font__name",style:(0,s.Tr)({fontFamily:n.fontStack(e)})},(0,s.v_)(n.fontLabel(e)),5)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])]),(0,a.Lk)("div",gs,[(0,a.bF)(y,{label:e.$t("Body text")},{default:(0,a.k6)(()=>[(0,a.bF)(v,{modelValue:e.form.typography.body,"onUpdate:modelValue":t[11]||(t[11]=t=>e.form.typography.body=t),expanded:"",scrollable:"","max-height":"320px","aria-role":"list"},{trigger:(0,a.k6)(()=>[(0,a.bF)(c,{class:"o-wa-font__trigger is-rounded",expanded:""},{default:(0,a.k6)(()=>[(0,a.Lk)("span",{style:(0,s.Tr)({fontFamily:n.fontStack(e.form.typography.body)})},(0,s.v_)(n.fontLabel(e.form.typography.body)),5),(0,a.bF)(d,{icon:["fal","chevron-down"]})]),_:1})]),default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.fonts,e=>((0,a.uX)(),(0,a.Wv)(f,{key:e,value:e,"aria-role":"listitem"},{default:(0,a.k6)(()=>[(0,a.Lk)("span",{class:"o-wa-font__name",style:(0,s.Tr)({fontFamily:n.fontStack(e)})},(0,s.v_)(n.fontLabel(e)),5)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.extraColorRoles,t=>((0,a.uX)(),(0,a.CE)("div",{key:t.key,class:"column is-12-mobile is-6-tablet"},[(0,a.bF)(y,{label:e.$t(t.label)},{default:(0,a.k6)(()=>[(0,a.Lk)("div",ks,[(0,a.Lk)("input",{type:"color",class:"o-wa-color__input",value:n.swatchValue(e.form.colors[t.key],t.palette),onInput:i=>e.form.colors[t.key]=i.target.value},null,40,ys),(0,a.bF)(g,{modelValue:e.form.colors[t.key],"onUpdate:modelValue":i=>e.form.colors[t.key]=i,placeholder:n.selectedPalette[t.palette],expanded:""},null,8,["modelValue","onUpdate:modelValue","placeholder"]),(0,a.bF)(k,{label:e.$t("Use theme colour"),position:"is-left","append-to-body":""},{default:(0,a.k6)(()=>[(0,a.Lk)("button",{type:"button",class:"o-wa-color__reset","aria-label":e.$t("Use theme colour"),onClick:i=>e.form.colors[t.key]=null},[(0,a.bF)(d,{icon:["fal","arrow-rotate-left"]})],8,fs)]),_:2},1032,["label"])])]),_:2},1032,["label"])]))),128)),(0,a.Lk)("div",vs,[(0,a.bF)(y,{label:e.$t("Header layout")},{default:(0,a.k6)(()=>[(0,a.bF)(w,{modelValue:e.form.header.layout,"onUpdate:modelValue":t[12]||(t[12]=t=>e.form.header.layout=t),expanded:""},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.headerLayouts,t=>((0,a.uX)(),(0,a.CE)("option",{key:t,value:t},(0,s.v_)(e.$t(n.headerLayoutLabel(t))),9,ws))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])]),(0,a.Lk)("div",_s,[(0,a.bF)(y,{label:e.$t("Footer layout")},{default:(0,a.k6)(()=>[(0,a.bF)(w,{modelValue:e.form.footer.layout,"onUpdate:modelValue":t[13]||(t[13]=t=>e.form.footer.layout=t),expanded:""},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.footerLayouts,t=>((0,a.uX)(),(0,a.CE)("option",{key:t,value:t},(0,s.v_)(e.$t(n.footerLayoutLabel(t))),9,$s))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])]),e.form.articles.isActive?((0,a.uX)(),(0,a.CE)("div",Cs,[(0,a.bF)(y,{label:e.$t("Article header")},{default:(0,a.k6)(()=>[(0,a.bF)(w,{modelValue:e.form.articles.layout,"onUpdate:modelValue":t[14]||(t[14]=t=>e.form.articles.layout=t),expanded:""},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.articleLayouts,t=>((0,a.uX)(),(0,a.CE)("option",{key:t,value:t},(0,s.v_)(e.$t(n.articleLayoutLabel(t))),9,Ls))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])])):(0,a.Q3)("",!0),(0,a.Lk)("div",As,[(0,a.bF)(y,{message:e.$t("Applies to pages that open with a hero or banner picture. Elsewhere the menu keeps its own background.")},{default:(0,a.k6)(()=>[(0,a.bF)(_,{modelValue:e.form.header.overHero,"onUpdate:modelValue":t[15]||(t[15]=t=>e.form.header.overHero=t)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Put the menu over the opening picture")),1)]),_:1},8,["modelValue"])]),_:1},8,["message"]),(0,a.bF)(y,null,{default:(0,a.k6)(()=>[(0,a.bF)(_,{modelValue:e.form.header.sticky,"onUpdate:modelValue":t[16]||(t[16]=t=>e.form.header.sticky=t)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Keep the menu visible while scrolling")),1)]),_:1},8,["modelValue"])]),_:1}),(0,a.bF)(y,null,{default:(0,a.k6)(()=>[(0,a.bF)(_,{modelValue:e.form.header.topBar.show,"onUpdate:modelValue":t[17]||(t[17]=t=>e.form.header.topBar.show=t)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Show a strip above the menu")),1)]),_:1},8,["modelValue"])]),_:1}),e.form.header.topBar.show?((0,a.uX)(),(0,a.Wv)(y,{key:0,label:e.$t("What the strip says")},{default:(0,a.k6)(()=>[(0,a.bF)(g,{modelValue:e.form.header.topBar.text,"onUpdate:modelValue":t[18]||(t[18]=t=>e.form.header.topBar.text=t)},null,8,["modelValue"])]),_:1},8,["label"])):(0,a.Q3)("",!0),e.form.header.topBar.show?((0,a.uX)(),(0,a.Wv)(y,{key:1},{default:(0,a.k6)(()=>[(0,a.bF)(_,{modelValue:e.form.header.topBar.showSocial,"onUpdate:modelValue":t[19]||(t[19]=t=>e.form.header.topBar.showSocial=t)},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Show social links in the strip")),1)]),_:1},8,["modelValue"])]),_:1})):(0,a.Q3)("",!0)])])):(0,a.Q3)("",!0)]),e.warnings.length?((0,a.uX)(),(0,a.CE)("div",Ss,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.warnings,(e,t)=>((0,a.uX)(),(0,a.CE)("p",{key:t,class:"o-wa-warnings__item"},[(0,a.bF)(d,{icon:["fal","triangle-exclamation"]}),(0,a.eW)(" "+(0,s.v_)(e),1)]))),128))])):(0,a.Q3)("",!0)],544),[[b.aG,"theme"===o.activePane]])])])])}const Es={class:"o-wa-dpreview"},xs={class:"o-wa-dpreview__chrome"},Ts={class:"o-wa-dpreview__url"},Ps={ref:"viewport",class:"o-wa-dpreview__viewport"},Ws={key:1,class:"o-wa-dpreview__empty"};function Ds(e,t,i,l,o,n){const r=(0,a.g2)("WebsiteHeader"),d=(0,a.g2)("WebsiteRenderer"),c=(0,a.g2)("WebsiteFooter");return(0,a.uX)(),(0,a.CE)("div",Es,[(0,a.Lk)("div",xs,[t[1]||(t[1]=(0,a.Lk)("span",null,null,-1)),t[2]||(t[2]=(0,a.Lk)("span",null,null,-1)),t[3]||(t[3]=(0,a.Lk)("span",null,null,-1)),(0,a.Lk)("span",Ts,(0,s.v_)(n.previewHost),
11)]),(0,a.Lk)("div",Ps,[(0,a.Lk)("div",{class:(0,s.C4)(["o-wa-dpreview__page o-website",n.themeClasses]),"data-theme":"light",style:(0,s.Tr)(n.pageStyle),onClickCapture:t[0]||(t[0]=(0,b.D$)(()=>{},["prevent"]))},[n.previewSite?((0,a.uX)(),(0,a.Wv)(r,{key:0,site:n.previewSite,tenant:e.tenant},null,8,["site","tenant"])):(0,a.Q3)("",!0),(0,a.Lk)("main",null,[(0,a.bF)(d,{blocks:n.renderedBlocks},null,8,["blocks"])]),n.renderedBlocks.length?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("p",Ws,(0,s.v_)(e.$t("Your homepage has no sections yet. The design still applies to everything you add.")),1)),n.previewSite?((0,a.uX)(),(0,a.Wv)(c,{key:2,site:n.previewSite,tenant:e.tenant},null,8,["site","tenant"])):(0,a.Q3)("",!0)],38)],512)])}var Vs=i(94335),Is=i(40834),Us=i(28782),Xs=i(43087),Hs=i(35824);const Bs=1280;var Os={name:"WebsiteDesignPreview",components:{WebsiteRenderer:se.A,WebsiteHeader:Xs.A,WebsiteFooter:Hs.A},props:{settings:{type:Object,required:!0},blocksOverride:{type:Array,default:null}},data(){return{site:null,blocks:[],scale:1,observer:null,measureFrame:null}},computed:{...(0,Is.L8)(["tenant"]),renderedBlocks(){const e=null===this.blocksOverride?this.blocks:this.blocksOverride;return e.filter(e=>"donate"!==e?.type)},themeClasses(){return(0,le.bd)(this.settings,this.renderedBlocks[0])},previewSite(){return this.site?{...this.site,website:this.settings}:null},pageStyle(){return{...(0,le.Ce)(this.settings),width:`${Bs}px`,zoom:this.scale}},previewHost(){return this.tenant?.websiteHost||`${this.tenant?.slug||""}.orgo.cloud`}},created(){this.fetchSite(),this.fetchHomepage()},mounted(){this.measure(),this.observer=new ResizeObserver(this.measure),this.observer.observe(this.$el)},beforeUnmount(){this.observer&&(this.observer.disconnect(),this.observer=null),this.measureFrame&&(cancelAnimationFrame(this.measureFrame),this.measureFrame=null)},methods:{fetchSite(){const e={};this.tenant?.slug&&(e.tenant=this.tenant.slug),Vs.A.get(`${Us.QU}${Us.H$}/website-public/bootstrap`,{params:e}).then(e=>{this.site=e.data}).catch(e=>{console.log(e)})},fetchHomepage(){this.$http.plain.get("/website_pages").then(e=>{const t=e.data["hydra:member"]||e.data["member"]||[],i=t.find(e=>e.isHomepage)||t[0];this.blocks=i?.blocks||[]}).catch(e=>{console.log(e)})},measure(){this.measureFrame&&cancelAnimationFrame(this.measureFrame),this.measureFrame=requestAnimationFrame(()=>{this.measureFrame=null;const e=this.$refs.viewport;if(!e)return;const t=getComputedStyle(e),i=e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight),a=Math.round(1e3*Math.min(1,i/Bs))/1e3;a!==this.scale&&(this.scale=a)})}}};const Rs=(0,de.A)(Os,[["render",Ds],["__scopeId","data-v-7010199b"]]);var Ns=Rs;const Qs={class:"o-wa-templates"},Ms=["onClick","onKeydown"],Ks={class:"o-wa-template__head"},qs={class:"o-wa-template__swatches"},Gs={class:"o-wa-template__name"},js={class:"o-wa-template__desc"};function zs(e,t,i,l,o,n){return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.Lk)("div",Qs,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.templates,t=>((0,a.uX)(),(0,a.CE)("article",{key:t.key,class:(0,s.C4)(["o-wa-template",{"is-selected":i.selectedKey===t.key}]),role:"button",tabindex:"0",onClick:i=>e.$emit("select",t),onKeydown:[(0,b.jR)(i=>e.$emit("select",t),["enter"]),(0,b.jR)((0,b.D$)(i=>e.$emit("select",t),["prevent"]),["space"])]},[(0,a.Lk)("header",Ks,[(0,a.Lk)("span",qs,[((0,a.uX)(),(0,a.CE)(a.FK,null,(0,a.pI)(["primary","accent","surface"],e=>(0,a.Lk)("span",{key:e,class:"o-wa-template__swatch",style:(0,s.Tr)({background:n.palette(t.key)[e]})},null,4)),64))]),(0,a.Lk)("h3",Gs,(0,s.v_)(e.$t(t.label)),1)]),(0,a.Lk)("p",js,(0,s.v_)(e.$t(t.description)),1)],42,Ms))),128))])])}const Ys={social:{primary:"#c95a3c",accent:"#e0a458",surface:"#fdf8f4"},political:{primary:"#1c3557",accent:"#9b2033",surface:"#f5f7fa"},educational:{primary:"#3d4fa1",accent:"#2a9d8f",surface:"#f7f8fc"},ecological:{primary:"#2e7d5b",accent:"#c8a44d",surface:"#f6f9f5"},business:{primary:"#2f4858",accent:"#4b7f9e",surface:"#f8f9fa"},cultural:{primary:"#6b2d5c",accent:"#d4715a",surface:"#fdf6f7"},editorial:{primary:"#16181d",accent:"#a9c4e8",surface:"#faf9f7"},bold:{primary:"#e03e2f",accent:"#111111",surface:"#ffffff"},stone:{primary:"#3a3733",accent:"#a98a6d",surface:"#f3f0ea"},playful:{primary:"#3f97c8",accent:"#f0866b",surface:"#fef8f0"}},Js="business";function Zs(e){return Ys[e]||Ys[Js]}var el={name:"WebsiteTemplatePicker",props:{templates:{type:Array,required:!0},selectedKey:{type:String,default:null}},emits:["select"],methods:{palette(e){return Zs(e)}}};const tl=(0,de.A)(el,[["render",zs],["__scopeId","data-v-98d07756"]]);var il=tl;const al={class:"o-wsp"},sl={class:"o-wsp-themes"},ll=["title","aria-label","onClick"],ol={class:"o-wsp-theme__swatches"},nl={class:"o-wsp-packs"},rl=["onClick"],dl={class:"o-wsp-tiles"},cl=["onClick"];function ul(e,t,i,l,o,n){const r=(0,a.g2)("b-field");return(0,a.uX)(),(0,a.CE)("div",al,[i.showLabels?((0,a.uX)(),(0,a.Wv)(r,{key:0,label:e.$t("Colour palette")},null,8,["label"])):(0,a.Q3)("",!0),(0,a.Lk)("div",sl,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.themes,t=>((0,a.uX)(),(0,a.CE)("button",{key:t,type:"button",class:(0,s.C4)(["o-wsp-theme",{"is-selected":n.value.theme===t}]),title:e.$t(n.themeLabel(t)),"aria-label":e.$t(n.themeLabel(t)),onClick:e=>n.emit({theme:t})},[(0,a.Lk)("span",ol,[(0,a.Lk)("span",{class:"o-wsp-theme__band",style:(0,s.Tr)({background:n.palette(t).surface})},null,4),(0,a.Lk)("span",{class:"o-wsp-theme__band",style:(0,s.Tr)({background:n.palette(t).primary})},null,4),(0,a.Lk)("span",{class:"o-wsp-theme__band",style:(0,s.Tr)({background:n.palette(t).accent})},null,4)])],10,ll))),128))]),(0,a.bF)(r,{label:i.showLabels?e.$t("Font pack"):"",class:"o-wsp-group"},{default:(0,a.k6)(()=>[(0,a.Lk)("div",nl,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.fontPacks,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.heading+t.body,type:"button",class:(0,s.C4)(["o-wsp-pack",{"is-selected":n.isPack(t)}]),onClick:e=>n.emit({typography:{...n.typography,heading:t.heading,body:t.body}})},[(0,a.Lk)("span",{class:"o-wsp-pack__heading",style:(0,s.Tr)({fontFamily:n.fontStack(t.heading)})},(0,s.v_)(e.$t("Heading")),5),(0,a.Lk)("span",{class:"o-wsp-pack__body",
1style:(0,s.Tr)({fontFamily:n.fontStack(t.body)})},(0,s.v_)(e.$t("Paragraph text")),5)],10,rl))),128))])]),_:1},8,["label"]),(0,a.bF)(r,{label:i.showLabels?e.$t("Corners"):"",class:"o-wsp-group"},{default:(0,a.k6)(()=>[(0,a.Lk)("div",dl,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.corners,t=>((0,a.uX)(),(0,a.CE)("button",{key:t.value,type:"button",class:(0,s.C4)(["o-wsp-tile",{"is-selected":n.value.radius===t.value}]),onClick:e=>n.emit({radius:t.value})},[(0,a.Lk)("span",{class:"o-wsp-tile__corner",style:(0,s.Tr)({borderRadius:t.radius})},null,4),(0,a.Lk)("span",null,(0,s.v_)(e.$t(t.label)),1)],10,cl))),128))])]),_:1},8,["label"])])}var hl={name:"WebsiteStylePicker",props:{modelValue:{type:Object,required:!0},themes:{type:Array,default:()=>[]},showLabels:{type:Boolean,default:!0}},emits:["update:modelValue"],computed:{value(){return this.modelValue||{}},typography(){return this.value.typography||{heading:"inter",body:"inter",scale:"normal"}},fontPacks(){return[{heading:"inter",body:"inter"},{heading:"playfair",body:"inter"},{heading:"fraunces",body:"work-sans"},{heading:"space-grotesk",body:"dm-sans"},{heading:"source-serif",body:"source-serif"},{heading:"archivo",body:"lora"},{heading:"libre-baskerville",body:"figtree"},{heading:"manrope",body:"manrope"}]},corners(){return[{value:"sharp",label:"Sharp",radius:"0"},{value:"soft",label:"Soft",radius:"5px"},{value:"round",label:"Round",radius:"999px"}]}},methods:{emit(e){this.$emit("update:modelValue",{...this.value,...e})},isPack(e){return this.typography.heading===e.heading&&this.typography.body===e.body},fontStack(e){return`var(--orgo-w-font-${e})`},palette(e){return Zs(e)},themeLabel(e){const t={social:"Social",political:"Civic",educational:"Educational",ecological:"Environmental",business:"Professional",cultural:"Cultural",editorial:"Editorial",bold:"Bold",stone:"Stone",playful:"Playful"};return t[e]||e}}};const pl=(0,de.A)(hl,[["render",ul],["__scopeId","data-v-27c007cb"]]);var bl=pl;const ml=/^#[0-9a-f]{6}$/i;var gl={name:"WebsiteAdminDesign",components:{WebsiteDesignPreview:Ns,WebsiteTemplatePicker:il,WebsiteStylePicker:bl,WebsitePublishNotice:Si},mixins:[sa],props:{changedAreas:{type:Array,default:()=>[]},dismissedAreas:{type:Array,default:()=>[]},isPublishing:{type:Boolean,default:!1}},emits:["applied","publish","dismiss"],data(){return{moreOpen:!1,activePane:"theme",templates:[],appliedKey:null,existingPageCount:0,existingArticleCount:0,selectedTemplate:null,templateBlocks:null,templateSettings:null,templateStyle:null,applyingKey:null,themeTouched:!1}},computed:{panes(){return[{key:"theme",label:"Theme"},{key:"templates",label:"Templates"}]},replacesExisting(){return!(!this.existingPageCount&&!this.existingArticleCount)},applyLabel(){return this.replacesExisting?"Replace website":"Start website"},previewSettings(){return"templates"===this.activePane&&this.templateSettings?{...this.templateSettings,...this.templateStyle||{}}:this.form},demoHref(){if(!this.selectedTemplate)return null;const e=this.templateStyle||{},t={theme:e.theme,radius:e.radius,heading:e.typography?.heading,body:e.typography?.body,scale:e.typography?.scale};return this.$router.resolve({name:"WebsiteTemplateDemo",params:{key:this.selectedTemplate.key},query:Object.fromEntries(Object.entries(t).filter(([,e])=>!!e))}).href},previewBlocks(){return"templates"===this.activePane?this.templateBlocks:null},styleValue(){return{theme:this.form.theme,typography:this.form.typography,radius:this.form.radius}},menuHovers(){return[{value:"background",label:"Background",icon:"square"},{value:"underline",label:"Underline",icon:"underline"},{value:"underlineGrow",label:"From centre",icon:"arrows-left-right"}]},selectedPalette(){return Zs(this.form.theme)},extraColorRoles(){return[{key:"accent",label:"Accent colour",palette:"accent"},{key:"surface",label:"Page background",palette:"surface"},{key:"surfaceAlt",label:"Alternate surface",palette:"surface"},{key:"text",label:"Body text",palette:"primary"},{key:"headerBg",label:"Header background",palette:"surface"},{key:"footerBg",label:"Footer background",palette:"surface"}]}},watch:{activePane(e){"templates"===e&&this.selectDefaultTemplate()}},created(){this.fetchTemplates()}
1,methods:{fetchTemplates(){this.$http.plain.get("/website-templates").then(e=>{this.templates=e.data.templates||[],this.appliedKey=e.data.appliedKey||null,this.existingPageCount=e.data.existingPageCount||0,this.existingArticleCount=e.data.existingArticleCount||0,this.existingPageCount||(this.activePane="templates"),"templates"===this.activePane&&this.selectDefaultTemplate()}).catch(e=>{console.log(e)})},selectDefaultTemplate(){!this.selectedTemplate&&this.templates.length&&this.selectTemplate(this.templates.find(e=>e.key===this.appliedKey)||this.templates[0])},selectTemplate(e){this.selectedTemplate=e,this.templateBlocks=null,this.templateSettings=null,this.templateStyle=null,e&&this.$http.plain.get(`/website-templates/${e.key}/preview`).then(t=>{this.selectedTemplate?.key===e.key&&(this.templateSettings=t.data.settings||null,this.templateBlocks=t.data.blocks||[],this.templateStyle={theme:this.templateSettings?.theme,typography:{...this.templateSettings?.typography||{}},radius:this.templateSettings?.radius})}).catch(e=>{console.log(e)})},confirmApply(){if(!this.selectedTemplate)return;const e="This deletes your existing pages, menus and news articles, and replaces them with the template. This cannot be undone.",t=this.replacesExisting?`<p style="color: var(--bulma-danger)">${this.$t("Your website is not empty.")} ${this.$t(e)}</p>`:this.$t("This creates the template pages, menus and news articles, and applies its theme.");this.$buefy.dialog.confirm({title:this.$t(this.applyLabel),message:t,confirmText:this.$t(this.applyLabel),cancelText:this.$t("Cancel"),type:this.replacesExisting?"is-danger":"is-primary",onConfirm:this.apply})},appliedSummary(e){const t=e.pages||0,i=e.articles||0,a=e.menuItems||0;return i>0&&a>0?this.$t("Template applied. {pages} pages, {articles} news articles and {menuItems} menu entries created.",{pages:t,articles:i,menuItems:a}):i>0?this.$t("Template applied. {pages} pages and {articles} news articles created.",{pages:t,articles:i}):a>0?this.$t("Template applied. {pages} pages and {menuItems} menu entries created.",{pages:t,menuItems:a}):this.$t("Template applied. Pages created: {count}",{count:t})},apply(){const e=this.selectedTemplate;this.applyingKey=e.key,this.$http.plain.post(`/website-templates/${e.key}/apply`,{replace:!0,style:this.templateStyle||{}}).then(t=>{this.$buefy.snackbar.open({message:this.appliedSummary(t.data),type:"is-success"}),this.existingPageCount=t.data.pages,this.existingArticleCount=t.data.articles||0,this.appliedKey=e.key,this.fetchSettings(),this.$emit("applied")}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not apply the template"),type:"is-danger",duration:6e3})}).finally(()=>{this.applyingKey=null})},saveTheme(){this.themeTouched=!1,this.save()},applyStyle(e){this.form.theme=e.theme,this.form.radius=e.radius,this.form.typography={...this.form.typography,...e.typography}},scaleIcon(e){return{compact:"bars",normal:"bars-staggered",spacious:"grip-lines"}[e]||"bars"},fontStack(e){return`var(--orgo-w-font-${e})`},fontLabel(e){return e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},scaleLabel(e){return{compact:"Compact",normal:"Normal",spacious:"Spacious"}[e]||e},headerLayoutLabel(e){return{logoLeft:"Logo on the left",stacked:"Logo above the menu"}[e]||e},footerLayoutLabel(e){return{simple:"Simple",columns:"Columns"}[e]||e},articleLayoutLabel(e){return{standard:"Headline on the left",centered:"Headline centred above the picture"}[e]||e},swatchValue(e,t){return ml.test(e||"")?e:this.selectedPalette[t]}}};const kl=(0,de.A)(gl,[["render",Fs],["__scopeId","data-v-f3d86f0a"]]);var yl=kl;const fl={class:"o-wa-mcp"},vl={class:"o-wa-mcp__head"},wl={class:"o-wa-mcp__title"},_l={class:"o-wa-mcp__lead"},$l={class:"card p-5 o-wa-mcp__card"},Cl={class:"o-wa-mcp__step"},Ll={class:"o-wa-mcp__hint"},Al={class:"o-wa-mcp__url"},Sl=["title","aria-label"],Fl={key:0,class:"o-wa-mcp__hint"},El={class:"card p-5 o-wa-mcp__card"},xl={class:"o-wa-mcp__step"},Tl={class:"o-wa-mcp__clients"},Pl=["onClick"],Wl={class:"o-wa-mcp__mark",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false"},Dl=["d"],Vl={class:"o-wa-mcp__steps"},Il={key:0,class:"o-wa-mcp__config"},Ul=["title","aria-label"],Xl={class:"o-wa-mcp__hint"},Hl={class:"card p-5 o-wa-mcp__card"},Bl={class:"o-wa-mcp__step"},Ol={class:"o-wa-mcp__hint"},Rl={class:"o-wa-mcp__prompts"},Nl={class:"o-wa-mcp__hint"};function Ql(e,t,i,l,o,n){const r=(0,a.g2)("b-button"),d=(0,a.g2)("font-awesome-icon");return(0,a.uX)(),(0,a.CE)("div",fl,[(0,a.Lk)("header",vl,[(0,a.Lk)("div",null,[(0,a.Lk)("h2",wl,(0,s.v_)(e.$t("Build your website by asking")),1),(0,a.Lk)("p",_l,(0,s.v_)(e.$t("Connect Orgo to an AI assistant and it can create pages, edit menus, apply a template and publish â with your permissions, never more.")),1)]),(0,a.bF)(r,{class:"is-rounded","icon-left":"xmark",onClick:t[0]||(t[0]=t=>e.$emit("close"))},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.$t("Close")),1)]),_:1})]),(0,a.Lk)("div",$l,[(0,a.Lk)("h3",Cl,(0,s.v_)(e.$t("1. Your connection address")),1),(0,a.Lk)("p",Ll,(0,s.v_)(e.$t("One address, used by every assistant below. It connects to your organisation and asks you to sign in.")),1),(0,a.Lk)("div",Al,[(0,a.Lk)("code",null,(0,s.v_)(i.mcpUrl),1),(0,a.Lk)("button",{class:"o-wa-mcp__copy",type:"button",title:e.$t("Copy"),"aria-label":e.$t("Copy"),onClick:t[1]||(t[1]=e=>n.copy(i.mcpUrl))},[(0,a.bF)(d,{icon:["fal","copy"]})],8,Sl)]),n.sharedUrl?((0,a.uX)(),(0,a.CE)("p",Fl,(0,s.v_)(e.$t("The shared address {url} works for every organisation too, if your assistant will not accept the one above.",{url:n.sharedUrl})),1)):(0,a.Q3)("",!0)]),(0,a.Lk)("div",El,[(0,a.Lk)("h3",xl,(0,s.v_)(e.$t("2. Add it to your assistant")),1),(0,a.Lk)("nav",Tl,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.clients,e=>((0,a.uX)(),(0,a.CE)("button",{key:e.key,type:"button",class:(0,s.C4)(["o-wa-mcp__client",{"is-active":o.activeClient===e.key}]),onClick:t=>o.activeClient=e.key},[((0,a.uX)(),(0,a.CE)("svg",Wl,[(0,a.Lk)("path",{d:e.mark,fill:"currentColor"},null,8,Dl)])),(0,a.eW)(" "+(0,s.v_)(e.label),1)],10,Pl))),128))]),(0,a.Lk)("ol",Vl,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.activeSteps,(t,i)=>((0,a.uX)(),(0,a.CE)("li",{key:i},(0,s.v_)(e.$t(t)),1))),128))]),n.activeConfig?((0,a.uX)(),(0,a.CE)("div",Il,[(0,a.Lk)("pre",null,[(0,a.Lk)("code",null,(0,s.v_)(n.activeConfig),1)]),(0,a.Lk)("button",{class:"o-wa-mcp__copy",type:"button",title:e.$t("Copy"),"aria-label":e.$t("Copy"),onClick:t[2]||(t[2]=e=>n.copy(n.activeConfig))},[(0,a.bF)(d,{icon:["fal","copy"]})],8,Ul)])):(0,a.Q3)("",!0),(0,a.Lk)("p",Xl,(0,s.v_)(e.$t("Menu wording moves around between versions. Look for âconnectorsâ, âMCP serversâ or âcustom integrationsâ in the settings.")),1)]),(0,a.Lk)("div",Hl,[(0,a.Lk)("h3",Bl,(0,s.v_)(e.$t("3. Ask for what you want")),1),(0,a.Lk)("p",Ol,(0,s.v_)(e.$t("Things people ask on the first day:")),1),(0,a.Lk)("ul",Rl,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.prompts,(t,i)=>((0,a.uX)(),(0,a.CE)("li",{key:i},[(0,a.bF)(d,{icon:["fal","quote-left"]}),(0,a.eW)(" "+(0,s.v_)(e.$t(t)),1)]))),128))]),(0,a.Lk)("p",Nl,(0,s.v_)(e.$t("The assistant signs in as you, so it can do what you can do and nothing else. Nothing reaches the public site until you publish.")),1)])])}var Ml={name:"WebsiteMcpGuide",props:{mcpUrl:{type:String,required:!0}},emits:["close"],data(){return{activeClient:"claude"}},computed:{clients(){return[{key:"claude",label:"Claude",mark:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578
11.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.
10182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"},{key:"chatgpt",label:"ChatGPT",mark:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"},{key:"antigravity",label:"Antigravity",mark:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"}]},activeSteps(){return{claude:["Open Settings, then Connectors.","Choose âAdd custom connectorâ.","Paste the address above and confirm.","Sign in with your Orgo account when the browser window opens, and allow access.","Orgo now appears in the tools list of every new chat."],chatgpt:["Open Settings, then Connectors â custom connectors need a paid plan, and on some accounts developer mode.","Choose to add a connector and pick the MCP server option.","Paste the address above, name it Orgo, and confirm.","Sign in with your Orgo account when the browser window opens, and allow access.","Turn the Orgo connector on in the chat where you want to use it."],antigravity:["Open the MCP server settings and edit the JSON configuration.","Add the entry below inside mcpServers, then save and reload.","Sign in with your Orgo account when the browser window opens, and allow access.","Orgo tools become available to the agent."]}[this.activeClient]},sharedUrl(){const e=this.mcpUrl.replace(/^(https?:\/\/)[^./]+\.mcp\./,"$1mcp.");return e===this.mcpUrl?null:e},activeConfig(){return"antigravity"!==this.activeClient?null:JSON.stringify({mcpServers:{orgo:{serverUrl:this.mcpUrl}}},null,2)},prompts(){return["Set up my website from the template that fits a cultural organisation, then show me the homepage.","Add a Volunteering page with a hero, three ways to help and a contact form, and put it in the header menu.","Move my old site across from example.org â pages, news and the redirects, so no link breaks.","Our address changed: redirect /contact-us to /contact permanently.","Publish everything that has changed since last week."]}},methods:{copy(e){e&&navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-success"})}).catch(e=>{console.log(e)})}}};const Kl=(0,de.A)(Ml,[["render",Ql],["__scopeId","data-v-509299ef"]]);var ql=Kl,Gl=i(35008),jl={name:"WebsiteAdmin",components:{WebsiteMcpGuide:ql,WebsiteAdminPages:Ae,WebsiteAdminArticles:Ct,WebsiteAdminMenu:Pi,WebsiteAdminSettings:Xa,WebsiteAdminDesign:yl},mixins:[Gl.A],data(){return{activeTab:0,hasPages:!1,hasArticles:!1,isPublishStateLoaded:!1,isSettingsLoaded:!1,isTabDecided:!1,dismissedAreas:[],isMcpOpen:!1,mcpUrl:"",websiteHostDefault:null}},computed:{homepageUrl(){const e=this.publishPages.find(e=>e.isHomepage)||this.publishPages[0];return e?this.$router.resolve({name:"WebsitePage",params:{slug:e.slug}}).href:null},liveUrl(){return this.websiteHostDefault?`https://${this.websiteHostDefault}`:null},hasLiveWebsite(){return null!==this.liveUrl&&this.publishPages.some(e=>!!e.dateDeployed)},totalPendingCount(){return this.pendingCount+this.articlesPendingCount},pendingSummary(){const e=this.pendingCount,t=this.articlesPendingCount,i=this.siteSettingsChanged;return e>0&&t>0&&i?this.$t("{pages} pages, {articles} articles and your site settings have changed since you last published.",{pages:e,articles:t}):e>0&&t>0?this.$t("{pages} pages and {articles} articles have changed since you last published.",{pages:e,articles:t}):e>0&&i?this.$t("{count} pages and your site settings have changed since you last published.",{count:e}):t>0&&i?this.$t("{count} articles and your site settings have changed since you last published.",{count:t}):e>0?this.$t("{count} pages have changed since you last published.",{count:e}):t>0?this.$t("{count} articles have changed since you last published.",{count:t}):this.$t("Your site settings have changed since you last published.")},isEditingPage(){return["WebsiteAdminPageCreate","WebsiteAdminPageEdit"].includes(this.$route.name)},isEditingArticle(){return["WebsiteAdminArticleCreate","WebsiteAdminArticleEdit"].includes(this.$route.name)},isLoadingTabs(){return!this.isPublishStateLoaded||!this.isSettingsLoaded},tabs(){return[{key:"pages",label:this.$t("Pages")},...this.hasArticles||this.isEditingArticle?[{key:"articles",label:this.$t("Articles")}]:[],{key:"menus",label:this.$t("Header & Footer")},{key:"settings",label:this.$t("Settings")},{key:"design",label:this.$t("Design")}]}},watch:{changedAreas(e){this.dismissedAreas=this.dismissedAreas.filter(t=>e.includes(t))}
1,tabs(e,t){const i=t[this.activeTab]?.key,a=e.findIndex(e=>e.key===i);this.$nextTick(()=>{this.activeTab=-1===a?0:a})}},created(){this.fetchArticlesEnabled(),this.fetchPublishState()},methods:{dismissNotice(e){this.dismissedAreas.includes(e)||(this.dismissedAreas=[...this.dismissedAreas,e])},onPublishStateLoaded(){this.hasPages=this.publishPages.length>0,this.isPublishStateLoaded=!0,this.isTabDecided||(this.isTabDecided=!0,this.isEditingArticle?this.openTab("articles"):this.hasPages||this.isEditingPage||this.openTab("design"))},onTemplateApplied(){this.fetchPublishState(),this.openPages()},fetchArticlesEnabled(){this.$http.plain.get("/website-settings").then(e=>{this.hasArticles=!0===e.data.settings?.articles?.isActive,this.isEditingArticle&&this.$nextTick(()=>this.openTab("articles")),this.mcpUrl=e.data.mcpUrl||"",this.websiteHostDefault=e.data.websiteHostDefault||null}).catch(e=>{console.log(e)}).finally(()=>{this.isSettingsLoaded=!0})},openMcp(){this.isMcpOpen=!this.isMcpOpen},closeMcp(){this.isMcpOpen=!1},openPages(){this.openTab("pages")},onTabChange(e){this.isMcpOpen=!1;const t=this.tabs[e]?.key;(this.isEditingPage&&"pages"!==t||this.isEditingArticle&&"articles"!==t)&&this.$router.push({name:"WebsiteAdmin"})},openTab(e){const t=this.tabs.findIndex(t=>t.key===e);-1!==t&&(this.activeTab=t)}}};const zl=(0,de.A)(jl,[["render",p],["__scopeId","data-v-6803b23e"]]);var Yl=zl},35008:function(e,t,i){i(18111),i(22489);const a=2e3,s=30;t.A={data(){return{publishPages:[],publishArticles:[],pendingCount:0,articlesPendingCount:0,changedAreas:[],build:null,isLoadingPublishState:!1,publishingTarget:null,pollTimer:null}},computed:{isPublishing(){return null!==this.publishingTarget},settingsChanged(){return this.changedAreas.length>0},siteSettingsChanged(){const e=this.changedAreas.filter(e=>"articles"!==e);return e.length>0||this.changedAreas.includes("articles")&&0===this.articlesPendingCount},hasPendingChanges(){return this.pendingCount>0||this.articlesPendingCount>0||this.settingsChanged},isBuildRunning(){return null!==this.build&&["QUEUED","RUNNING"].includes(this.build.status)}},beforeUnmount(){this.stopPolling()},methods:{fetchPublishState(){this.isLoadingPublishState=!0,this.$http.plain.get("/website-build").then(e=>{this.applyPublishState(e)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingPublishState=!1})},applyPublishState(e){this.publishPages=e.data.pages||[],this.publishArticles=e.data.articles||[],this.pendingCount=e.data.pendingCount||0,this.articlesPendingCount=e.data.articlesPendingCount||0,this.changedAreas=e.data.changedAreas||[],this.build=e.data.build||null,this.onPublishStateLoaded()},onPublishStateLoaded(){},publishEverything(){this.sendPublish({},"all",this.$t("Publishing your websiteâ¦"))},publishOnePage(e){const t={only:[e.slug]};"DRAFT"===e.status&&"WITHDRAWING"!==e.publishState&&(t.pages=[e.slug]);const i="WITHDRAWING"===e.publishState?this.$t("Removing the page from your websiteâ¦"):this.$t("Publishing the pageâ¦");this.sendPublish(t,e.slug,i)},sendPublish(e,t,i){this.publishingTarget=t,this.$buefy.snackbar.open({message:i,type:"is-info"}),this.$http.plain.post("/website-publish",e).then(e=>{this.build=e.data.build||null,this.pollBuild(s)}).catch(e=>{console.log(e),this.publishingTarget=null,this.$buefy.snackbar.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Could not publish your website"),type:"is-danger",duration:6e3})})},pollBuild(e){if(this.stopPolling(),e<=0)return this.publishingTarget=null,this.fetchPublishState(),void this.$buefy.snackbar.open({message:this.$t("Your website is still building. Reopen this tab in a moment to see the result."),type:"is-warning",duration:6e3});this.pollTimer=setTimeout(()=>{this.$http.plain.get("/website-build").then(t=>{this.applyPublishState(t),this.build&&["QUEUED","RUNNING"].includes(this.build.status)?this.pollBuild(e-1):(this.publishingTarget=null,this.onBuildSettled(this.build))}).catch(e=>{console.log(e),this.publishingTarget=null})},a)},onBuildSettled(e){e&&"FAILED"===e.status?this.$buefy.snackbar.open({message:e.error||this.$t("The website build failed"),type:"is-danger",duration:8e3}):this.$buefy.snackbar.open({message:this.$t("Your website is live"),type:"is-success"})},stopPolling(){this.pollTimer&&(clearTimeout(this.pollTimer),this.pollTimer=null)}}}},36412:function(e,t,i){i.d(t,{US:function(){return d},lB:function(){return c},c_:function(){return u},jC:function(){return r},Cx:function(){return h},il:function(){return p}});i(18111),i(81148);const a={"arrow-right":{set:"lucide",source:"arrow-right"},bars:{set:"lucide",source:"menu"},"chevron-down":{set:"lucide",source:"chevron-down"}
1,"circle-check":{set:"lucide",source:"circle-check"},clock:{set:"lucide",source:"clock"},envelope:{set:"lucide",source:"mail"},image:{set:"lucide",source:"image"},"location-dot":{set:"lucide",source:"map-pin"},plus:{set:"lucide",source:"plus"},trash:{set:"lucide",source:"trash-2"},video:{set:"lucide",source:"video"},xmark:{set:"lucide",source:"x"}},s={seedling:{set:"lucide",source:"sprout"},"earth-europe":{set:"lucide",source:"earth"},"people-group":{set:"lucide",source:"users"},"hand-holding-heart":{set:"lucide",source:"hand-heart"},heart:{set:"lucide",source:"heart"},"graduation-cap":{set:"lucide",source:"graduation-cap"},"book-open":{set:"lucide",source:"book-open"},lightbulb:{set:"lucide",source:"lightbulb"},"scale-balanced":{set:"lucide",source:"scale"},landmark:{set:"lucide",source:"landmark"},bullhorn:{set:"lucide",source:"megaphone"},handshake:{set:"lucide",source:"handshake"},"shield-check":{set:"lucide",source:"shield-check"},leaf:{set:"lucide",source:"leaf"},recycle:{set:"lucide",source:"recycle"},tree:{set:"lucide",source:"trees"},users:{set:"lucide",source:"users"},"user-group":{set:"lucide",source:"users-round"},"calendar-days":{set:"lucide",source:"calendar-days"},"map-location-dot":{set:"lucide",source:"map-pinned"},briefcase:{set:"lucide",source:"briefcase"},"chart-line":{set:"lucide",source:"chart-line"},globe:{set:"lucide",source:"globe"},star:{set:"lucide",source:"star"},compass:{set:"lucide",source:"compass"},flag:{set:"lucide",source:"flag"},"life-ring":{set:"lucide",source:"life-buoy"},sun:{set:"lucide",source:"sun"},ticket:{set:"lucide",source:"ticket"},"masks-theater":{set:"lucide",source:"drama"},"building-columns":{set:"lucide",source:"university"},microphone:{set:"lucide",source:"mic"},"child-reaching":{set:"lucide",source:"person-standing"}},l={facebook:{set:"simple",source:"facebook"},instagram:{set:"simple",source:"instagram"},linkedin:{set:"fa-brands",source:"faLinkedin"},youtube:{set:"simple",source:"youtube"},tiktok:{set:"simple",source:"tiktok"},"x-twitter":{set:"simple",source:"x"}};const o={key:"eyebrow",kind:"text",label:"Eyebrow",width:"sm",toggleKey:"showEyebrow",toggleLabel:"Show the eyebrow"},n=["eyebrow","title","subtitle"],r=[{key:"id",kind:"text",width:"sm",label:"Anchor",help:"Lets a button or a menu entry link straight to this section."},{key:"width",kind:"select",label:"Width",options:["narrow","container","wide","full"],default:"container"},{key:"spaceTop",kind:"select",label:"Space above",options:["none","sm","md","lg","xl"],default:"md"},{key:"spaceBottom",kind:"select",label:"Space below",options:["none","sm","md","lg","xl"],default:"md"},{key:"background",kind:"select",label:"Background",options:["default","alt","primary","dark","image"],default:"default"},{key:"backgroundImage",kind:"image",label:"Background image",showWhen:{background:"image"}},{key:"overlay",kind:"select",label:"Darken",options:["0","10","20","30","40","50","60","70","80"],default:"0",showWhen:{background:"image"}}],d=[{type:"hero",inline:n,group:"attention",label:"Hero",icon:"rectangle-wide",description:"Large opening section with a headline, buttons and optional figures.",fields:[o,{key:"title",kind:"text",label:"Headline"},{key:"subtitle",kind:"textarea",label:"Subheadline"},{key:"image",kind:"image",label:"Background image",half:!0},{key:"videoBackground",kind:"video",label:"Background video",half:!0,help:"A short, silent, looping clip. Needs the background image beside it as its poster. Keep it small â it is the heaviest thing a page can carry."},{key:"align",kind:"radio",label:"Alignment",options:["center","left"]},{key:"ctas",kind:"ctas",label:"Buttons"},{key:"stats",kind:"stats",label:"Figures"}]},{type:"text",inline:[...n,"html"],inArticle:!0,group:"writing",label:"Text",icon:"align-left",description:"A block of formatted text.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"html",kind:"html",label:"Content"},{key:"align",kind:"radio",label:"Alignment",options:["left","center"]}]},{type:"imageText",inline:[...n,"html"],inArticle:!0,group:"showing",label:"Image and text",icon:"panorama",description:"An image beside a block of text.",fields:[o,{key:"image",kind:"image",label:"Image"},{key:"alt",kind:"text",label:"Describe the picture",help:"Read out to visitors who cannot see it."},{key:"mediaPosition",kind:"radio",label:"Image side",options:["left","right"]},{key:"mediaWidth",kind:"radio",label:"Image width",options:["third","half","twoThirds"],default:"half"},{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"html",kind:"html",label:"Content"},{key:"ctas",kind:"ctas",label:"Buttons"}]},{type:"image",inArticle:!0,group:"showing",label:"Image",icon:"image",description:"A single image, optionally full width.",fields:[{key:"image",kind:"image",label:"Image"},{key:"alt",kind:"text",label:"Describe the picture",help:"Read out to visitors who cannot see it. Leave empty for a purely decorative picture."},{key:"caption",kind:"text",label:"Caption"},{key:"width",kind:"select",label:"Width",options:["sm","md","lg","container","full"],default:"container"},{key:"align",kind:"radio",label:"Position",options:["left","center","right"],default:"center",showWhen:{width:["sm","md","lg"]}
1}]},{type:"features",inline:n,group:"proof",label:"Feature cards",icon:"grid-2",description:"A row of icon cards â what you do, in three or four points.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"columns",kind:"select",label:"Columns",options:["2","3","4"],default:"3"},{key:"items",kind:"features",label:"Cards",max:8}]},{type:"stats",inline:n,inArticle:!0,group:"proof",label:"Figures",icon:"chart-simple",description:"A row of numbers with labels.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"items",kind:"stats",label:"Figures"}]},{type:"cta",inline:n,group:"attention",label:"Call to action",icon:"bullhorn",description:"A highlighted panel with buttons.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"},{key:"ctas",kind:"ctas",label:"Buttons"}]},{type:"cards",inline:n,group:"showing",label:"Cards",icon:"cards",description:"Linked cards with a picture â programmes, news, anything to browse.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"columns",kind:"select",label:"Columns",options:["2","3","4"],default:"3"},{key:"style",kind:"radio",label:"Card style",options:["plain","bordered","elevated"],default:"bordered"},{key:"aspect",kind:"select",label:"Image shape",options:["16:9","4:3","1:1","none"],default:"16:9"},{key:"items",kind:"records",label:"Cards",addLabel:"Add card",max:12,fields:[{key:"image",kind:"image",label:"Image"},{key:"tag",kind:"text",label:"Label",width:"sm",max:40},{key:"title",kind:"text",label:"Title",max:120},{key:"text",kind:"textarea",label:"Text",max:240},{key:"cta",kind:"cta",label:"Button"}
1]}]},{type:"logos",inline:n,group:"showing",label:"Logos",icon:"handshake",description:"A wall of partner or funder logos.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"columns",kind:"select",label:"Columns",options:["4","5","6"],default:"5"},{key:"grayscale",kind:"switch",label:"Show them in grey"},{key:"items",kind:"records",label:"Logos",addLabel:"Add logo",max:24,fields:[{key:"image",kind:"image",label:"Logo"},{key:"name",kind:"text",label:"Name",max:80},{key:"url",kind:"text",label:"Website"}]}]},{type:"quote",inArticle:!0,group:"proof",label:"Quote",icon:"quote-left",description:"One pulled quote with its attribution.",fields:[{key:"quote",kind:"textarea",label:"Quote",max:400},{key:"author",kind:"text",label:"Who said it",width:"sm",max:80},{key:"role",kind:"text",label:"Their role",width:"sm",max:120},{key:"image",kind:"image",label:"Portrait"},{key:"align",kind:"radio",label:"Alignment",options:["center","left"]}]},{type:"testimonials",inline:n,group:"proof",label:"Testimonials",icon:"comments",description:"Several short endorsements with a face and a name.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"display",kind:"radio",label:"Show as",options:["grid","slider"]},{key:"items",kind:"records",label:"Testimonials",addLabel:"Add testimonial",max:8,fields:[{key:"quote",kind:"textarea",label:"What they said",max:400},{key:"author",kind:"text",label:"Name",width:"sm",max:80},{key:"role",kind:"text",label:"Role",width:"sm",max:120},{key:"location",kind:"text",label:"Where",width:"sm",max:80},{key:"image",kind:"image",label:"Portrait"}]}]},{type:"people",inline:n,group:"proof",label:"People",icon:"users",description:"A team, a board, a list of speakers.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"columns",kind:"select",label:"Columns",options:["2","3","4"],default:"3"},{key:"items",kind:"records",label:"People",addLabel:"Add person",max:24,fields:[{key:"image",kind:"image",label:"Photograph"},{key:"name",kind:"text",label:"Name",width:"sm",max:80,required:!0},{key:"role",kind:"text",label:"Role",width:"sm",max:120},{key:"bio",kind:"textarea",label:"A line about them",max:400}]}]},{type:"faq",inline:n,group:"writing",label:"Questions",icon:"circle-question",description:"Questions with answers that open.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"items",kind:"records",label:"Questions",addLabel:"Add question",max:20,fields:[{key:"question",kind:"text",label:"Question",max:200,required:!0},{key:"answer",kind:"html",label:"Answer"}]}]}
1,{type:"banner",group:"attention",label:"Banner",icon:"panorama",description:"A full-width picture with a heading and a button on it.",fields:[{key:"image",kind:"image",label:"Image",half:!0,required:!0},{key:"videoBackground",kind:"video",label:"Background video",half:!0,help:"A short, silent, looping clip drawn over the image. Keep it small."},{key:"overlay",kind:"select",label:"Darken",options:["0","10","20","30","40","50","60","70","80"],default:"0"},{key:"height",kind:"radio",label:"Height",options:["sm","md","lg"],default:"md"},o,{key:"title",kind:"text",label:"Headline"},{key:"subtitle",kind:"textarea",label:"Text"},{key:"ctas",kind:"ctas",label:"Buttons"}]},{type:"gallery",inline:n,inArticle:!0,group:"showing",label:"Gallery",icon:"images",description:"A grid of photographs.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"columns",kind:"select",label:"Columns",options:["2","3","4"],default:"3"},{key:"aspect",kind:"select",label:"Image shape",options:["16:9","4:3","1:1","none"],default:"4:3"},{key:"lightbox",kind:"switch",label:"Open pictures full size"},{key:"items",kind:"records",label:"Pictures",addLabel:"Add picture",max:24,fields:[{key:"image",kind:"image",label:"Picture"},{key:"alt",kind:"text",label:"Describe the picture",max:200},{key:"caption",kind:"text",label:"Caption",max:160}]}]},{type:"video",inline:n,inArticle:!0,group:"showing",label:"Video",icon:"circle-play",description:"One video or podcast episode.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"videoId",kind:"videoLink",providerKey:"provider",providers:["youtube","vimeo","spotify","soundcloud"],label:"Video link",help:"Paste the address from the share button. An id typed by hand works too, once the service below is chosen."},{key:"ratio",kind:"radio",label:"Shape",options:["16:9","4:3","1:1"]},{key:"caption",kind:"text",label:"Caption"}]},{type:"columns",inline:n,inArticle:!0,group:"writing",label:"Columns",icon:"table-columns",description:"Two or three columns of text.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"count",kind:"radio",label:"Columns",options:["2","3"]},{key:"items",kind:"records",label:"Columns",addLabel:"Add column",max:3,fields:[{key:"title",kind:"text",label:"Heading",max:120},{key:"html",kind:"html",label:"Text"}]}]},{type:"divider",inArticle:!0,group:"writing",label:"Divider",icon:"minus",description:"A rule or a gap between two sections.",fields:[{key:"style",kind:"radio",label:"Style",options:["line","space"]},{key:"size",kind:"radio",label:"Size",options:["sm","md","lg"],default:"md"}]},{type:"events",inline:n,label:"Events",icon:"calendar-days",isSystem:!0,description:"Upcoming public events, pulled from the platform.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"},{key:"limit",kind:"number",label:"How many to show"}]},{type:"donate",label:"Donations",icon:"hand-holding-heart",isSystem:!0,description:"Donation panel. Needs online payments enabled.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"},{key:"action",kind:"select",label:"Donate button",options:["popup","page"]}]},{type:"newsletter",inline:n,label:"Newsletter",icon:"envelope",isSystem:!0,description:"Newsletter sign-up form.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"}]},{type:"chapters",inline:n,label:"Chapters",icon:"map-location-dot",isSystem:!0,description:"Map and list of local chapters.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"}]},{type:"articles",inline:n,label:"News",icon:"newspaper",isSystem:!0,description:"Your latest articles, newest first.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"},{key:"limit",kind:"number",label:"How many to show"},{key:"category",kind:"text",label:"Only this category",width:"sm"},{key:"display",kind:"radio",label:"Show as",options:["grid","list"]}]},{type:"contact",inline:n,label:"Contact",icon:"address-card",isSystem:!0,hidden:!0,description:"Contact email and social links from your settings.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Text"}]},{type:"form",inline:n,label:"Form",icon:"clipboard-list-check",isSystem:!0,description:"One of your forms, filled
1in on the page itself.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"formUuid",kind:"orgoForm",label:"Form",help:'Only forms anyone can answer are listed. A form set to "Only registered users" cannot be filled in on a public page.'},{key:"display",kind:"radio",label:"Layout",options:["column","textLeft","textRight"]},{key:"html",kind:"html",label:"Text beside the form",showWhen:{display:["textLeft","textRight"]}}]},{type:"files",inline:n,label:"Files",icon:"file-lines",isSystem:!0,description:"Documents to download, from files you have shared in Drive.",fields:[o,{key:"title",kind:"text",label:"Title"},{key:"subtitle",kind:"textarea",label:"Intro"},{key:"items",kind:"records",label:"Files",addLabel:"Add file",max:30,fields:[{key:"slug",kind:"driveFile",label:"File",fillKeys:{title:"title",fileType:"fileType",size:"size"},resetKeys:["fileType","size"]},{key:"title",kind:"text",label:"Name"},{key:"description",kind:"textarea",label:"Description"}]}]}],c=[{value:"register",label:"Become a member",needsValue:!1},{value:"login",label:"Login",needsValue:!1},{value:"donate",label:"Donate",needsValue:!1},{value:"newsletter",label:"Newsletter",needsValue:!1},{value:"events",label:"Events",needsValue:!1},{value:"page",label:"Another page",needsValue:!0,valueLabel:"Page address"},{value:"url",label:"External link",needsValue:!0,valueLabel:"https://â¦"},{value:"anchor",label:"Section on this page",needsValue:!0,valueLabel:"Section id"}],u=Object.keys(s);function h(e){return d.find(t=>t.type===e)||null}function p(e,t){if(!e.showWhen)return!0;const i=t?t[e.key]:null;return!(null===i||void 0===i||""===i||Array.isArray(i)&&!i.length)||Object.entries(e.showWhen).every(([e,i])=>{const a=t?t[e]:void 0;return Array.isArray(i)?i.includes(a):a===i})}},45456:function(e,t,i){i.d(t,{A:function(){return c}});var a=i(20641),s=i(90033),l=i(53751);function o(e,t,i,o,n,r){return(0,a.uX)(),(0,a.Wv)((0,a.$y)(i.tag),{class:(0,s.C4)([e.$attrs.class,{"o-we-editable":i.editing,"is-empty":i.editing&&!i.modelValue}]),contenteditable:i.editing?"plaintext-only":null,"data-placeholder":i.placeholder,spellcheck:i.editing?"true":null,onInput:r.onInput,onBlur:r.onBlur,onKeydown:[(0,l.jR)((0,l.D$)(r.onEnter,["prevent"]),["enter"]),(0,l.jR)((0,l.D$)(r.onEscape,["prevent"]),["esc"])],onPaste:r.onPaste},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(i.modelValue),1)]),_:1},40,["class","contenteditable","data-placeholder","spellcheck","onInput","onBlur","onKeydown","onPaste"])}var n={name:"WebsiteEditable",inheritAttrs:!1,props:{modelValue:{type:String,default:""},tag:{type:String,default:"span"},editing:{type:Boolean,default:!1},placeholder:{type:String,default:""}},emits:["update:modelValue"],methods:{onInput(e){this.$emit("update:modelValue",e.target.innerText.trim())},onBlur(e){this.$emit("update:modelValue",e.target.innerText.trim())},onEnter(e){e.target.blur()},onEscape(e){e.target.innerText=this.modelValue,e.target.blur()},onPaste(e){e.preventDefault();const t=(e.clipboardData||window.clipboardData).getData("text/plain");document.execCommand("insertText",!1,t.replace(/\s+/g," "))}}},r=i(66262);const d=(0,r.A)(n,[["render",o],["__scopeId","data-v-464dcad8"]]);var c=d},55510:function(e,t,i){i.d(t,{A:function(){return h}});var a=i(20641),s=i(90033);const l=["href"],o=["href","onClick"];function n(e,t,i,n,r,d){const c=(0,a.g2)("router-link");return i.ctas.length?((0,a.uX)(),(0,a.CE)("div",{key:0,class:(0,s.C4)(["o-wb-ctas",[d.alignClass,{"is-on-dark":i.onDark,"is-on-media":i.onMedia}]])},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.ctas,(e,t)=>((0,a.uX)(),(0,a.CE)(a.FK,{key:t},[d.target(e).to?((0,a.uX)(),(0,a.Wv)(c,{key:0,class:(0,s.C4)(["o-wb-btn",d.buttonClass(t)]),to:d.target(e).to},{default:(0,a.k6)(()=>[(0,a.eW)((0,s.v_)(e.label),1)]),_:2},1032,["class","to"])):d.target(e).href?((0,a.uX)(),(0,a.CE)("a",{key:1,class:(0,s.C4)(["o-wb-btn",d.buttonClass(t)]),href:d.target(e).href,target:"_blank",rel:"noopener noreferrer"},(0,s.v_)(e.label),11,l)):d.target(e).hash?((0,a.uX)(),(0,a.CE)("a",{key:2,class:(0,s.C4)(["o-wb-btn",d.buttonClass(t)]),href:`#${d.target(e).hash}`,onClick:t=>d.scrollToAnchor(t,d.target(e).hash)},(0,s.v_)(e.label),11,o)):(0,a.Q3)("",!0)],64))),128))],2)):(0,a.Q3)("",!0)}
1var r=i(95322),d={name:"WebsiteBlockCtas",mixins:[r.A],props:{ctas:{type:Array,default:()=>[]},align:{type:String,default:"center"},onDark:{type:Boolean,default:!1},onMedia:{type:Boolean,default:!1}},computed:{alignClass(){return"left"===this.align?"is-left":"is-center"}},methods:{target(e){return this.websiteCtaTarget(e)},buttonClass(e){return 0===e?"o-wb-btn--primary":"o-wb-btn--secondary"},scrollToAnchor(e,t){"undefined"!==typeof document&&document.getElementById(t)&&(e.preventDefault(),this.websiteScrollTo(t))}}},c=i(66262);const u=(0,c.A)(d,[["render",n],["__scopeId","data-v-05980ec2"]]);var h=u},65357:function(e,t,i){i.d(t,{A:function(){return Oe}});var a=i(20641),s=i(90033);const l={class:"o-wb-renderer"};function o(e,t,i,o,n,r){const d=(0,a.g2)("WebsiteBlockFrame"),c=(0,a.g2)("WebsiteIcon");return(0,a.uX)(),(0,a.CE)("div",l,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(r.renderableBlocks,(t,s)=>((0,a.uX)(),(0,a.Wv)(d,{key:`${t.block.type}-${t.index}`,editing:i.editing,label:r.definitionFor(t.block).label,icon:r.definitionFor(t.block).icon,"is-first":0===s,"is-last":s===r.renderableBlocks.length-1,"is-active":n.activeIndex===t.index,"section-id":t.block.layout&&t.block.layout.id,"layout-classes":r.layoutClasses(t.block),"layout-style":r.layoutStyle(t.block),onActivate:e=>n.activeIndex=t.index,onMove:e=>r.move(t.index,e),onRemove:e=>r.remove(t.index),onInsert:i=>e.$emit("insert",t.index+1),onConfigure:i=>e.$emit("configure",t.index)},{default:(0,a.k6)(()=>[((0,a.uX)(),(0,a.Wv)((0,a.$y)(r.componentFor(t.block.type)),(0,a.v6)({ref_for:!0},r.propsFor(t.block),{editing:i.editing,onUpdate:e=>r.patch(t.index,e)}),null,16,["editing","onUpdate"]))]),_:2},1032,["editing","label","icon","is-first","is-last","is-active","section-id","layout-classes","layout-style","onActivate","onMove","onRemove","onInsert","onConfigure"]))),128)),i.editing&&!r.renderableBlocks.length?((0,a.uX)(),(0,a.CE)("button",{key:0,class:"o-wb-renderer__empty",onClick:t[0]||(t[0]=t=>e.$emit("insert",0))},[(0,a.bF)(c,{name:"plus"}),(0,a.eW)(" "+(0,s.v_)(e.$t("Add your first section")),1)])):(0,a.Q3)("",!0)])}i(44114),i(18111),i(22489),i(61701);const n=["poster"],r=["src","type"],d={key:1,class:"o-wb-hero__scrim"},c={class:"o-wb-shell o-wb-hero__inner"};function u(e,t,i,l,o,u){const h=(0,a.g2)("WebsiteEditable"),p=(0,a.g2)("WebsiteBlockCtas"),b=(0,a.g2)("WebsiteStatsGrid");return(0,a.uX)(),(0,a.CE)("section",{id:"top",class:(0,s.C4)(["o-wb-hero",[`is-${u.align}`,{"has-image":!!u.imageUrl,"has-video":!!u.videoUrl,"has-media":u.hasMedia}]]),style:(0,s.Tr)(u.heroStyle)},[u.videoUrl?((0,a.uX)(),(0,a.CE)("video",{key:0,class:"o-wb-hero__video",poster:u.imageUrl,autoplay:"",muted:"",loop:"",playsinline:"",preload:"metadata","aria-hidden":"true",tabindex:"-1"},[(0,a.Lk)("source",{src:u.videoUrl,type:u.videoType},null,8,r)],8,n)):(0,a.Q3)("",!0),u.hasMedia?((0,a.uX)(),(0,a.CE)("div",d)):(0,a.Q3)("",!0),(0,a.Lk)("div",c,[u.showEyebrow&&(i.block.eyebrow||i.editing)?((0,a.uX)(),(0,a.Wv)(h,{key:0,class:"o-wb-hero__eyebrow","model-value":i.block.eyebrow,editing:i.editing,placeholder:e.$t("Eyebrow"),"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update",{eyebrow:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),i.block.title||i.editing?((0,a.uX)(),(0,a.Wv)(h,{key:1,tag:"h1",class:"o-wb-hero__title","model-value":i.block.title,editing:i.editing,placeholder:e.$t("Headline"),"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update",{title:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),i.block.subtitle||i.editing?((0,a.uX)(),(0,a.Wv)(h,{key:2,tag:"p",class:"o-wb-hero__subtitle","model-value":i.block.subtitle,editing:i.editing,placeholder:e.$t("Subheadline"),"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update",{subtitle:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),(0,a.bF)(p,{ctas:i.block.ctas||[],align:u.align,"on-media":u.hasMedia||e.websiteBlockOnMedia(i.block)},null,8,["ctas","align","on-media"]),u.stats.length?((0,a.uX)(),(0,a.Wv)(b,{key:3,class:"o-wb-hero__stats",items:u.stats},null,8,["items"])):(0,a.Q3)("",!0)])],6)}var h=i(95322),p=i(55510);const b={class:"o-wb-stats__grid"},m={class:"o-wb-stats__value"},g={class:"o-wb-stats__label"};function k(e,t,i,l,o,n){return(0,a.uX)(),(0,a.CE)("div",b,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.items,(e,t)=>((0,a.uX)(),(0,a.CE)("div",{key:t,class:"o-wb-stats__item"},[(0,a.Lk)("span",m,(0,s.v_)(e.value),1),(0,a.Lk)("span",g,(0,s.v_)(e.label),1)]))),128))])}var y={name:"WebsiteStatsGrid",props:{items:{type:Array,default:()=>[]}}},f=i(66262);const v=(0,f.A)(y,[["render",k],["__scopeId","data-v-0d508181"]]);var w=v,_=i(45456),$={name:"WebsiteBlockHero",components:{WebsiteBlockCtas:p.A,WebsiteStatsGrid:w,WebsiteEditable:_.A},mixins:[h.A],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"],computed:{align(){return"left"===this.block.align?"left":"center"},showEyebrow(){return!1!==this.block.showEyebrow},stats(){return this.block.stats||[]},imageUrl(){return this.websiteImageUrl(this.block.image)}
1,hasMedia(){return!!this.imageUrl||!!this.block.videoBackground},videoUrl(){return this.editing?null:this.websiteImageUrl(this.block.videoBackground)},videoType(){return String(this.block.videoBackground||"").endsWith(".webm")?"video/webm":"video/mp4"},heroStyle(){return this.imageUrl?{backgroundImage:`url("${this.imageUrl}")`}:this.block.layout?.background&&"default"!==this.block.layout.background?{}:{background:"var(--orgo-w-hero-bg)"}}}};const C=(0,f.A)($,[["render",u],["__scopeId","data-v-e62501cc"]]);var L=C;const A={class:"o-wb-shell o-wb-text__inner"},S=["innerHTML"];function F(e,t,i,l,o,n){const r=(0,a.g2)("WebsiteSectionHead"),d=(0,a.g2)("WebsiteRichText");return(0,a.uX)(),(0,a.CE)("section",{class:(0,s.C4)(["o-wb-text",`is-${n.align}`])},[(0,a.Lk)("div",A,[(0,a.bF)(r,{eyebrow:i.block.eyebrow,"show-eyebrow":!1!==i.block.showEyebrow,title:i.block.title,subtitle:i.block.subtitle,align:n.align,editing:i.editing,onUpdate:t[0]||(t[0]=t=>e.$emit("update",t))},null,8,["eyebrow","show-eyebrow","title","subtitle","align","editing"]),i.editing?((0,a.uX)(),(0,a.Wv)(d,{key:0,"model-value":i.block.html||"",variant:"inline","content-class":"o-wb-prose",placeholder:e.$t("Write the text of this sectionâ¦"),"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update",{html:t}))},null,8,["model-value","placeholder"])):i.block.html?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"o-wb-prose",innerHTML:i.block.html},null,8,S)):(0,a.Q3)("",!0)])],2)}var E=i(92736),x=i(78219),T={name:"WebsiteBlockText",components:{WebsiteSectionHead:E.A,WebsiteRichText:x.A},props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"],computed:{align(){return"center"===this.block.align?"center":"left"}}};const P=(0,f.A)(T,[["render",F],["__scopeId","data-v-33311d2e"]]);var W=P;const D={class:"o-wb-imagetext"},V={class:"o-wb-shell"},I=["src","alt"],U={key:1,class:"o-wb-imagetext__placeholder","aria-hidden":"true"},X={class:"o-wb-imagetext__body"},H=["innerHTML"];function B(e,t,i,l,o,n){const r=(0,a.g2)("WebsiteSectionHead"),d=(0,a.g2)("WebsiteIcon"),c=(0,a.g2)("WebsiteEditable"),u=(0,a.g2)("WebsiteRichText"),h=(0,a.g2)("WebsiteBlockCtas");return(0,a.uX)(),(0,a.CE)("section",D,[(0,a.Lk)("div",V,[i.block.eyebrow||i.block.subtitle||i.editing?((0,a.uX)(),(0,a.Wv)(r,{key:0,eyebrow:i.block.eyebrow,"show-eyebrow":!1!==i.block.showEyebrow,"show-title":!1,subtitle:i.block.subtitle,editing:i.editing,onUpdate:t[0]||(t[0]=t=>e.$emit("update",t))},null,8,["eyebrow","show-eyebrow","subtitle","editing"])):(0,a.Q3)("",!0),(0,a.Lk)("div",{class:(0,s.C4)(["o-wb-imagetext__grid",[`is-media-${n.mediaWidth}`,"right"===i.block.mediaPosition?"is-media-second":null]])},[(0,a.Lk)("div",{class:(0,s.C4)(["o-wb-imagetext__media",{"is-second":"right"===i.block.mediaPosition}])},[n.imageUrl?((0,a.uX)(),(0,a.CE)("img",{key:0,src:n.imageUrl,alt:i.block.alt||i.block.title||"",loading:"lazy",class:"o-wb-imagetext__img"},null,8,I)):((0,a.uX)(),(0,a.CE)("div",U,[(0,a.bF)(d,{name:"image"})]))],2),(0,a.Lk)("div",X,[i.block.title||i.editing?((0,a.uX)(),(0,a.Wv)(c,{key:0,tag:"h2",class:"o-wb-imagetext__title","model-value":i.block.title,editing:i.editing,placeholder:e.$t("Section title"),"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update",{title:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),i.editing?((0,a.uX)(),(0,a.Wv)(u,{key:1,"model-value":i.block.html||"",variant:"inline","content-class":"o-wb-prose",placeholder:e.$t("Write the text of this sectionâ¦"),"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update",{html:t}))},null,8,["model-value","placeholder"])):i.block.html?((0,a.uX)(),(0,a.CE)("div",{key:2,class:"o-wb-prose",innerHTML:i.block.html},null,8,H)):(0,a.Q3)("",!0),(0,a.bF)(h,{ctas:i.block.ctas||[],align:"left"},null,8,["ctas"])])],2)])])}var O=i(19318),R={name:"WebsiteBlockImageText",components:{WebsiteSectionHead:E.A,WebsiteEditable:_.A,WebsiteBlockCtas:p.A,WebsiteRichText:x.A,WebsiteIcon:O.A},mixins:[h.A],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"],computed:{imageUrl(){return this.websiteImageUrl(this.block.image)},mediaWidth(){return["third","twoThirds"].includes(this.block.mediaWidth)?this.block.mediaWidth:"half"}}};const N=(0,f.A)(R,[["render",B],["__scopeId","data-v-4d1a8966"]]);var Q=N;const M={class:"o-wb-image__figure"},K=["src","alt"],q={key:1,class:"o-wb-image__placeholder","aria-hidden":"true"},G={key:2,class:"o-wb-image__caption"};function j(e,t,i,l,o,n){const r=(0,a.g2)("WebsiteIcon");return n.imageUrl||i.editing?((0,a.uX)(),(0,a.CE)("section",{key:0,class:(0,s.C4)(["o-wb-image",[`is-${n.width}`,n.isSized?`is-align-${n.align}`:null]])},[(0,a.Lk)("figure",M,[n.imageUrl?((0,a.uX)(),(0,a.CE)("img",{key:0,src:n.imageUrl,alt:i.block.alt||i.block.caption||"",loading:"lazy",class:"o-wb-image__img"}
1,null,8,K)):((0,a.uX)(),(0,a.CE)("div",q,[(0,a.bF)(r,{name:"image"})])),i.block.caption?((0,a.uX)(),(0,a.CE)("figcaption",G,(0,s.v_)(i.block.caption),1)):(0,a.Q3)("",!0)])],2)):(0,a.Q3)("",!0)}var z={name:"WebsiteBlockImage",components:{WebsiteIcon:O.A},mixins:[h.A],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"],computed:{imageUrl(){return this.websiteImageUrl(this.block.image)},width(){return["sm","md","lg","full"].includes(this.block.width)?this.block.width:"container"},isSized(){return["sm","md","lg"].includes(this.width)},align(){return["left","right"].includes(this.block.align)?this.block.align:"center"}}};const Y=(0,f.A)(z,[["render",j],["__scopeId","data-v-e410cd0e"]]);var J=Y;const Z={key:0,class:"o-wb-stats"},ee={class:"o-wb-shell"};function te(e,t,i,s,l,o){const n=(0,a.g2)("WebsiteSectionHead"),r=(0,a.g2)("WebsiteStatsGrid");return o.items.length||i.editing?((0,a.uX)(),(0,a.CE)("section",Z,[(0,a.Lk)("div",ee,[(0,a.bF)(n,{eyebrow:i.block.eyebrow,"show-eyebrow":!1!==i.block.showEyebrow,title:i.block.title,subtitle:i.block.subtitle,editing:i.editing,onUpdate:t[0]||(t[0]=t=>e.$emit("update",t))},null,8,["eyebrow","show-eyebrow","title","subtitle","editing"]),(0,a.bF)(r,{items:o.items},null,8,["items"])])])):(0,a.Q3)("",!0)}var ie={name:"WebsiteBlockStats",components:{WebsiteSectionHead:E.A,WebsiteStatsGrid:w},props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"],computed:{items(){return this.block.items||[]}}};const ae=(0,f.A)(ie,[["render",te],["__scopeId","data-v-66e44bc7"]]);var se=ae,le=i(53751);const oe={key:0,class:"o-wb-features"},ne={class:"o-wb-shell"},re={class:"o-wb-features__icon"},de=["aria-label","title","onClick"];function ce(e,t,i,l,o,n){const r=(0,a.g2)("WebsiteSectionHead"),d=(0,a.g2)("WebsiteIcon"),c=(0,a.g2)("WebsiteEditable");return n.items.length||i.editing?((0,a.uX)(),(0,a.CE)("section",oe,[(0,a.Lk)("div",ne,[(0,a.bF)(r,{eyebrow:i.block.eyebrow,"show-eyebrow":!1!==i.block.showEyebrow,title:i.block.title,subtitle:i.block.subtitle,editing:i.editing,onUpdate:t[0]||(t[0]=t=>e.$emit("update",t))},null,8,["eyebrow","show-eyebrow","title","subtitle","editing"]),n.items.length?((0,a.uX)(),(0,a.CE)("div",{key:0,class:(0,s.C4)(["o-wb-features__grid",`is-${n.columns}`])},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(n.items,(t,l)=>((0,a.uX)(),(0,a.CE)("article",{key:l,class:(0,s.C4)(["o-wb-features__card",{"is-editing":i.editing}])},[(0,a.Lk)("span",re,[(0,a.bF)(d,{name:t.icon||"star"},null,8,["name"])]),t.title||i.editing?((0,a.uX)(),(0,a.Wv)(c,{key:0,tag:"h3",class:"o-wb-features__title","model-value":t.title,editing:i.editing,placeholder:e.$t("Card title"),"onUpdate:modelValue":e=>n.setItem(l,"title",e)},null,8,["model-value","editing","placeholder","onUpdate:modelValue"])):(0,a.Q3)("",!0),t.text||i.editing?((0,a.uX)(),(0,a.Wv)(c,{key:1,tag:"p",class:"o-wb-features__text","model-value":t.text,editing:i.editing,placeholder:e.$t("Card text"),"onUpdate:modelValue":e=>n.setItem(l,"text",e)},null,8,["model-value","editing","placeholder","onUpdate:modelValue"])):(0,a.Q3)("",!0),i.editing?((0,a.uX)(),(0,a.CE)("button",{key:2,class:"o-wb-features__remove","aria-label":e.$t("Remove card"),title:e.$t("Remove card"),onClick:(0,le.D$)(e=>n.removeItem(l),["stop"])},[(0,a.bF)(d,{name:"trash"})],8,de)):(0,a.Q3)("",!0)],2))),128)),i.editing&&n.items.length<n.maxItems?((0,a.uX)(),(0,a.CE)("button",{key:0,class:"o-wb-features__add",onClick:t[1]||(t[1]=(0,le.D$)((...e)=>n.addItem&&n.addItem(...e),["stop"]))},[(0,a.bF)(d,{name:"plus"}),(0,a.eW)(" "+(0,s.v_)(e.$t("Add card")),1)])):(0,a.Q3)("",!0)],2)):i.editing?((0,a.uX)(),(0,a.CE)("button",{key:1,class:"o-wb-features__add is-standalone",onClick:t[2]||(t[2]=(0,le.D$)((...e)=>n.addItem&&n.addItem(...e),["stop"]))},[(0,a.bF)(d,{name:"plus"}),(0,a.eW)(" "+(0,s.v_)(e.$t("Add card")),1)])):(0,a.Q3)("",!0)])])):(0,a.Q3)("",!0)}const ue=8;var he={name:"WebsiteBlockFeatures",components:{WebsiteSectionHead:E.A,WebsiteEditable:_.A,WebsiteIcon:O.A},props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"],computed:{items(){return this.block.items||[]},columns(){return this.block.columns||"3"},maxItems(){return ue}},methods:{setItems(e){this.$emit("update",{items:e})},setItem(e,t,i){const a=[...this.items];a[e]={...a[e],[t]:i},this.setItems(a)},addItem(){this.setItems([...this.items,{icon:"star",title:this.$t("Card title"),text:""}])},removeItem(e){const t=[...this.items];t.splice(e,1),this.setItems(t)}}};const pe=(0,f.A)(he,[["render",ce],["__scopeId","data-v-6c7b5412"]]);var be=pe;const me={key:0,class:"o-wb-cta"},ge={class:"o-wb-shell"},ke={class:"o-wb-cta__panel"};function ye(e,t,i,s,l,o){const n=(0,a.g2)("WebsiteEditable"),r=(0,a.g2)("WebsiteBlockCtas");return i.block.title||i.block.subtitle||i.block.ctas&&i.block.ctas.length||i.editing?((0,a.uX)(),(0,a.CE)("section",me,[(0,a.Lk)("div",ge,[(0,a.Lk)("div",ke,[!1!==i.block.showEyebrow&&(i.block.eyebrow||i.editing)?((0,a.uX)(),(0,a.Wv)(n,{key:0,class:"o-wb-cta__eyebrow","model-value":i.block.eyebrow,editing:i.editing,placeholder:e.$t("Eyebrow"),"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update",{eyebrow:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),i.block.title||i.editing?((0,a.uX)(),(0,a.Wv)(n,{key:1,tag:"h2",class:"o-wb-cta__title","model-value":i.block.title,editing:i.editing,placeholder:e.$t("Section title"),"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update",{title:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),i.block.subtitle||i.editing?((0,a.uX)(),(0,a.Wv)(n,{key:2,tag:"p",class:"o-wb-cta__subtitle","model-value":i.block.subtitle,editing:i.editing,placeholder:e.$t("Short intro"),"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update",{subtitle:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),(0,a.bF)(r,{ctas:i.block.ctas||[],align:"center","on-dark":""},null,8,["ctas"])])])])):(0,a.Q3)("",!0)}var fe={name:"WebsiteBlockCta",components:{WebsiteBlockCtas:p.A,WebsiteEditable:_.A},props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},emits:["update"]};const ve=(0,f.A)(fe,[["render",ye],["__scopeId","data-v-5705fce8"]]);var we=ve;const _e=["id"],$e={key:0,class:"o-we-frame__bar"},Ce={class:"o-we-frame__label"},Le={class:"o-we-frame__actions"},Ae=["disabled","aria-label"],Se=["disabled","aria-label"],Fe=["aria-label"],Ee=["aria-label"],xe=["aria-label"],Te={class:"o-we-frame__insert-dot"};function Pe(e,t,i,l,o,n){const r=(0,a.g2)("font-awesome-icon");return(0,a.uX)(),(0,a.CE)("div",{id:i.sectionId||null,class:(0,s.C4)(["o-we-frame",[{"is-editing":i.editing,"is-active":i.editing&&i.isActive},i.layoutClasses]]),style:(0,s.Tr)(i.layoutStyle),onClick:t[5]||(t[5]=t=>i.editing&&e.$emit("activate"))},[i.editing?((0,a.uX)(),(0,a.CE)("div",$e,[(0,a.Lk)("span",Ce,[(0,a.bF)(r,{icon:["fal",i.icon]}
1,null,8,["icon"]),(0,a.eW)(" "+(0,s.v_)(e.$t(i.label)),1)]),(0,a.Lk)("span",Le,[(0,a.Lk)("button",{class:"o-we-frame__btn",disabled:i.isFirst,"aria-label":e.$t("Move up"),onClick:t[0]||(t[0]=(0,le.D$)(t=>e.$emit("move",-1),["stop"]))},[(0,a.bF)(r,{icon:["fal","arrow-up"]})],8,Ae),(0,a.Lk)("button",{class:"o-we-frame__btn",disabled:i.isLast,"aria-label":e.$t("Move down"),onClick:t[1]||(t[1]=(0,le.D$)(t=>e.$emit("move",1),["stop"]))},[(0,a.bF)(r,{icon:["fal","arrow-down"]})],8,Se),(0,a.Lk)("button",{class:"o-we-frame__btn","aria-label":e.$t("All settings"),onClick:t[2]||(t[2]=(0,le.D$)(t=>e.$emit("configure"),["stop"]))},[(0,a.bF)(r,{icon:["fal","sliders"]})],8,Fe),(0,a.Lk)("button",{class:"o-we-frame__btn is-danger","aria-label":e.$t("Remove section"),onClick:t[3]||(t[3]=(0,le.D$)(t=>e.$emit("remove"),["stop"]))},[(0,a.bF)(r,{icon:["fal","trash"]})],8,Ee)])])):(0,a.Q3)("",!0),(0,a.RG)(e.$slots,"default",{},void 0,!0),i.editing?((0,a.uX)(),(0,a.CE)("button",{key:1,class:"o-we-frame__insert","aria-label":e.$t("Add section here"),onClick:t[4]||(t[4]=(0,le.D$)(t=>e.$emit("insert"),["stop"]))},[(0,a.Lk)("span",Te,[(0,a.bF)(r,{icon:["fal","plus"]})])],8,xe)):(0,a.Q3)("",!0)],14,_e)}var We={name:"WebsiteBlockFrame",props:{editing:{type:Boolean,default:!1},label:{type:String,default:"Section"},icon:{type:String,default:"cube"},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},sectionId:{type:String,default:null},layoutClasses:{type:Array,default:()=>[]},layoutStyle:{type:Object,default:()=>({})}},emits:["move","remove","insert","configure","activate"]};const De=(0,f.A)(We,[["render",Pe],["__scopeId","data-v-24bb82c7"]]);var Ve=De,Ie=i(36412);const Ue={hero:L,text:W,imageText:Q,image:J,stats:se,features:be,cta:we,cards:()=>i.e(6297).then(i.bind(i,36297)),logos:()=>i.e(4954).then(i.bind(i,64954)),quote:()=>i.e(5949).then(i.bind(i,45949)),testimonials:()=>i.e(5963).then(i.bind(i,35963)),people:()=>i.e(9448).then(i.bind(i,59448)),faq:()=>i.e(1205).then(i.bind(i,21205)),banner:()=>i.e(4611).then(i.bind(i,24611)),gallery:()=>i.e(1572).then(i.bind(i,31572)),video:()=>i.e(8352).then(i.bind(i,68352)),columns:()=>i.e(9980).then(i.bind(i,79980)),divider:()=>i.e(2744).then(i.bind(i,22744)),contact:()=>i.e(8733).then(i.bind(i,78733)),files:()=>i.e(9454).then(i.bind(i,49454)),events:()=>i.e(6944).then(i.bind(i,96944)),donate:()=>i.e(1009).then(i.bind(i,91009)),newsletter:()=>i.e(2616).then(i.bind(i,72616)),chapters:()=>i.e(1372).then(i.bind(i,51372)),articles:()=>i.e(7187).then(i.bind(i,27187)),form:()=>i.e(6760).then(i.bind(i,56760))},Xe=["events","donate","newsletter","chapters","articles","form"];var He={name:"WebsiteRenderer",components:{WebsiteBlockFrame:Ve,WebsiteIcon:O.A},mixins:[h.A],inject:{website:{default:null},blockComponents:{default:null}},props:{blocks:{type:Array,default:()=>[]},editing:{type:Boolean,default:!1}},emits:["update:blocks","insert","configure"],data(){return{activeIndex:null,asyncComponents:{}}},computed:{components(){return this.blockComponents||Ue},renderableBlocks(){return this.blocks.map((e,t)=>({block:e,index:t})).filter(e=>!!this.components[e.block?.type]&&this.isEnabled(e.block.type))}},methods:{componentFor(e){const t=this.components[e];return"function"!==typeof t?t:(this.asyncComponents[e]||(this.asyncComponents[e]=(0,a.$V)(t)),this.asyncComponents[e])},layoutClasses(e){const t=e.layout;if(!t)return[];const i=[];return t.width&&i.push(`o-wb-block--w-${t.width}`),t.spaceTop&&i.push(`o-wb-block--pt-${t.spaceTop}`),t.spaceBottom&&i.push(`o-wb-block--pb-${t.spaceBottom}`),t.background&&i.push(`o-wb-block--bg-${t.background}`),i},layoutStyle(e){const t=e.layout;if(!t||"image"!==t.background)return{};const i=this.websiteImageUrl(t.backgroundImage);return i?{backgroundImage:`url("${i}")`,"--o-wb-overlay":(t.overlay||0)/100}:{}},definitionFor(e){return(0,Ie.Cx)(e.type)||{label:e.type,icon:"cube"}},propsFor(e){if(Xe.includes(e.type)){const t={eyebrow:e.eyebrow||null,showEyebrow:!1!==e.showEyebrow,title:e.title||null,subtitle:e.subtitle||null};return"events"===e.type&&(t.limit=e.limit||null),"donate"===e.type&&(t.action=e.action||null),"articles"===e.type&&(t.limit=e.limit||null,t.category=e.category||null,t.display=e.display||"grid"),"form"===e.type&&(t.formUuid=e.formUuid||null,t.formName=e.formName||null,t.html=e.html||null,t.display=e.display||"column"),t}return{block:e}},isEnabled(e){const t=this.website?.site?.features;return!(t&&!this.editing)||("donate"===e?!1!==t.donations:"events"===e?!1!==t.events:"chapters"===e?!1!==t.chapters:"articles"!==e||!1!==t.articles)},patch(e,t){const i=[...this.blocks];i[e]={...i[e],...t},this.$emit("update:blocks",i)},move(e,t){const i=e+t;if(i<0||i>=this.blocks.length)return;const a=[...this.blocks];[a[e],a[i]]=[a[i],a[e]],this.$emit("update:blocks",a),this.activeIndex=i},remove(e){this.$buefy.dialog.confirm({title:this.$t("Remove section"),message:this.$t("This section and everything in it will be removed from the page."),confirmText:this.$t("Remove"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>{const t=[...this.blocks];t.splice(e,1),this.$emit("update:blocks",t),this.activeIndex=null}})}}};const Be=(0,f.A)(He,[["render",o],["__scopeId","data-v-60208a25"]]);var Oe=Be},78219:function(e,t,i){i.d(t,{A:function(){return g}});var a=i(20641),s=i(90033),l=i(53751);const o={key:0,class:"o-wrt__toolbar"},n=["disabled","title","aria-label","aria-pressed","onClick"],r={class:"o-wrt__body"},d={key:0,class:"o-wrt__placeholder"};function c(e,t,i,c,u,h){const p=(0,a.g2)("font-awesome-icon"),b=(0,a.g2)("editor-content");return(0,a.uX)(),(0,a.CE)("div",{class:(0,s.C4)(["o-wrt",[`is-${i.variant}`,{"is-focused":u.isFocused}]])},[u.editor?((0,a.uX)(),(0,a.CE)("div",o,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(h.buttons,i=>((0,a.uX)(),(0,a.CE)("button",{key:i.key,type:"button",class:(0,s.C4)(["o-wrt__btn",{"is-active":i.isActive&&i.isActive(),"is-separated":i.separated}]),disabled:!!i.isDisabled&&i.isDisabled(),title:e.$t(i.label),"aria-label":e.$t(i.label),"aria-pressed":i.isActive?String(i.isActive()):null,onMousedown:t[0]||(t[0]=(0,l.D$)(()=>{},["prevent"])),onClick:e=>i.run()},[(0,a.bF)(p,{icon:["fal",i.icon]},null,8,["icon"])],42,n))),128))])):(0,a.Q3)("",!0),(0,a.Lk)("div",r,[(0,a.bF)(b,{class:"o-wrt__content",editor:u.editor},null,8,["editor"]),u.editor&&u.editor.isEmpty&&i.placeholder?((0,a.uX)(),(0,a.CE)("span",d,(0,s.v_)(i.placeholder),1)):(0,a.Q3)("",!0)])],2)}var u=i(45442),h=i(14905),p={name:"WebsiteRichText",components:{EditorContent:u.$Z},props:{modelValue:{type:String,default:""},variant:{type:String,default:"panel"},placeholder:{type:String,default:""},contentClass:{type:String,default:""}},emits:["update:modelValue"],data(){return{editor:null,isFocused:!1}},computed:{buttons(){const e=this.editor;return e?[{key:"bold",icon:"bold",label:"Bold",run:()=>e.chain().focus().toggleBold().run(),isActive:()=>e.isActive("bold")},{key:"italic",icon:"italic",label:"Italic",run:()=>e.chain().focus().toggleItalic().run(),isActive:()=>e.isActive("italic")},{key:"underline",icon:"underline",label:"Underline",run:()=>e.chain().focus().toggleUnderline().run(),isActive:()=>e.isActive("underline")}
1,{key:"strike",icon:"strikethrough",label:"Strikethrough",run:()=>e.chain().focus().toggleStrike().run(),isActive:()=>e.isActive("strike")},{key:"h2",icon:"h2",label:"Heading",separated:!0,run:()=>e.chain().focus().toggleHeading({level:2}).run(),isActive:()=>e.isActive("heading",{level:2})},{key:"h3",icon:"h3",label:"Subheading",run:()=>e.chain().focus().toggleHeading({level:3}).run(),isActive:()=>e.isActive("heading",{level:3})},{key:"bulletList",icon:"list-ul",label:"Bulleted list",separated:!0,run:()=>e.chain().focus().toggleBulletList().run(),isActive:()=>e.isActive("bulletList")},{key:"orderedList",icon:"list-ol",label:"Numbered list",run:()=>e.chain().focus().toggleOrderedList().run(),isActive:()=>e.isActive("orderedList")},{key:"blockquote",icon:"quote-left",label:"Quote",run:()=>e.chain().focus().toggleBlockquote().run(),isActive:()=>e.isActive("blockquote")},{key:"link",icon:"link",label:"Add link",separated:!0,run:()=>this.promptForLink(),isActive:()=>e.isActive("link")},{key:"unlink",icon:"link-slash",label:"Remove link",run:()=>e.chain().focus().unsetLink().run(),isDisabled:()=>!e.isActive("link")},{key:"clear",icon:"text-slash",label:"Clear formatting",run:()=>e.chain().focus().unsetAllMarks().clearNodes().run()},{key:"undo",icon:"undo",label:"Undo",separated:!0,run:()=>e.chain().focus().undo().run(),isDisabled:()=>!e.can().undo()},{key:"redo",icon:"redo",label:"Redo",run:()=>e.chain().focus().redo().run(),isDisabled:()=>!e.can().redo()}]:[]}},watch:{modelValue(e){this.editor&&e!==this.editor.getHTML()&&this.editor.commands.setContent(e||"",{emitUpdate:!1})}},mounted(){this.editor=new u.KE({content:this.modelValue||"",extensions:[h.W.configure({heading:{levels:[2,3]},link:{openOnClick:!1,autolink:!0,protocols:["http","https","mailto"]},codeBlock:!1,horizontalRule:!1})],editorProps:{attributes:this.contentClass?{class:this.contentClass}:{}},onUpdate:({editor:e})=>{this.$emit("update:modelValue",e.isEmpty?"":e.getHTML())},onFocus:()=>{this.isFocused=!0},onBlur:()=>{this.isFocused=!1}})},beforeUnmount(){this.editor&&(this.editor.destroy(),this.editor=null)},methods:{promptForLink(){const e=this.editor.getAttributes("link").href||"";this.$buefy.dialog.prompt({title:this.$t("Add link"),message:this.$t("An address starting with https://, or /page for a page on this website."),inputAttrs:{value:e,placeholder:"https://"},confirmText:this.$t("Save"),cancelText:this.$t("Cancel"),trapFocus:!0,onConfirm:e=>this.applyLink(e)})},applyLink(e){const t=(e||"").trim();t?/^(https?:\/\/|\/|#|mailto:)/i.test(t)?this.editor.chain().focus().extendMarkRange("link").setLink({href:t}).run():this.$buefy.snackbar.open({message:this.$t("An address starting with https://, or /page for a page on this website."),type:"is-danger"}):this.editor.chain().focus().unsetLink().run()}}},b=i(66262);const m=(0,b.A)(p,[["render",c],["__scopeId","data-v-bde9d49c"]]);var g=m},92736:function(e,t,i){i.d(t,{A:function(){return h}});var a=i(20641),s=i(90033);const l={key:0,class:"o-wh__eyebrow"};function o(e,t,i,o,n,r){const d=(0,a.g2)("WebsiteIcon"),c=(0,a.g2)("WebsiteEditable");return r.hasContent?((0,a.uX)(),(0,a.CE)("header",{key:0,class:(0,s.C4)(["o-wh",`is-${i.align}`])},[i.showEyebrow&&(i.eyebrow||i.editing)?((0,a.uX)(),(0,a.CE)("span",l,[i.icon?((0,a.uX)(),(0,a.Wv)(d,{key:0,name:i.icon,class:"o-wh__eyebrow-icon"},null,8,["name"])):(0,a.Q3)("",!0),(0,a.bF)(c,{"model-value":i.eyebrow,editing:i.editing,placeholder:e.$t("Eyebrow"),"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update",{eyebrow:t}))},null,8,["model-value","editing","placeholder"])])):(0,a.Q3)("",!0),i.showTitle&&(i.title||i.editing)?((0,a.uX)(),(0,a.Wv)(c,{key:1,tag:"h2",class:"o-wh__title","model-value":i.title,editing:i.editing,placeholder:e.$t("Section title"),"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update",{title:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0),i.subtitle||i.editing?((0,a.uX)(),(0,a.Wv)(c,{key:2,tag:"p",class:"o-wh__subtitle","model-value":i.subtitle,editing:i.editing,placeholder:e.$t("Short intro"),"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update",{subtitle:t}))},null,8,["model-value","editing","placeholder"])):(0,a.Q3)("",!0)],2)):(0,a.Q3)("",!0)}var n=i(45456),r=i(19318),d={name:"WebsiteSectionHead",components:{WebsiteEditable:n.A,WebsiteIcon:r.A},props:{eyebrow:{type:String,default:null},showEyebrow:{type:Boolean,default:!0},icon:{type:String,default:null},title:{type:String,default:null},showTitle:{type:Boolean,default:!0},subtitle:{type:String,default:null},align:{type:String,default:"center"},editing:{type:Boolean,default:!1}},emits:["update"],computed:{hasContent(){return this.editing||!!(this.showEyebrow&&this.eyebrow||this.title||this.subtitle)}}},c=i(66262);const u=(0,c.A)(d,[["render",o],["__scopeId","data-v-20e9e71d"]]);var h=u},95322:function(e,t,i){var a=i(28782),s=i(14470),l=i(91495);const o="https://go.orgo.space";t.A={inject:{website:{default:null}},methods:{websiteImageUrl(e){return e?`${a.hd}${a.DJ}website/${e}`:null},websiteDriveFileUrl(e){return e?`${o}/d/${e}`:null},websiteFileSize(e){if(!e)return"";const t=["B","KB","MB","GB"];let i=e,a=0;while(i>=1024&&a<t.length-1)i/=1024,a+=1;return`${i<10&&a>0?i.toFixed(1):Math.round(i)} ${t[a]}`},websiteBlockOnMedia(e){const t=e?.layout;return"image"===t?.background&&!!t?.backgroundImage},websiteCtaTarget(e){if(!e||!e.action)return{};switch(e.action){case"register":case"login":return this.websiteAppTarget("login"===e.action?"Login":"Register");case"events":return{to:{name:"EventsPublic"}};case"newsletter":return{hash:"newsletter"};case"donate":return{hash:"donate"};case"page":return{to:(0,l.K7)(this.website?.site,e.value)};case"anchor":return{hash:e.value};case"url":{const t=(0,s.es)(e.value);return t?{to:t}:{href:e.value}}default:return{}}},websiteAppTarget(e){const t=this.website?.site?.tenant?.appHost||null;if(!t||"undefined"!==typeof window&&window.location.hostname.toLowerCase()===String(t).toLowerCase())return{to:{name:e}};const i="undefined"!==typeof window?window.location.href:this.website?.site?.publicOrigin||this.website?.site?.origin||null;return{href:(0,s.pV)(t,e,i)}},websiteScrollTo(e){const t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"start"})}}}}}]);
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.