1/*! For license information please see template-selector-pages.e3d2d75b4fc897581fd0.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfolio=self.webpackChunkfolio||[]).push([[3782],{34747(t,e,o){o.d(e,{A:()=>f});var r=o(20641),n=o(90033),i=o(53751),a={key:0,class:"ufo-fab--dd-list"},l={class:"ufo-fab--dd-list-wrapper"};var s=o(8187),u=o(74256);const c={name:"fab-collapsing-container",components:{Fab:s.A},props:{displayIcon:{type:String,default:null},displayLabel:{type:String,default:null}},data:function(){return{showDropdownLoc:!1}},methods:{triggerDropdown:function(t){this.showDropdownLoc=t}},computed:{showDropdown:function(){return this.showDropdownLoc||this.$store.state.checklist.activeInteraction===u.QT.THUMBNAIL}}};const f=(0,o(66262).A)(c,[["render",function(t,e,o,s,u,c){var f=(0,r.g2)("Fab");return(0,r.uX)(),(0,r.CE)("div",{class:"ufo-fab ufo-fab--collapse",onMouseenter:e[0]||(e[0]=function(t){return c.triggerDropdown(!0)}),onMouseleave:e[1]||(e[1]=function(t){return c.triggerDropdown(!1)})},[o.displayLabel?((0,r.uX)(),(0,r.Wv)(f,{key:0,class:"dropdown-icon","custom-class":"dropdown-icon",icon:o.displayIcon},{default:(0,r.k6)(function(){return[(0,r.eW)((0,n.v_)(o.displayLabel),1)]}),_:1},8,["icon"])):((0,r.uX)(),(0,r.Wv)(f,{key:1,class:"dropdown-icon","custom-class":"dropdown-icon",icon:o.displayIcon},null,8,["icon"])),(0,r.bF)(i.Transition,{name:"drop-down-from-toolbar"},{default:(0,r.k6)(function(){return[c.showDropdown?((0,r.uX)(),(0,r.CE)("div",a,[(0,r.Lk)("div",l,[(0,r.RG)(t.$slots,"default")])])):(0,r.Q3)("v-if",!0)]}),_:3})],32)}]])},11211(t,e,o){o.d(e,{A:()=>a});var r=o(20641),n=o(90033);const i={name:"fab-container",components:{Fab:o(8187).A},props:{type:{type:String,default:null},side:{type:String,default:null},boxPosition:{type:String,default:null},collapse:{type:Boolean,default:!1},customClass:{type:String,default:null},tooltipPosition:{type:String,default:null},active:{type:Boolean,default:!1},isOpen:{type:Boolean,default:!1},handleHover:{type:Function,default:function(){return null}}}};const a=(0,o(66262).A)(i,[["render",function(t,e,o,i,a,l){var s=(0,r.g2)("fab");return(0,r.uX)(),(0,r.CE)("div",{class:(0,n.C4)(["ufo-fab--container",o.type,o.side,[o.boxPosition?"box-".concat(o.boxPosition):null],{collapse:o.collapse&&!o.active,active:o.active},o.customClass])},[(0,r.Lk)("div",{class:(0,n.C4)(["ufo-fab--wrapper",o.collapse?"horizontal":o.type,o.side,{collapse:o.collapse&&!o.active}]),onMouseenter:e[1]||(e[1]=function(){return o.handleHover(!0)})},[(0,r.RG)(t.$slots,"popover-panel"),(0,r.RG)(t.$slots,"default"),o.collapse&&"space-fabs"===o.customClass?((0,r.uX)(),(0,r.Wv)(s,{key:0,size:"small","custom-class":"spacing",icon:o.isOpen?"dots-vertical":"top"===o.tooltipPosition?"spacer-bottom":"spacer-top",onClick:e[0]||(e[0]=function(e){return t.$store.commit("openSidePanel",{panelPath:"style/spacing"})})},null,8,["icon"])):o.collapse?((0,r.uX)(),(0,r.Wv)(s,{key:1,icon:"context-menu"})):(0,r.Q3)("v-if",!0)],34)],2)}]])},74885(t,e,o){o.d(e,{A:()=>u});var r=o(20641),n=o(90033),i={class:"checkbox-container"},a=["name","checked","disabled","value"];const l={model:{prop:"modelValue",event:"change"},inheritAttrs:!1,props:{label:{type:String,default:"",required:!0},name:{type:String,default:null},modelValue:{default:""},value:{type:String,default:void 0},disabled:{type:Boolean,default:!1},darkScheme:{type:Boolean,default:!1}},computed:{isChecked:function(){return this.modelValue===this.value}},methods:{change:function(t){this.disabled||this.$emit("update:modelValue",t.target.value)},click:function(){this.disabled||this.$emit("click")}}};const s=(0,o(66262).A)(l,[["render",function(t,e,o,l,s,u){return(0,r.uX)(),(0,r.CE)("div",i,[(0,r.Lk)("label",{class:(0,n.C4)({disabled:o.disabled,dark:o.darkScheme}),onClick:e[1]||(e[1]=function(t){return u.click()})},[(0,r.Lk)("input",{type:"radio",name:o.name,checked:u.isChecked,disabled:o.disabled,value:o.value,onChange:e[0]||(e[0]=function(){return u.change&&u.change.apply(u,arguments)})},null,40,a),(0,r.Lk)("span",{class:(0,n.C4)(["checkmark",{disabled:o.disabled}])},null,2),(0,r.eW)(" "+(0,n.v_)(o.label),1)],2)])}],["__scopeId","data-v-27ea9ef4"]]),u=s},76408(t,e,o){o.d(e,{A:()=>g});var r=o(20641),n=o(90033),i=o(53751),a=o(47233);function l(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var u={class:"non-editor-page-header"},c={class:"back"},f={class:"logo-container"},d={class:"flex-container"},p={class:"titles"},m={class:"page-title"},v={class:"page-subtitle"},h={class:"cta"},b={key:0,class:"non-editor-page-content"};
2const y={name:"NonEditorPageFrame",components:{NavBarPill:o(61556).A},props:{pageTitle:{type:String,required:!0},pageSubTitle:{type:String,required:!1},alignHorizontal:{type:Boolean,default:!1},isOnboardingFlow:{type:Boolean,default:!1}},data:function(){return{loaded:!1}},mounted:function(){this.loaded=!0,this.resetPageBackgroundColor()},unmounted:function(){this.loaded=!1,document.querySelector("body").style.removeProperty("--background-fill-color")},activated:function(){this.loaded=!0,this.resetPageBackgroundColor()},deactivated:function(){this.loaded=!1},methods:{resetPageBackgroundColor:function(){document.querySelector("body").style.setProperty("--background-fill-color","#FFFFFF")},goBack:function(){this.$emit("goBack")},goToHome:function(){this.$router.push("/home")}}};const g=(0,o(66262).A)(y,[["render",function(t,e,o,s,y,g){var w=(0,r.g2)("NavBarPill");return(0,r.uX)(),(0,r.CE)("div",{class:(0,n.C4)(["non-editor-page",{"align-horizontal":o.alignHorizontal}])},[(0,r.Lk)("div",u,[(0,r.Lk)("div",c,[(0,r.Lk)("div",f,[t.$slots.logoSlot?(0,r.Q3)("v-if",!0):((0,r.uX)(),(0,r.CE)("div",{key:0,class:(0,n.C4)(o.isOnboardingFlow?"logo":"clickable-logo"),onClick:e[0]||(e[0]=function(t){return o.isOnboardingFlow?null:g.goToHome()})},l(e[2]||(e[2]=[(0,r.Lk)("img",{src:a,alt:"Logo"},null,-1)])),2))]),t.$slots.logoSlot?(0,r.RG)(t.$slots,"logoSlot",{key:0},void 0,!0):o.isOnboardingFlow?(0,r.Q3)("v-if",!0):((0,r.uX)(),(0,r.Wv)(w,{key:1,label:"Back","icon-name":"back",onButtonClicked:e[1]||(e[1]=function(t){return g.goBack()})}))]),(0,r.Lk)("div",d,[(0,r.Lk)("div",p,[(0,r.Lk)("div",m,[(0,r.Lk)("h1",null,(0,n.v_)(o.pageTitle),1),(0,r.RG)(t.$slots,"headerLabel",{},void 0,!0)]),(0,r.Lk)("p",v,(0,n.v_)(o.pageSubTitle),1)]),(0,r.Lk)("div",h,[(0,r.RG)(t.$slots,"headerCta",{},void 0,!0)])])]),(0,r.bF)(i.Transition,{name:"fade-up"},{default:(0,r.k6)(function(){return[y.loaded?((0,r.uX)(),(0,r.CE)("div",b,[(0,r.RG)(t.$slots,"default",{},void 0,!0)])):(0,r.Q3)("v-if",!0)]}),_:3})],2)}],["__scopeId","data-v-682a3a3b"]])},51164(t,e,o){o.d(e,{A:()=>p});var r=o(20641),n={class:"onboarding-template-skeleton","aria-hidden":"true"},i={class:"onboarding-template-skeleton","aria-hidden":"true"};var a=o(76408),l=o(90033);function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}const c={name:"OnboardingTemplateSkeleton",props:{index:{type:Number,default:1}}};var f=o(66262);const d={name:"OnboardingTemplateListSkeleton",components:{OnboardingTemplateSkeleton:(0,f.A)(c,[["render",function(t,e,o,n,i,a){return(0,r.uX)(),(0,r.CE)("div",{class:(0,l.C4)(["skeleton-card",{"skeleton-card--alternate":o.index%2==0}]),style:(0,l.Tr)({"--skeleton-card-index":o.index-1})},s(e[0]||(e[0]=[(0,r.Fv)('<div class="skeleton-thumbnail" data-v-bc969b08><div class="skeleton-preview-lines" data-v-bc969b08><div class="skeleton-navigation" data-v-bc969b08><div data-v-bc969b08></div><div data-v-bc969b08></div><div data-v-bc969b08></div><div data-v-bc969b08></div></div><div class="skeleton-hero" data-v-bc969b08><div class="skeleton-line skeleton-line--wide" data-v-bc969b08></div><div class="skeleton-multiline" data-v-bc969b08><div class="skeleton-line" data-v-bc969b08></div><div class="skeleton-line" data-v-bc969b08></div><div class="skeleton-line" data-v-bc969b08></div></div></div><div class="skeleton-block-grid" data-v-bc969b08><div data-v-bc969b08></div><div data-v-bc969b08></div><div data-v-bc969b08></div><div data-v-bc969b08></div></div></div></div><div class="skeleton-title" data-v-bc969b08></div>',2)])),6)}],["__scopeId","data-v-bc969b08"]]),NonEditorPageFrame:a.A},props:{withFrame:{type:Boolean,default:!1},cardCount:{type:Number,default:6}}},p=(0,f.A)(d,[["render",function(t,e,o,a,l,s){var u=(0,r.g2)("OnboardingTemplateSkeleton"),c=(0,r.g2)("NonEditorPageFrame");return o.withFrame?((0,r.uX)(),(0,r.Wv)(c,{key:0,"page-title":"Start with a solid foundation","page-sub-title":"Kick off your portfolio with a recruiter-friendly template","is-onboarding-flow":!0},{default:(0,r.k6)(function(){return[(0,r.Lk)("div",n,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(o.cardCount,function(t){return(0,r.uX)(),(0,r.Wv)(u,{key:t,index:t},null,8,["index"])}),128))]),e[0]||(e[0]=(0,r.Lk)("span",{class:"sr-only"},"Loading templates",-1))]}),_:1})):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.Lk)("div",i,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(o.cardCount,function(t){return(0,r.uX)(),(0,r.Wv)(u,{key:t,index:t},null,8,["index"])}),128))]),e[1]||(e[1]=(0,r.Lk)("span",{class:"sr-only"},"Loading templates",-1))],64))}],["__scopeId","data-v-42f41994"]])},9181(t,e,o){o.r(e),o.d(e,{default:()=>kt});var r=o(20641),n=o(90033),i=o(53751);function a(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var s={class:"portfolio-tile"},u={class:"status-displays"},c={key:0,class:"portfolio-status default"},f={key:1,class:"default-portfolio-tooltip",role:"tooltip"},d={class:"portfolio-details"},p={class:"portfolio-url"};var m=o(88248),v=o(76647);function h(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?b(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var y=o(5412),g=o(8851),w=o(79271),P=o(13124),k=o(55445);const C={name:"copy-own-domain",components:{ModalBody:k.A,ModalFooter:P.A,ModalWrapper:w.A,ModalHeader:g.A,Cta:y.A},props:["show","domain","connectingDomain"],emits:["connect-domain","close"],methods:{connectDomain:function(){this.$emit("connect-domain")},closeModal:function(){this.$emit("close")}}};var A=o(66262);const S=(0,A.A)(C,[["render",function(t,e,o,i,a,l){var s=(0,r.g2)("ModalHeader"),u=(0,r.g2)("ModalBody"),c=(0,r.g2)("Cta"),f=(0,r.g2)("ModalFooter"),d=(0,r.g2)("ModalWrapper");return(0,r.uX)(),(0,r.Wv)(d,{"dark-scheme":"",show:o.show,"modal-size":"small",onClose:e[1]||(e[1]=function(t){return l.closeModal()})},{"modal-header":(0,r.k6)(function(){return[(0,r.bF)(s,{"dark-scheme":"",title:"Connect your own domain"})]}),"modal-body":(0,r.k6)(function(){return[(0,r.bF)(u,{"text-align":"center"},{default:(0,r.k6)(function(){return[(0,r.Lk)("div",null,"Do you want to connect your domain ("+(0,n.v_)(o.domain)+") to your new default portfolio?",1)]}),_:1})]}),"modal-footer":(0,r.k6)(function(){return[(0,r.bF)(f,null,{default:(0,r.k6)(function(){return[(0,r.bF)(c,{"dark-scheme":"",type:"secondary",disabled:o.connectingDomain,onClick:l.closeModal},{default:(0,r.k6)(function(){return h(e[2]||(e[2]=[(0,r.eW)("Disconnect Domain",-1)]))}),_:1},8,["disabled","onClick"]),(0,r.bF)(c,{"dark-scheme":"",disabled:o.connectingDomain,loading:o.connectingDomain,onClick:e[0]||(e[0]=function(t){return l.connectDomain()})},{default:(0,r.k6)(function(){return h(e[3]||(e[3]=[(0,r.eW)(" Connect Domain ",-1)]))}),_:1},8,["disabled","loading"])]}),_:1})]}),_:1},8,["show"])}]]);function D(t){return function(t){if(Array.isArray(t))return $(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?$(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var _={key:0};const T={name:"delete-portfolio-modal",components:{ModalFooter:P.A,ModalBody:k.A,ModalHeader:g.A,ModalWrapper:w.A,Cta:y.A},props:["show","portfolioName","deletingPortfolio"],emits:["delete-portfolio","close"],methods:{deletePortfolio:function(){this.$emit("delete-portfolio")},closeModal:function(){this.$emit("close")}}}
2,O=(0,A.A)(T,[["render",function(t,e,o,i,a,l){var s=(0,r.g2)("ModalHeader"),u=(0,r.g2)("ModalBody"),c=(0,r.g2)("Cta"),f=(0,r.g2)("ModalFooter"),d=(0,r.g2)("ModalWrapper");return(0,r.uX)(),(0,r.Wv)(d,{"dark-scheme":"","modal-size":"small",show:o.show,onClose:e[2]||(e[2]=function(t){return l.closeModal()})},{"modal-header":(0,r.k6)(function(){return[(0,r.bF)(s,{"dark-scheme":"",title:"Delete portfolio"})]}),"modal-body":(0,r.k6)(function(){return[(0,r.bF)(u,{"text-align":"center"},{default:(0,r.k6)(function(){return[o.portfolioName?((0,r.uX)(),(0,r.CE)("div",_,"Do you really want to delete your '"+(0,n.v_)(o.portfolioName)+"' portfolio?",1)):(0,r.Q3)("v-if",!0)]}),_:1})]}),"modal-footer":(0,r.k6)(function(){return[(0,r.bF)(f,null,{default:(0,r.k6)(function(){return[(0,r.bF)(c,{"dark-scheme":"",type:"secondary",disabled:o.deletingPortfolio,onClick:e[0]||(e[0]=function(t){return l.closeModal()})},{default:(0,r.k6)(function(){return D(e[3]||(e[3]=[(0,r.eW)("Cancel",-1)]))}),_:1},8,["disabled"]),(0,r.bF)(c,{"dark-scheme":"",type:"alert",disabled:o.deletingPortfolio,loading:o.deletingPortfolio,onClick:e[1]||(e[1]=function(t){return l.deletePortfolio()})},{default:(0,r.k6)(function(){return D(e[4]||(e[4]=[(0,r.eW)(" Delete ",-1)]))}),_:1},8,["disabled","loading"])]}),_:1})]}),_:1},8,["show"])}]]);function j(t){return function(t){if(Array.isArray(t))return F(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return F(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?F(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var I={class:"set-default-portfolio"},L={class:"portfolio-select-list"};var M=o(74885),E=o(33346);const W={name:"set-default-portfolio-modal",components:{ModalFooter:P.A,MessageHighlight:E.A,ModalBody:k.A,ModalHeader:g.A,ModalWrapper:w.A,RadioButton:M.A,Cta:y.A},emits:["close","set-as-default-portfolio"],props:["show","deletingPortfolio","defaultPortfolioDomain"],data:function(){return{selectedNewDefaultPortfolio:null}},methods:{selectPortfolio:function(t){this.selectedNewDefaultPortfolio=t._id},setFistPortfolio:function(){this.selectPortfolio(this.$store.state.userPortfolios[0]._id!==this.$store.state.user.defaultCollectionId?this.$store.state.userPortfolios[0]:this.$store.state.userPortfolios[1])},setAsDefaultPortfolio:function(t){this.$emit("set-as-default-portfolio",t)},closeModal:function(){this.$emit("close")}},computed:{filteredPortfolios:function(){var t=this;return this.$store.state.userPortfolios.filter(function(e){return e._id!==t.$store.state.user.defaultCollectionId})},disableSaveButton:function(){return this.selectedNewDefaultPortfolio===this.$store.state.user.defaultCollectionId||!this.selectedNewDefaultPortfolio},displayBubble:function(){var t=this;if(this.selectedNewDefaultPortfolio)return!!this.defaultPortfolioDomain&&!this.$store.state.userPortfolios.find(function(e){return e._id===t.selectedNewDefaultPortfolio}).ownDomainAddress}}},B=(0,A.A)(W,[["render",function(t,e,o,n,i,a){var l=(0,r.g2)("ModalHeader"),s=(0,r.g2)("RadioButton"),u=(0,r.g2)("MessageHighlight"),c=(0,r.g2)("ModalBody"),f=(0,r.g2)("Cta"),d=(0,r.g2)("ModalFooter"),p=(0,r.g2)("ModalWrapper");return(0,r.uX)(),(0,r.Wv)(p,{"modal-size":"medium",show:o.show,onInit:e[3]||(e[3]=function(t){return a.setFistPortfolio()}),onClose:e[4]||(e[4]=function(t){return a.closeModal()})},{"modal-header":(0,r.k6)(function(){return[(0,r.bF)(l,{title:"Select a portfolio to set as your new default"})]}),"modal-body":(0,r.k6)(function(){return[(0,r.bF)(c,null,{default:(0,r.k6)(function(){return[(0,r.Lk)("div",I,[(0,r.Lk)("div",L,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(a.filteredPortfolios,function(t){return(0,r.uX)(),(0,r.Wv)(s,{key:t._id,label:t.name,name:"defaultPortfolio",modelValue:i.selectedNewDefaultPortfolio,"onUpdate:modelValue":e[0]||(e[0]=function(t){return i.selectedNewDefaultPortfolio=t}),onUpd:function(e){return a.selectPortfolio(t)},value:t._id},null,8,["label","modelValue","onUpd","value"])}),128))]),a.displayBubble?((0,r.uX)(),(0,r.Wv)(u,{key:0,message:"The domain connected to your previous portfolio will be attached to your new default portfolio."})):(0,r.Q3)("v-if",!0)])]}),_:1})]}),"modal-footer":(0,r.k6)(function(){return[(0,r.bF)(d,null,{default:(0,r.k6)(function(){return[(0,r.bF)(f,{type:"secondary",disabled:o.deletingPortfolio,onClick:e[1]||(e[1]=function(t){return a.closeModal()})},{default:(0,r.k6)(function(){return j(e[5]||(e[5]=[(0,r.eW)("Cancel",-1)]))}),_:1},8,["disabled"]),(0,r.bF)(f,{disabled:a.disableSaveButton||o.deletingPortfolio,loading:o.deletingPortfolio,onClick:e[2]||(e[2]=function(t){return a.setAsDefaultPortfolio(i.selectedNewDefaultPortfolio)})},{default:(0,r.k6)(function(){return j(e[6]||(e[6]=[(0,r.eW)(" Select ",-1)]))}),_:1},8,["disabled","loading"])]}),_:1})]}),_:1},8,["show"])}],["__scopeId","data-v-ba56387c"]]);var N=o(11211),X=o(34747),x=o(8187),U=o(16485),V=o(97073),G=o(46335),Q=o(76408),z=o(45),H=o(65498);function q(t){return function(t){if(Array.isArray(t))return R(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return R(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?R(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var K={class:"preview-image"},Y=["src"],J={key:1,class:"preview-skeleton","aria-hidden":"true"},Z={key:0,class:"admin-banner"};var tt=o(82124);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function ot(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)}return o}function rt(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};
2e%2?ot(Object(o),!0).forEach(function(e){nt(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ot(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function nt(t,e,o){return(e=function(t){var e=function(t,e){if("object"!=et(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!=et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==et(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const it={name:"PortfolioPreview",props:["portfolio"],data:function(){return{previewLoaded:!1}},watch:{previewImage:function(){this.previewLoaded=!1}},methods:{openPortfolio:function(){this.$store.commit("openPortfolioToEdit",this.portfolio._id)}},computed:rt(rt({},(0,tt.L8)(["userIsAdmin"])),{},{template:function(){return this.$store.getters.getTemplateForPortfolio(this.portfolio)},previewImage:function(){return this.portfolio.previewUrl||null},showSkeleton:function(){return!!this.portfolio.previewJobId||!this.previewImage||!this.previewLoaded},templateDetails:function(){return this.template?"Template: Name:"+this.template.name+" , Status:"+this.template.status:"Unknown template contact a dev."},isTemplatePortfolio:function(){return this.portfolio.isTemplatePortfolio}})},at=(0,A.A)(it,[["render",function(t,e,o,a,l,s){return(0,r.uX)(),(0,r.CE)("div",{class:"portfolio-preview",onClick:e[2]||(e[2]=function(){return s.openPortfolio&&s.openPortfolio.apply(s,arguments)})},[(0,r.Lk)("div",K,[s.previewImage?((0,r.uX)(),(0,r.CE)("img",{key:0,alt:"portfolio preview",src:s.previewImage,onLoad:e[0]||(e[0]=function(t){return l.previewLoaded=!0})},null,40,Y)):(0,r.Q3)("v-if",!0),s.showSkeleton?((0,r.uX)(),(0,r.CE)("div",J,q(e[3]||(e[3]=[(0,r.Lk)("div",{class:"preview-skeleton__nav"},null,-1),(0,r.Lk)("div",{class:"preview-skeleton__hero"},null,-1),(0,r.Lk)("div",{class:"preview-skeleton__hero"},null,-1),(0,r.Lk)("div",{class:"preview-skeleton__hero"},null,-1)])))):(0,r.Q3)("v-if",!0)]),(0,r.Lk)("div",{class:"preview-controls",onClick:e[1]||(e[1]=(0,i.withModifiers)(function(){},["stop"]))},[(0,r.RG)(t.$slots,"default",{},void 0,!0)]),t.userIsAdmin&&s.isTemplatePortfolio?((0,r.uX)(),(0,r.CE)("div",Z,[(0,r.Lk)("div",null,(0,n.v_)(s.templateDetails),1)])):(0,r.Q3)("v-if",!0)])}],["__scopeId","data-v-4cc94753"]]),lt=at;var st=o(432),ut=o.n(st),ct=o(5729);function ft(t){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(t)}function dt(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)}return o}function pt(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?dt(Object(o),!0).forEach(function(e){mt(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):dt(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function mt(t,e,o){return(e=function(t){var e=function(t,e){if("object"!=ft(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function vt(){var t,e,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function i(o,r,n,i){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return ht(u,"_invoke",function(o,r,n){var i,l,s,u=0,c=n||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,o){return i=e,l=0,s=t,d.n=o,a}};function p(o,r){for(l=o,s=r,e=0;!f&&u&&!n&&e<c.length;e++){var n,i=c[e],p=d.p,m=i[2];o>3?(n=m===r)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=p&&((n=o<2&&p<i[1])?(l=0,d.v=r,d.n=i[1]):p<m&&(n=o<3||i[0]>r||r>m)&&(i[4]=o,i[5]=r,d.n=m,l=0))}if(n||o>1)return a;throw f=!0,r}return function(n,c,m){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,m),l=c,s=m;(e=l<2?t:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,i){if(l||(n="next"),e=i[n]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");
2if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+n+"' method"),l=1);i=t}else if((e=(f=d.n<0)?s:o.call(r,d))!==a)break}catch(e){i=t,l=1,s=e}finally{u=1}}return{value:e,done:f}}}(o,n,i),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(ht(e={},r,function(){return this}),e),f=u.prototype=l.prototype=Object.create(c);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,ht(t,n,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=u,ht(f,"constructor",u),ht(u,"constructor",s),s.displayName="GeneratorFunction",ht(u,n,"GeneratorFunction"),ht(f),ht(f,n,"Generator"),ht(f,r,function(){return this}),ht(f,"toString",function(){return"[object Generator]"}),(vt=function(){return{w:i,m:d}})()}function ht(t,e,o,r){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}ht=function(t,e,o,r){function i(e,o){ht(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!r,configurable:!r,writable:!r}):t[e]=o:(i("next",0),i("throw",1),i("return",2))},ht(t,e,o,r)}function bt(t,e,o,r,n,i,a){try{var l=t[i](a),s=l.value}catch(t){return void o(t)}l.done?e(s):Promise.resolve(s).then(r,n)}function yt(t){return function(){var e=this,o=arguments;return new Promise(function(r,n){var i=t.apply(e,o);function a(t){bt(i,r,n,a,l,"next",t)}function l(t){bt(i,r,n,a,l,"throw",t)}a(void 0)})}}function gt(t){return function(t){if(Array.isArray(t))return wt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return wt(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?wt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}const Pt={name:"portfolios-list",components:{draggable:ut(),PortfolioPreview:lt,FabCollapsingContainer:X.A,Fab:x.A,FabContainer:N.A,NonEditorPageFrame:Q.A,Icon:G.A,Cta:y.A,InputField:U.A,CopyOwnDomain:S,DeletePortfolioModal:O,SetDefaultPortfolioModal:B},props:["user"],data:function(){return{selectedPortfolio:null,selectedPortfolioUserIsDomainOwner:!1,showPortfolioDropdown:!1,showDeletePortfolio:!1,deletingPortfolio:!1,showSetDomainModal:!1,showCopyOwnDomainModal:!1,connectingDomain:!1,showSetDefaultPortfolioModal:!1,deleteDefaultPortfolio:!1,defaultPortfolioDomain:null,portfolioWithSameDomain:null,allowUpdate:!1,syncLoading:!1}},watch:{"$store.state.portfolioTemplates":{immediate:!0,handler:function(){this.isTemplateCreator&&this.sortTemplateCreatorPortfolios()}},"$store.state.userPortfolios":{immediate:!0,handler:function(){this.isTemplateCreator?this.sortTemplateCreatorPortfolios():this.setDefaultAsFirst()}},"$store.state.user.defaultCollectionId":function(){this.isTemplateCreator||this.setDefaultAsFirst()}},mounted:function(){var t;this.$actions.trackPageView("/home".concat(this.$route.fullPath),"Manage portfolios"),this.isTemplateCreator||this.setDefaultAsFirst(),window.scrollY&&window.scroll(0,0),null!==(t=this.$store.state.portfolioTemplates)&&void 0!==t&&t.length||z.A.getTemplates()},methods:{getTemplateByPortfolioShortId:function(t){return this.$store.state.portfolioTemplates.find(function(e){return e.portfolioShortId===t.shortId})},sortTemplateCreatorPortfolios:function(){var t,e=this;if(this.isTemplateCreator&&Array.isArray(this.$store.state.userPortfolios)){var o=this.$store.state.userPortfolios.filter(function(t){return e.isTemplatePortfolio(t)}),r=this.$store.state.userPortfolios.filter(function(t){return!e.isTemplatePortfolio(t)});o.sort(function(t,o){var r,n,i=e.getTemplateByPortfolioShortId(t),a=e.getTemplateByPortfolioShortId(o);return(null!==(r=null==i?void 0:i.order)&&void 0!==r?r:0)-(null!==(n=null==a?void 0:a.order)&&void 0!==n?n:0)}),(t=this.$store.state.userPortfolios).splice.apply(t,[0,1/0].concat(gt(o),gt(r)))}},startToCreatePortfolio:function(){this.blockedEditor||(this.$store.state.previewAndCreatePortfolioDetails.activeView=1,this.$router.push("/home/portfolios/create-new-portfolio"),this.$store.state.creatingNewPortfolio=!0)},setDefaultAsFirst:function(){var t,e=this.$store.state.userPortfolios,o=null===(t=this.$store.state.user)||void 0===t?void 0:t.defaultCollectionId;if(Array.isArray(e)&&o){var r=e.findIndex(function(t){return t._id===o});r<=0||e.unshift(e.splice(r,1)[0])}},duplicatePortfolio:function(t){var e=this;return yt(vt().m(function o(){var r,n,i,a;return vt().w(function(o){for(;;)switch(o.p=o.n){case 0:return(0,V.f0)("Duplicate portfolio",{event_category:"Profile editor",event_label:"User: ".concat(e.$store.state.user._id)}),e.$store.state.pageIsLoading=!0,e.$store.state.loaderMessage="Hold on, we're duplicating all your material, so this can take a while.",o.p=1,o.n=2,m.A.duplicatePortfolio(e.$store.state.user._id,t);case 2:return r=o.v,o.n=3,(0,ct.r)(r.data.jobId,{failureMessage:"Portfolio duplication failed.",timeoutMessage:"Portfolio duplication timed out."});case 3:n=o.v,e.$store.state.portfolio=n,e.$store.state.userPortfolios.push(n),i=e.$router.afterEach(function(){i(),e.$store.commit("showAlertMessage",{message:"Your portfolio has been duplicated.",type:"success"})}),e.$store.commit("openPortfolioToEdit",n._id),o.n=5;break;case 4:o.p=4,a=o.v,e.handleDuplicationError(a);case 5:return o.p=5,e.$store.state.pageIsLoading=!1,o.f(5);case 6:return o.a(2)}},o,null,[[1,4,5,6]])}))()},handleDuplicationError:function(t){var e=null==t?void 0:t.response;if(405===(null==e?void 0:e.status)){var o=e.data;if(1001===o.code||1002===o.code)return this.$store.state.currentSubscriptionPlan=o.currentSubscriptionPlan,void this.$store.commit("showAlertMessage",{message:"Upgrade to Full access to use this feature.",type:"alert",interval:10})}var r=(null==t?void 0:t.message)||"Something went wrong while duplicating your portfolio. Please try again later.";this.$store.commit("showAlertMessage",{message:r,type:"alert",interval:10})},openDeletePortfolioModal:function(t){this.selectedPortfolio=t,this.showDeletePortfolio=!0},checkPortfolioId:function(){var t=this;this.selectedPortfolio._id===this.$store.state.user.defaultCollectionId?(this.deleteDefaultPortfolio=!0,this.defaultPortfolioDomain=this.$store.state.userPortfolios.find(function(e){return e._id===t.selectedPortfolio._id}).ownDomainAddress,this.$store.state.userPortfolios.length>2?(this.showDeletePortfolio=!1,this.showSetDefaultPortfolioModal=!0):this.setAsDefaultPortfolio(this.$store.state.userPortfolios.find(function(e){return e._id!==t.$store.state.user.defaultCollectionId})._id)):this.deletePortfolio()},deletePortfolio:function(){var t=this;this.deletingPortfolio=!0,(0,V.f0)("Delete portfolio",{event_category:"Profile editor",event_label:"User: ".concat(this.$store.state.user._id)}),m.A.deletePortfolio(this.selectedPortfolio._id).then(function(e){t.$store.state.userPortfolios.splice(t.$store.state.userPortfolios.findIndex(function(e){return e._id===t.selectedPortfolio._id}),1),t.defaultPortfolioDomain&&!t.$store.state.userPortfolios.find(function(e){return e._id===t.$store.state.user.defaultCollectionId}).ownDomainAddress?t.transferDomainToPortfolio():t.resetView(),t.selectedPortfolio._id===t.$store.state.portfolio._id&&(t.$store.state.portfolio=t.$store.state.userPortfolios.find(function(e){return e._id===t.$store.state.user.defaultCollectionId}),z.A.getCaseStudyPages())}).catch(function(e){t.deletingPortfolio=!1,t.showDeletePortfolio=!1})},setNewDefaultPortfolio:function(t){var e=this;this.defaultPortfolioDomain=this.$store.state.userPortfolios.find(function(t){return t._id===e.$store.state.user.defaultCollectionId}).ownDomainAddress,this.defaultPortfolioDomain&&(this.showCopyOwnDomainModal=!t.ownDomainAddress),this.setAsDefaultPortfolio(t._id)},setAsDefaultPortfolio:function(t){var e=this;this.$store.state.user.defaultCollectionId=t,(0,V.f0)("Set new default portfolio",{event_category:"Profile editor",event_label:"User: ".concat(this.$store.state.user._id)}),v.A.editUser(this.$store.state.user).then(function(t){e.$store.state.user=t.data,e.setDefaultAsFirst(),window.scrollTo({top:0,behavior:"smooth"}),e.deleteDefaultPortfolio&&e.deletePortfolio()}).catch(function(t){})},transferDomainToPortfolio:function(){var t=this;this.connectingDomain=!0,this.portfolioWithSameDomain=this.$store.state.userPortfolios.find(function(e){return e.ownDomainAddress===t.defaultPortfolioDomain}),this.$store.state.userPortfolios.find(function(e){return e._id===t.$store.state.user.defaultCollectionId}).ownDomainAddress=this.defaultPortfolioDomain,this.portfolioWithSameDomain&&(this.portfolioWithSameDomain.ownDomainAddress=null,this.updatePortfolio(this.portfolioWithSameDomain)),this.updatePortfolio(this.$store.state.userPortfolios.find(function(e){return e._id===t.$store.state.user.defaultCollectionId}),!0)},updatePortfolio:function(t,e){var o=this;m.A.editPortfolio(t).then(function(r){o.$store.commit("showAlertMessage",{message:"'".concat(t.name,"' updated")}),o.allowUpdate=!1,e&&(o.$store.state.portfolio=r.data,o.resetView())}).catch(function(t){o.resetView()})},keyDownListener:function(){this.allowUpdate=!0},portfolioUrlLabel:function(t){return t.ownDomainAddress||"uxfol.io/".concat(t.shortId)},openPortfolioView:function(t){var e=t.ownDomainAddress?"https://".concat(t.ownDomainAddress):"".concat(window.location.origin,"/").concat(t.shortId);window.open(e,"_blank")},openPortfolioSettings:function(t){var e=this;return yt(vt().m(function o(){return vt().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,z.A.getPortfolios(t._id);case 1:return e.$store.commit("setPageToEdit","home"),o.n=2,e.$router.push("/home/portfolios/".concat(e.$store.state.portfolio.shortId,"/settings"));case 2:return o.a(2)}},o)}))()},resetView:function(){this.deletingPortfolio=!1,this.showDeletePortfolio=!1,this.showSetDefaultPortfolioModal=!1,this.deleteDefaultPortfolio=!1,this.defaultPortfolioDomain=null,this.showCopyOwnDomainModal=!1,this.connectingDomain=!1,this.allowUpdate=!1},goBack:function(){this.$router.push("/home/portfolios/".concat(this.$store.state.portfolio.shortId))},closeCopyOwnDomainModal:function(){this.showCopyOwnDomainModal=!1,this.resetView()},closeDeletePortfolioModal:function(){this.showDeletePortfolio=!1,this.deletingPortfolio=!1,this.deleteDefaultPortfolio=!1},closeSetDefaultPortfolioModal:function(){this.showSetDefaultPortfolioModal=!1,this.deleteDefaultPortfolio=!1,this.defaultPortfolioDomain=null},isPortfolioDraft:function(t){return t.draft},isTemplatePortfolio:function(t){return t.isTemplatePortfolio},syncTemplates:function(){var t=this;return yt(vt().m(function e(){var o,r;return vt().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,t.syncLoading=!0,e.n=1,H.A.get("/api/portfolio-template/sync");case 1:return e.n=2,H.A.get("/api/portfolio-template");case 2:o=e.v,t.$store.state.portfolioTemplates=o.data,t.$store.commit("showAlertMessage",{message:"Successfully synced templates.",type:"success"}),e.n=4;break;case 3:e.p=3,r=e.v,console.log("Failed to sync templates",r),t.$store.commit("showAlertMessage",{message:"Failed to sync templates.",type:"failure"});case 4:return e.p=4,t.syncLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[0,3,4,5]])}))()},updateTemplateOrder:function(t){try{H.A.put("/api/portfolio-template/order",t)}catch(t){console.log("Error while updating template order",t)}}},computed:pt(pt({},(0,tt.L8)(["userIsAdmin"])),{},{blockedEditor:function(){return this.$store.getters.isEditorBlocked},isTemplateCreator:function(){return this.$store.state.user.isTemplateCreator},isDevEnv:function(){return window.location.href.includes("localhost")},userPortfolios:{get:function(){return this.$store.state.userPortfolios},set:function(t){var e;(e=this.$store.state.userPortfolios).splice.apply(e,[0,1/0].concat(gt(t)))}},sortedPortfolios:{get:function(){return this.$store.state.userPortfolios},set:function(t){var e,o=this;if(this.isTemplateCreator){var r=t.filter(function(t){return o.isTemplatePortfolio(t)}).map(function(t,e){return{portfolioShortId:t.shortId,order:e}});r.forEach(function(t){var e=t.portfolioShortId,r=t.order,n=o.$store.state.portfolioTemplates.find(function(t){return t.portfolioShortId===e});n&&o.$store.commit("updateTemplateOrder",{templateId:n.templateId,newOrder:r})}),this.updateTemplateOrder(r)}(e=this.$store.state.userPortfolios).splice.apply(e,[0,1/0].concat(gt(t)))}}})}
2,kt=(0,A.A)(Pt,[["render",function(t,e,o,l,m,v){var h=this,b=(0,r.g2)("Cta"),y=(0,r.g2)("Icon"),g=(0,r.g2)("Fab"),w=(0,r.g2)("FabCollapsingContainer"),P=(0,r.g2)("FabContainer"),k=(0,r.g2)("InputField"),C=(0,r.g2)("PortfolioPreview"),A=(0,r.g2)("draggable"),S=(0,r.g2)("CopyOwnDomain"),D=(0,r.g2)("DeletePortfolioModal"),$=(0,r.g2)("SetDefaultPortfolioModal"),_=(0,r.g2)("NonEditorPageFrame");return(0,r.uX)(),(0,r.Wv)(_,{"page-title":"Manage portfolios","page-sub-title":"Manage all the portfolios in your account",onGoBack:e[11]||(e[11]=function(t){return v.goBack()})},{headerCta:(0,r.k6)(function(){return[(0,r.bF)(b,{disabled:v.blockedEditor,onClick:e[0]||(e[0]=function(t){return v.startToCreatePortfolio()})},{default:(0,r.k6)(function(){return a(e[12]||(e[12]=[(0,r.eW)("Create new portfolio",-1)]))}),_:1},8,["disabled"]),h.userIsAdmin&&v.isDevEnv?((0,r.uX)(),(0,r.Wv)(b,{key:0,loading:m.syncLoading,onClick:e[1]||(e[1]=function(t){return v.syncTemplates()})},{default:(0,r.k6)(function(){return a(e[13]||(e[13]=[(0,r.eW)("Sync templates",-1)]))}),_:1},8,["loading"])):(0,r.Q3)("v-if",!0)]}),default:(0,r.k6)(function(){return[(0,r.bF)(A,{modelValue:v.sortedPortfolios,"onUpdate:modelValue":e[5]||(e[5]=function(t){return v.sortedPortfolios=t}),"item-key":"_id",handle:".drag-handler",class:"portfolios-list"},{item:(0,r.k6)(function(o){var l=o.element;o.index;return[(0,r.Lk)("div",s,[v.isTemplatePortfolio(l)&&v.isTemplateCreator?((0,r.uX)(),(0,r.Wv)(y,{key:0,"icon-name":"drag",class:(0,n.C4)("drag-handler")})):(0,r.Q3)("v-if",!0),v.blockedEditor?(0,r.Q3)("v-if",!0):((0,r.uX)(),(0,r.Wv)(P,{key:1,type:"horizontal",class:"context-menu"},{default:(0,r.k6)(function(){return[(0,r.bF)(w,{"display-icon":"context-menu",onMousedown:e[2]||(e[2]=(0,i.withModifiers)(function(){},["prevent"])),onClick:e[3]||(e[3]=function(t){t.stopPropagation()})},{default:(0,r.k6)(function(){return[(0,r.bF)(g,{key:"settings",icon:"settings",onClick:function(t){return v.openPortfolioSettings(l)}},{default:(0,r.k6)(function(){return[e[14]||(e[14]=(0,r.Lk)("span",null," Go to settings ",-1)),(0,r.bF)(y,{class:"go-to-settings-icon","icon-name":"cta-open-link"})]}),_:1},8,["onClick"]),l._id!==t.$store.state.user.defaultCollectionId?((0,r.uX)(),(0,r.Wv)(g,{disabled:!!v.isTemplateCreator,key:"set-default",icon:"set-default-portfolio",onClick:function(t){return v.setNewDefaultPortfolio(l)}},{default:(0,r.k6)(function(){return a(e[15]||(e[15]=[(0,r.eW)(" Set as default ",-1)]))}),_:1},8,["disabled","onClick"])):(0,r.Q3)("v-if",!0),(0,r.bF)(g,{disabled:!!l.previewJobId,key:"refresh-preview",icon:"rotate",onClick:function(e){return t.$emit("refresh-preview",l._id)}},{default:(0,r.k6)(function(){return a(e[16]||(e[16]=[(0,r.eW)(" Refresh preview ",-1)]))}),_:1},8,["disabled","onClick"]),(0,r.bF)(g,{disabled:!!v.isTemplateCreator&&(!v.isPortfolioDraft(l)||v.isTemplatePortfolio(l)),key:"duplicate",icon:"copy",onClick:function(t){return v.duplicatePortfolio(l)}},{default:(0,r.k6)(function(){return a(e[17]||(e[17]=[(0,r.eW)(" Duplicate ",-1)]))}),_:1},8,["disabled","onClick"]),(0,r.bF)(g,{disabled:!!v.isTemplateCreator&&(!v.isPortfolioDraft(l)||v.isTemplatePortfolio(l)),key:"delete",alert:!0,icon:"delete",onClick:function(t){return v.openDeletePortfolioModal(l)}},{default:(0,r.k6)(function(){return a(e[18]||(e[18]=[(0,r.eW)(" Delete ",-1)]))}),_:1},8,["disabled","onClick"])]}),_:2},1024)]}),_:2},1024)),(0,r.bF)(C,{portfolio:l},{default:(0,r.k6)(function(){return[(0,r.Lk)("div",u,[l._id===t.$store.state.user.defaultCollectionId?((0,r.uX)(),(0,r.CE)("div",c," Default portfolio ")):(0,r.Q3)("v-if",!0),l._id===t.$store.state.user.defaultCollectionId?((0,r.uX)(),(0,r.CE)("div",f,a(e[19]||(e[19]=[(0,r.Lk)("div",{class:"default-portfolio-tooltip__body"}," This is the portfolio you land on when you log in. ",-1)])))):(0,r.Q3)("v-if",!0),(0,r.Lk)("div",{class:(0,n.C4)(["portfolio-status",l.draft?"unpublished":"published"])},[(0,r.bF)(y,{"icon-name":l.draft?"hidden":"publish"},null,8,["icon-name"]),(0,r.eW)(" "+(0,n.v_)(l.draft?"Unpublished":"Published"),1)],2)]),(0,r.Lk)("div",d,[(0,r.bF)(k,{label:"Portfolio name",value:l.name,modelValue:l.name,"onUpdate:modelValue":function(t){return l.name=t},onKeydown:e[4]||(e[4]=function(t){return v.keyDownListener()}
2),onBlur:function(t){return m.allowUpdate?v.updatePortfolio(l):null}},null,8,["value","modelValue","onUpdate:modelValue","onBlur"]),(0,r.Lk)("div",p,[(0,r.Lk)("span",null,(0,n.v_)(v.portfolioUrlLabel(l)),1),(0,r.bF)(b,{type:"primary",size:"small",class:"subtle portfolio-url__open",onClick:function(t){return v.openPortfolioView(l)}},{default:(0,r.k6)(function(){return[(0,r.bF)(y,{"icon-name":"cta-open-new-tab"})]}),_:1},8,["onClick"])])])]}),_:2},1032,["portfolio"])])]}),_:1},8,["modelValue"]),m.showCopyOwnDomainModal?((0,r.uX)(),(0,r.Wv)(S,{key:0,show:m.showCopyOwnDomainModal,"connecting-domain":m.connectingDomain,domain:m.defaultPortfolioDomain,onConnectDomain:e[6]||(e[6]=function(t){return v.transferDomainToPortfolio()}),onClose:e[7]||(e[7]=function(t){return v.closeCopyOwnDomainModal()})},null,8,["show","connecting-domain","domain"])):(0,r.Q3)("v-if",!0),m.showDeletePortfolio?((0,r.uX)(),(0,r.Wv)(D,{key:1,show:m.showDeletePortfolio,"deleting-portfolio":m.deletingPortfolio,"portfolio-name":m.selectedPortfolio.name,onDeletePortfolio:e[8]||(e[8]=function(t){return v.checkPortfolioId()}),onClose:e[9]||(e[9]=function(t){return v.closeDeletePortfolioModal()})},null,8,["show","deleting-portfolio","portfolio-name"])):(0,r.Q3)("v-if",!0),m.showSetDefaultPortfolioModal?((0,r.uX)(),(0,r.Wv)($,{key:2,show:m.showSetDefaultPortfolioModal,"deleting-portfolio":m.deletingPortfolio,"default-portfolio-domain":m.defaultPortfolioDomain,onSetAsDefaultPortfolio:v.setAsDefaultPortfolio,onClose:e[10]||(e[10]=function(t){return v.closeSetDefaultPortfolioModal()})},null,8,["show","deleting-portfolio","default-portfolio-domain","onSetAsDefaultPortfolio"])):(0,r.Q3)("v-if",!0)]}),_:1})}],["__scopeId","data-v-74ddafbe"]])},82713(t,e,o){o.r(e),o.d(e,{default:()=>A});var r=o(20641),n=o(90033);const i=o.p+"src/assets/images/empty-project-thumbnail.897ff945.jpg";function a(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var s={class:"ufo--portfolio-projects-list"},u=["onClick"],c={class:"image"},f={key:1,class:"project-thumbnail",alt:"project-image",src:i},d={class:"info-block"},p={class:"project-info"};var m=o(5412),v=o(97073),h=o(76408),b=o(7149),y=o(45),g=o(68438);function w(){var t,e,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function i(o,r,n,i){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return P(u,"_invoke",function(o,r,n){var i,l,s,u=0,c=n||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,o){return i=e,l=0,s=t,d.n=o,a}};function p(o,r){for(l=o,s=r,e=0;!f&&u&&!n&&e<c.length;e++){var n,i=c[e],p=d.p,m=i[2];o>3?(n=m===r)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=p&&((n=o<2&&p<i[1])?(l=0,d.v=r,d.n=i[1]):p<m&&(n=o<3||i[0]>r||r>m)&&(i[4]=o,i[5]=r,d.n=m,l=0))}if(n||o>1)return a;throw f=!0,r}return function(n,c,m){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,m),l=c,s=m;(e=l<2?t:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,i){if(l||(n="next"),e=i[n]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+n+"' method"),l=1);i=t}else if((e=(f=d.n<0)?s:o.call(r,d))!==a)break}catch(e){i=t,l=1,s=e}finally{u=1}}return{value:e,done:f}}}(o,n,i),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(P(e={},r,function(){return this}),e),f=u.prototype=l.prototype=Object.create(c);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,P(t,n,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=u,P(f,"constructor",u),P(u,"constructor",s),s.displayName="GeneratorFunction",P(u,n,"GeneratorFunction"),P(f),P(f,n,"Generator"),P(f,r,function(){return this}),P(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:d}})()}function P(t,e,o,r){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}P=function(t,e,o,r){function i(e,o){P(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!r,configurable:!r,writable:!r}):t[e]=o:(i("next",0),i("throw",1),i("return",2))},P(t,e,o,r)}function k(t,e,o,r,n,i,a){try{var l=t[i](a),s=l.value}catch(t){return void o(t)}l.done?e(s):Promise.resolve(s).then(r,n)}const C={name:"all-projects-list",components:{NonEditorPageFrame:h.A,Cta:m.A,ProjectThumbn
2ail:b.A},emits:["create-new-portfolio"],data:function(){return{projects:null}},beforeMount:function(){var t,e=this;return(t=w().m(function t(){return w().w(function(t){for(;;)switch(t.n){case 0:if(e.$store.state.allCaseStudyPages){t.n=1;break}return t.n=1,y.A.getAllCaseStudyPages();case 1:e.projects=e.$store.state.allCaseStudyPages;case 2:return t.a(2)}},t)}),function(){var e=this,o=arguments;return new Promise(function(r,n){var i=t.apply(e,o);function a(t){k(i,r,n,a,l,"next",t)}function l(t){k(i,r,n,a,l,"throw",t)}a(void 0)})})()},mounted:function(){this.$actions.trackPageView("/home".concat(this.$route.fullPath),"Create portfolio - Select projects"),this.$store.state.previewAndCreatePortfolioDetails.activeView=3,document.querySelector("body").classList.remove("thumbnail-generator-visible")},unmounted:function(){this.$store.state.previewAndCreatePortfolioDetails.activeView=0},methods:{toggleSelection:function(t){var e=this.selectedProjects.findIndex(function(e){return e._id===t._id});-1===e?this.selectedProjects.push(t):this.selectedProjects.splice(e,1)},createNewPortfolio:function(){this.$emit("create-new-portfolio")},isInNewPortfolio:function(t){return this.selectedProjects.filter(function(e){return e._id===t}).length>0},goBack:function(){this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate?(this.$store.state.previewAndCreatePortfolioDetails.activeView=2,this.$router.push("/home/portfolios/create-new-portfolio/template-preview"),(0,v.f0)("Back to start: "+this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate.name,{event_category:"Onboarding",event_label:"User: "+this.$store.state.user._id})):(this.$store.state.previewAndCreatePortfolioDetails.activeView=0,this.$router.push("/home/portfolios"),this.$store.state.creatingNewPortfolio=!1,document.querySelector("body").classList.remove("thumbnail-generator-visible"))},printProjectName:function(t){return t.name?t.name:(0,g.sZ)(t.sections.find(function(t){return"MainHeader"===t.type}).title.text)},createEmptyPortfolio:function(){this.selectedProjects=[],this.createNewPortfolio()}},computed:{selectedProjects:{get:function(){return this.$store.state.previewAndCreatePortfolioDetails.selectedProjects},set:function(t){this.$store.state.previewAndCreatePortfolioDetails.selectedProjects=t}}}};const A=(0,o(66262).A)(C,[["render",function(t,e,o,i,l,m){var v=(0,r.g2)("Cta"),h=(0,r.g2)("ProjectThumbnail"),b=(0,r.g2)("NonEditorPageFrame");return(0,r.uX)(),(0,r.Wv)(b,{"page-title":"Copy projects","page-sub-title":"Copy existing projects into your new portfolio.",onGoBack:e[2]||(e[2]=function(t){return m.goBack()})},{headerCta:(0,r.k6)(function(){return[(0,r.bF)(v,{type:"secondary",onClick:e[0]||(e[0]=function(t){return m.createEmptyPortfolio()}),disabled:t.$store.state.pageIsLoading},{default:(0,r.k6)(function(){return a(e[3]||(e[3]=[(0,r.eW)(" Create empty portfolio ",-1)]))}),_:1},8,["disabled"]),(0,r.bF)(v,{onClick:e[1]||(e[1]=function(t){return m.createNewPortfolio()}),disabled:m.selectedProjects.length<1||t.$store.state.pageIsLoading},{default:(0,r.k6)(function(){return a(e[4]||(e[4]=[(0,r.eW)(" Create portfolio ",-1)]))}),_:1},8,["disabled"])]}),default:(0,r.k6)(function(){return[(0,r.Lk)("div",s,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(l.projects,function(t,o){return(0,r.uX)(),(0,r.CE)("div",{key:o,class:(0,n.C4)([{selected:m.isInNewPortfolio(t._id)},"project"]),onClick:function(e){return m.toggleSelection(t)}},[(0,r.Lk)("div",c,[t.thumbnailData?((0,r.uX)(),(0,r.Wv)(h,{key:0,"force-squared":"","case-study":t},null,8,["case-study"])):((0,r.uX)(),(0,r.CE)("img",f)),e[5]||(e[5]=(0,r.Lk)("div",{class:"checkbox"},[(0,r.Lk)("span")],-1))]),(0,r.Lk)("div",d,[(0,r.Lk)("div",p,[(0,r.Lk)("h2",null,(0,n.v_)(m.printProjectName(t)),1)])])],10,u)}),128))])]}),_:1})}],["__scopeId","data-v-fd371d38"]])},52722(t,e,o){o.r(e),o.d(e,{default:()=>O});var r=o(20641),n=o(90033),i={key:1,class:"ufo--templates-list"},a={class:"image-wrapper"},l=["src"],s={class:"button-overlay"},u={class:"template-title"};var c=o(76408),f=o(97073),d=o(65498),p=o(59240),m=o(74256),v=o(82124),h=o(1868),b=o(33639),y=o(51164),g=o(45);function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function P(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)}return o}function k(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};
2e%2?P(Object(o),!0).forEach(function(e){C(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function C(t,e,o){return(e=function(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function A(){var t,e,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function i(o,r,n,i){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return S(u,"_invoke",function(o,r,n){var i,l,s,u=0,c=n||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,o){return i=e,l=0,s=t,d.n=o,a}};function p(o,r){for(l=o,s=r,e=0;!f&&u&&!n&&e<c.length;e++){var n,i=c[e],p=d.p,m=i[2];o>3?(n=m===r)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=p&&((n=o<2&&p<i[1])?(l=0,d.v=r,d.n=i[1]):p<m&&(n=o<3||i[0]>r||r>m)&&(i[4]=o,i[5]=r,d.n=m,l=0))}if(n||o>1)return a;throw f=!0,r}return function(n,c,m){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,m),l=c,s=m;(e=l<2?t:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,i){if(l||(n="next"),e=i[n]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+n+"' method"),l=1);i=t}else if((e=(f=d.n<0)?s:o.call(r,d))!==a)break}catch(e){i=t,l=1,s=e}finally{u=1}}return{value:e,done:f}}}(o,n,i),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(S(e={},r,function(){return this}),e),f=u.prototype=l.prototype=Object.create(c);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,S(t,n,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=u,S(f,"constructor",u),S(u,"constructor",s),s.displayName="GeneratorFunction",S(u,n,"GeneratorFunction"),S(f),S(f,n,"Generator"),S(f,r,function(){return this}),S(f,"toString",function(){return"[object Generator]"}),(A=function(){return{w:i,m:d}})()}function S(t,e,o,r){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}S=function(t,e,o,r){function i(e,o){S(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!r,configurable:!r,writable:!r}):t[e]=o:(i("next",0),i("throw",1),i("return",2))},S(t,e,o,r)}function D(t,e,o,r,n,i,a){try{var l=t[i](a),s=l.value}catch(t){return void o(t)}l.done?e(s):Promise.resolve(s).then(r,n)}function $(t){return function(){var e=this,o=arguments;return new Promise(function(r,n){var i=t.apply(e,o);function a(t){D(i,r,n,a,l,"next",t)}function l(t){D(i,r,n,a,l,"throw",t)}a(void 0)})}}var _=null;const T={name:"TemplateList",components:{OnboardingTemplateListSkeleton:y.A,TertiaryButton:h.A,NonEditorPageFrame:c.A},emits:["create-new-portfolio","set-portfolio-theme"],props:["user"],data:function(){return{bgIsWhite:["Otis","Nominee","Orielle","Uncurled","Poster","Twee","Axis","Nelson","Cubic","Alaine"],templatesLoading:!0,templates:[]}},mounted:function(){this.getPortfolioTemplates(),this.$actions.trackPageView("/home".concat(this.$route.fullPath),"".concat(this.isOnboardingFlow?"Onboarding":"Create portfolio"," - Profile theme list")),this.$store.state.previewAndCreatePortfolioDetails.activeView=1},beforeUnmount:function(){_=null},unmounted:function(){this.$store.state.previewAndCreatePortfolioDetails.activeView=0},activated:function(){document.querySelector("body").classList.remove("thumbnail-generator-visible"),_&&this.$nextTick(function(){window.scrollTo({top:_,left:0})})},methods:{startFromThisTemplate:function(t){var e=this;return $(A().m(function o(){var r,n;return A().w(function(o){for(;;)switch(o.n){case 0:if(e.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate=t,!e.isOnboardingFlow){o.n=1;break}e.$emit("create-new-portfolio"),o.n=3;break;case 1:return o.n=2,g.A.getAllCaseStudyPages();case 2:(null!==(r=null===(n=e.$store.state.allCaseStudyPages)||void 0===n?void 0:n.length)&&void 0!==r?r:0)<1?e.$emit("create-new-portfolio"):e.$router.push("/home/portfolios/create-new-portfolio/select-projects");case 3:return o.a(2)}},o)}))()},selectPortfolioTemplate:function(t){_=window.scrollY,document.querySelector("body").classList.add("thumbnail-generator-visible"),this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate=t,this.previewPortfolioTheme(t)},previewPortfolioTheme:function(t){this.isOnboardingFlow?this.$router.push("/home/onboarding/template-preview"):this.$router.push("/home/portfolios/create-new-portfolio/template-preview"),(0,f.f0)("Preview theme in full size: "+t.name,{event_category:"Onboarding",event_label:"User: "+this.$store.state.user._id}),b.A.track("TEMPLATE_PREVIEW_CLICKED",{event_group:b.A.MixpanelEventGroups.ONBOARDING,source:"Template selector",template_name:t.name})},goBack:function(){this.$store.state.previewAndCreatePortfolioDetails.activeView=0,this.$router.push("/home/portfolios"),this.$store.state.creatingNewPortfolio=!1,_=null,document.querySelector("body").classList.remove("thumbnail-generator-visible"),(0,f.f0)("Back to start ".concat(this.selectedPortfolioTemplate?": ".concat(this.selectedPortfolioTemplate.name):""),{event_category:"Onboarding",event_label:"User: "+this.$store.state.user._id}),this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate=null},getPortfolioTemplates:function(){var t=this;return $(A().m(function e(){var o,r,n,i,a,l;return A().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.templatesLoading=!0,e.p=1,!t.isOnboardingFlow){e.n=5;break}if(null===(r=t.$store.state.templatePreviews)||void 0===r||!r.length){e.n=2;break}a=t.$store.state.templatePreviews,e.n=4;break;case 2:return e.n=3,g.A.prefetchTemplatePreviews();case 3:a=e.v;case 4:o=a,e.n=7;break;case 5:return e.n=6,d.A.get("/api/portfolio-template");case 6:n=e.v,o=n.data;case 7:o=o.map(t.normalizeTemplate),i=t.userIsAdmin?o:o.filter(function(t){return t.status===m.np.PUBLISHED}),t.templates=i.sort(function(t,e){return t.order-e.order}),e.n=9;break;case 8:e.p=8,l=e.v,console.log("Error while fetching themes",l);case 9:return e.p=9,t.templatesLoading=!1,e.f(9);case 10:return e.a(2)}},e,null,[[1,8,9,10]])}))()},templatePreviewImage:function(t){return t.preview?t.preview.url:p},normalizeTemplate:function(t){return t.templateStatus||t.previewUrl?k(k({},t),{},{_id:t._id||t.id,status:t.status||t.templateStatus,preview:t.preview||(t.previewUrl?{url:t.previewUrl}:null)}):t}}
2,computed:k(k({},(0,v.L8)(["userIsAdmin"])),{},{selectedPortfolioTemplate:function(){return this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate},isOnboardingFlow:function(){return!this.$store.state.creatingNewPortfolio}})};const O=(0,o(66262).A)(T,[["render",function(t,e,o,c,f,d){var p=(0,r.g2)("OnboardingTemplateListSkeleton"),m=(0,r.g2)("TertiaryButton"),v=(0,r.g2)("NonEditorPageFrame");return(0,r.uX)(),(0,r.Wv)(v,{"page-title":"Start with a solid foundation","page-sub-title":"Kick off your portfolio with a recruiter-friendly template",onGoBack:e[0]||(e[0]=function(t){return d.goBack()}),"is-onboarding-flow":d.isOnboardingFlow},{default:(0,r.k6)(function(){return[f.templatesLoading?((0,r.uX)(),(0,r.Wv)(p,{key:0})):((0,r.uX)(),(0,r.CE)("div",i,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(f.templates,function(t){return(0,r.uX)(),(0,r.CE)("div",{key:t.name,class:"ufo--template"},[(0,r.Lk)("div",{class:(0,n.C4)(["ufo--template-thumbnail",t.name])},[(0,r.Lk)("div",a,[(0,r.Lk)("img",{alt:"theme-preview",src:d.templatePreviewImage(t),class:"theme-preview theme-preview--static"},null,8,l),(0,r.Lk)("div",s,[(0,r.bF)(m,{size:"large",text:"Start from this",onClick:function(e){return d.startFromThisTemplate(t)}},null,8,["onClick"]),(0,r.bF)(m,{size:"large",type:"subtle",text:"Preview",onClick:function(e){return d.selectPortfolioTemplate(t)}},null,8,["onClick"])])])],2),(0,r.Lk)("div",u,(0,n.v_)(t.name),1)])}),128))]))]}),_:1},8,["is-onboarding-flow"])}],["__scopeId","data-v-767eada8"]])},58152(t,e,o){o.r(e),o.d(e,{default:()=>g});var r=o(20641),n=o(90033);function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=Array(e);o<e;o++)r[o]=t[o];return r}var l={class:"ufo--template-view ufo--template-fs"},s={class:"ufo--device-switch"},u=["src"];var c=o(5412),f=o(97073),d=o(76408),p=o(46335),m=o(45);function v(){var t,e,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function i(o,r,n,i){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return h(u,"_invoke",function(o,r,n){var i,l,s,u=0,c=n||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,o){return i=e,l=0,s=t,d.n=o,a}};function p(o,r){for(l=o,s=r,e=0;!f&&u&&!n&&e<c.length;e++){var n,i=c[e],p=d.p,m=i[2];o>3?(n=m===r)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=p&&((n=o<2&&p<i[1])?(l=0,d.v=r,d.n=i[1]):p<m&&(n=o<3||i[0]>r||r>m)&&(i[4]=o,i[5]=r,d.n=m,l=0))}if(n||o>1)return a;throw f=!0,r}return function(n,c,m){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,m),l=c,s=m;(e=l<2?t:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(u=2,i){if(l||(n="next"),e=i[n]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+n+"' method"),l=1);i=t}else if((e=(f=d.n<0)?s:o.call(r,d))!==a)break}catch(e){i=t,l=1,s=e}finally{u=1}}return{value:e,done:f}}}(o,n,i),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),f=u.prototype=l.prototype=Object.create(c);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,n,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=u,h(f,"constructor",u),h(u,"constructor",s),s.displayName="GeneratorFunction",h(u,n,"GeneratorFunction"),h(f),h(f,n,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(v=function(){return{w:i,m:d}})()}function h(t,e,o,r){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}h=function(t,e,o,r){function i(e,o){h(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!r,configurable:!r,writable:!r}):t[e]=o:(i("next",0),i("throw",1),i("return",2))},h(t,e,o,r)}function b(t,e,o,r,n,i,a){try{var l=t[i](a),s=l.value}catch(t){return void o(t)}l.done?e(s):Promise.resolve(s).then(r,n)}
2const y={name:"TemplateFullSizePreview",emits:["set-portfolio-theme","create-new-portfolio"],components:{Icon:p.A,NonEditorPageFrame:d.A,Cta:c.A},data:function(){return{viewMode:"desktop"}},beforeMount:function(){this.selectedTemplate||this.isOnboardingFlow||this.$router.push("/home/onboarding"),window.scrollTo({top:0})},mounted:function(){window.scrollY&&window.scroll(0,0),this.$actions.trackPageView("/home".concat(this.$route.fullPath),"".concat(this.isOnboardingFlow?"Create portfolio":"Onboarding"," - Preview selected theme")),this.$store.state.previewAndCreatePortfolioDetails.activeView=2},activated:function(){this.viewMode="desktop",window.scrollY&&window.scroll(0,0),document.querySelector("body").classList.add("thumbnail-generator-visible")},unmounted:function(){document.querySelector("body").classList.remove("thumbnail-generator-visible")},methods:{setPortfolioTheme:function(t){var e,o=this;return(e=v().m(function e(){var r,n;return v().w(function(e){for(;;)switch(e.n){case 0:if(o.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate=t,!o.isOnboardingFlow){e.n=1;break}o.$emit("create-new-portfolio"),e.n=3;break;case 1:return e.n=2,m.A.getAllCaseStudyPages();case 2:(null!==(r=null===(n=o.$store.state.allCaseStudyPages)||void 0===n?void 0:n.length)&&void 0!==r?r:0)<1?o.$emit("create-new-portfolio"):(o.$store.state.previewAndCreatePortfolioDetails.activeView=o.activeView+1,o.$router.push("/home/portfolios/create-new-portfolio/select-projects"));case 3:return e.a(2)}},e)}),function(){var t=this,o=arguments;return new Promise(function(r,n){var i=e.apply(t,o);function a(t){b(i,r,n,a,l,"next",t)}function l(t){b(i,r,n,a,l,"throw",t)}a(void 0)})})()},goBack:function(){this.$store.state.previewAndCreatePortfolioDetails.activeView=1,this.isOnboardingFlow?this.$router.push("/home/onboarding"):this.$router.push("/home/portfolios/create-new-portfolio"),document.querySelector("body").classList.remove("thumbnail-generator-visible"),(0,f.f0)("Back to start: "+this.selectedTemplate.name,{event_category:"Onboarding",event_label:"User: "+this.$store.state.user._id}),this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate=null},changeViewMode:function(t){this.viewMode=t}},computed:{templateUrl:function(){return"".concat(location.origin,"/").concat(this.selectedTemplate.portfolioShortId)},selectedTemplate:function(){return this.$store.state.previewAndCreatePortfolioDetails.selectedPortfolioTemplate},isOnboardingFlow:function(){return!this.$store.state.creatingNewPortfolio}}};const g=(0,o(66262).A)(y,[["render",function(t,e,o,a,c,f){var d=(0,r.g2)("Cta"),p=(0,r.g2)("Icon"),m=(0,r.g2)("NonEditorPageFrame");return f.selectedTemplate?((0,r.uX)(),(0,r.Wv)(m,{key:0,"page-title":"".concat(f.selectedTemplate.name," preview"),"page-sub-title":"You can customize the colors, fonts, and sections, or switch to another template anytime.","align-horizontal":!!f.selectedTemplate,onGoBack:e[3]||(e[3]=function(t){return f.goBack()})},{headerCta:(0,r.k6)(function(){return[(0,r.bF)(d,{onClick:e[0]||(e[0]=function(t){return f.setPortfolioTheme(f.selectedTemplate)})},{default:(0,r.k6)(function(){return i(e[4]||(e[4]=[(0,r.eW)("Pick template",-1)]))}),_:1})]}),default:(0,r.k6)(function(){return[(0,r.Lk)("div",l,[(0,r.Lk)("div",{class:(0,n.C4)(["browser-wrapper scaled",[c.viewMode]])},[(0,r.Lk)("div",s,[(0,r.Lk)("button",{onClick:e[1]||(e[1]=function(t){return f.changeViewMode("desktop")}),class:(0,n.C4)({active:"desktop"===c.viewMode})},[(0,r.bF)(p,{"icon-name":"desktop_preview"})],2),(0,r.Lk)("button",{onClick:e[2]||(e[2]=function(t){return f.changeViewMode("mobile")}),class:(0,n.C4)({active:"mobile"===c.viewMode})},[(0,r.bF)(p,{"icon-name":"mobile_preview"})],2)]),(0,r.Lk)("iframe",{src:f.templateUrl+"?templatePreview=true",ref:"previewFrame",width:"1440px",height:"100%",class:(0,n.C4)([c.viewMode])},null,10,u)],2)])]}),_:1},8,["page-title","align-horizontal"])):(0,r.Q3)("v-if",!0)}],["__scopeId","data-v-10ec6047"]])},59240(t,e,o){t.exports=o.p+"src/assets/images/theme_default.bce238fa.svg"}}]);
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.