1"use strict";(self["webpackChunktest_vuetify"]=self["webpackChunktest_vuetify"]||[]).push([[8021],{5475:function(t,e,i){i.d(e,{Z:function(){return l}});var s=i(7310),a=function(){var t=this,e=t._self._c;return e(s.Z,{staticClass:"ma-auto",attrs:{"dot-size":"25",swatches:t.swatches,"show-swatches":t.show_swatch},model:{value:t.item[t.ikey],callback:function(e){t.$set(t.item,t.ikey,e)},expression:"item[ikey]"}})},n=[],r={props:{item:Object,ikey:String,show_swatch:{type:[Boolean],required:!1,default:!0}},components:{},data(){return{types:["hexa","rgba"],type:"hexa",hex:"#FF00FF",hexa:"#FF00FFFF",rgba:{r:255,g:0,b:255,a:1},hsla:{h:300,s:1,l:.5,a:1},hsva:{h:300,s:1,v:1,a:1},swatches:[["#FF0000","#AA0000","#550000"],["#FFFF00","#AAAA00","#555500"],["#00FF00","#00AA00","#005500"],["#00FFFF","#00AAAA","#005555"],["#0000FF","#0000AA","#000055"]]}},methods:{},watch:{},computed:{color:{get(){return this[this.type]},set(t){this[this.type]=t}},showColor(){return"string"===typeof this.color?this.color:JSON.stringify(Object.keys(this.color).reduce(((t,e)=>(t[e]=Number(this.color[e].toFixed(2)),t)),{}),null,2)}}},o=r,c=i(1001),p=(0,c.Z)(o,a,n,!1,null,null,null),l=p.exports},5007:function(t,e,i){i.d(e,{Z:function(){return w}});var s=i(3431),a=i(1303),n=i(7024),r=i(1819),o=i(9759),c=i(7894),p=i(1737),l=i(8760),h=function(){var t=this,e=t._self._c;return e(a.Z,{staticClass:"text-center no-radius",attrs:{flat:"",color:"grey lighten-5"}},[e(r.Z,{staticClass:"pl-0 pr-0"},[e(c.Z,{attrs:{align:"center",justify:"center"}},[e(n.Z,{staticClass:"pt-0 pb-0",attrs:{cols:"6",sm:"4",md:"2"}},[e(p.Z,{staticClass:"ml-4 mt-2 pt-b pb-0",attrs:{placeholder:"Campaign Name",color:"black",dense:""},model:{value:t.campaign.name,callback:function(e){t.$set(t.campaign,"name",e)},expression:"campaign.name"}})],1),t._e(),e(n.Z,{staticClass:"pt-0 pb-0",attrs:{cols:"6",sm:"4"}},[e(s.Z,{attrs:{disabled:t.historyLoading||t.position<=0,color:"blue-grey darken-4",text:""},on:{click:t.undo}},[e(o.Z,[t._v(" mdi-undo ")])],1),e(s.Z,{attrs:{disabled:t.historyLoading||t.historyLength===t.position+1,color:"blue-grey darken-4",text:""},on:{click:t.redo}},[e(o.Z,[t._v(" mdi-redo ")])],1)],1),e(n.Z,{staticClass:"pt-0 pb-0 text-center text-sm-right",attrs:{cols:"12",sm:"4"}},[e(l.Z,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:i,attrs:a}){return[t.show_back_button?e(s.Z,t._g(t._b({attrs:{color:"blue-grey darken-4",text:""},on:{click:function(e){return t.save(t.campaign.steps[t.campaign.step],t.campaign.step,t.campaign.step-1)}}},"v-btn",a,!1),i),[e("span",[t._v(" Back ")])]):t._e()]}}])},[e("span",[t._v(" Go back to previous step. ")])]),e(l.Z,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:i,attrs:a}){return[e(s.Z,t._g(t._b({attrs:{color:"blue-grey darken-4",text:""},on:{click:function(e){return t.save(t.campaign.steps[t.campaign_step],t.campaign_step,t.campaign_step+1)}}},"v-btn",a,!1),i),[t.campaign_step+1<3||!t.campaign_step?e("span",[t._v(" Next ")]):t._e(),t.campaign_step+1>=3?e("span",[t._v(" Save ")]):t._e()])]}}])},[t.campaign_step+1<3?e("span",[t._v(" Next campaign Step ")]):t._e(),t.campaign_step+1>=3?e("span",[t._v(" Save and exit ")]):t._e()]),e(l.Z,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:i,attrs:a}){return[e(s.Z,t._g(t._b({attrs:{color:"blue-grey darken-4",text:""},on:{click:function(e){return t.save(t.campaign.steps[t.campaign_step],t.campaign_step,t.campaign_step)}}},"v-btn",a,!1),i),[e(o.Z,[t._v(" mdi-content-save ")])],1)]}}])},[e("span",[t._v("Save and continue editing")])])],1)],1)],1)],1)},d=[],u=i(629),m=i(5195),g={components:{},data(){return{isLoading:!1,items:[],theme:null,search:null,search_timeout:null}},computed:{campaign_step(){return 7===this.campaign.type&&0===this.campaign.step?1:this.campaign.step},show_back_button(){return 7===this.campaign.type&&this.campaign_step>1||this.campaign_step>0&&7!==this.campaign.type},...(0,u.Se)(["historyItem","position","historyLoading","historyLength","leadslide_theme","campaign"]),...(0,u.nv)(["saveScreenSize","saveScreenSize","undoItem","redoItem","setHistoryLoading"])},watch:{},created(){let t="basic/themes/?limit=20",e=[this.leadslide_theme];this.$hget(t).then((t=>{this.items=[...e,...t.data.results]}))},methods:{changeTheme(t){t&&confirm("Are you sure you want to update styles to "+t.name+"?")&&(this.$store.dispatch("set
1Loading",{loading:!0,message:"Loading Theme Design"}),this.modifyTheme(this.theme,this.campaign.steps[0].blocks))},modifyTheme(t,e){let i=this.items.find((e=>e.id===t)),s=i.fonts,a=i.colors;s=this.parseFonts(s),a=this.parseColors(a),this.$store.dispatch("setConfigStyles",{fonts:s,colors:a}),e.forEach((function(t,e){t.inner_blocks.forEach((function(e,s){e.block_contents.forEach((function(e,s){if("text"===e.type||"button"===e.type){let s=e.content;"button"===e.type&&(s=e.value);let a=/family:\s*([^;"]+)/,n=s.match(a),r="",o=/color:\s*([^;"]+)/,c=s.match(o),p="";n&&(e.content.includes("h1")||e.content.includes("h2")||e.content.includes("h3")||e.content.includes("h4")||e.content.includes("h5")||e.content.includes("h6")?(r=i.title_font,p=i.title_color):"button"===e.type?(r=i.button_font,p=i.button_text_color,e.value=e.value.replaceAll(n[1],r),c&&(e.value=e.value.replaceAll(c[1],p))):(r=i.body_font,p=i.body_color),e.content=e.content.replaceAll(n[1],r),c&&(t.background_image&&""!==t.background_image||(e.content=e.content.replaceAll(c[1],p))))}}))}))})),setTimeout(function(){this.$store.dispatch("setModifyTheme",!1),this.$store.dispatch("setLoading",{loading:!1,message:""})}.bind(this),200)},parseColors(t){m.Z.init();let e=[];for(const i in t){let s=t[i]["color"],a=m.Z.name(s),n=a[1];e.push(s.replace("#","")),e.push(n)}return e},parseFonts(t){let e="";for(const i in t){let s=[];s="undefined"!==typeof t[i].css?t[i].css.split(","):t[i].split(",");let a=s[0]+"="+t[i]+";";e+=a}return e},setItem:function(){this.$store.getters.historyItem&&this.$store.dispatch("updateCampaignBlocks",{step:this.historyItem,index:this.step}),setTimeout((()=>{this.$store.dispatch("setHistoryLoading",!1)}),1e3)},undo:function(){this.historyLoading||(this.$store.dispatch("setHistoryLoading",!0),this.$store.dispatch("undoItem"),this.setItem())},redo:function(){this.historyLoading||(this.$store.dispatch("setHistoryLoading",!0),this.$store.dispatch("redoItem"),this.setItem())},save(t,e,i){let s=!1;i>2&&(s=!0,i=2),i<0&&(i=0);const a=this;this.$store.dispatch("setLoading",{loading:!0,message:"Saving Please Wait..."}),this.$store.dispatch("updateCampaignLoading",!0),this.$store.dispatch("updateAndSaveCampaignStep",{campaign:this.campaign,next_step:i}).then((function(t){200===t.status&&a.$notify({title:"Saved:",text:"Campaign Page Saved",group:"notifications",position:"top right"})})).catch((function(t){a.$notify({title:"Error:",text:"There was an error saving your campaign. Please contact support.",group:"notifications",position:"top right"})})).finally((()=>{if(localStorage.setItem("campaign",JSON.stringify(a.campaign)),a.$store.dispatch("updateCampaignLoading",!1),a.$store.dispatch("setLoading",{loading:!1,message:"Saving Please Wait..."}),e!==i)switch(console.log(`CURREN STEP ${e}`),console.log(`NEXT STEP ${i}`),i){case 0:a.$router.push({name:"EditCampaignPageDesign"});break;case 1:a.$router.push({name:"EditCampaignPopupDesign"});break;case 2:a.$router.push({name:"EditCampaignEmailDesign"});break}else!0===s&&a.$router.push({name:"Campaigns"})}))}}},f=g,v=i(1001),_=(0,v.Z)(f,h,d,!1,null,null,null),w=_.exports},6496:function(t,e,i){i.d(e,{Z:function(){return w}});var s=i(23),a=i(3431),n=i(1303),r=i(8770),o=i(9759),c=i(8978),p=i(2515),l=i(3845),h=i(8760),d=function(){var t=this,e=t._self._c;return e(n.Z,{staticClass:"save-bar-wrapper no-radius elevation-0",attrs:{flat:""}},[e(s.Z,{attrs:{color:"blue-grey darken-4",dense:"",dark:""}},[e(o.Z,{staticClass:"mr-5",on:{click:function(e){return t.returnHome()}}},[t._v(" mdi-home ")]),e(l.qW,[t._v(" LeadSlide ")]),e(p.Z),e(h.Z,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:i,attrs:s}){return[e(a.Z,t._g(t._b({attrs:{text:"",color:"tablet"===t.screen_type?"success":""},on:{click:function(e){return t.setScreenSize("tablet")}}},"v-btn",s,!1),i),[e(o.Z,[t._v(" mdi-tablet ")])],1)]}}])},[e("span",[t._v("Preview On Tablet")])]),e(h.Z,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:i,attrs:s}){return[e(a.Z,t._g(t._b({attrs:{text:"",color:"mobile"===t.screen_type?"success":""},on:{click:function(e){return t.setScreenSize("mobile")}}},"v-btn",s,!1),i),[e(o.Z,[t._v(" mdi-cellphone ")])],1)]}}])},[e("span",[t._v("Preview On Tablet")])])],1),e(r.Z,{attrs:{width:t.preview.width+"px"},model:{value:t.preview.dialog,callback:function(e){t.$set(t.preview,"dialog",e)},expression:"preview.dialog"}},[e(c.Z,{staticStyle:{position:"relative"},attrs:{src:t.preview.image,width:t.preview.width,height:t.preview.height}},[t.preview.dialog?e("div",{staticClass:"preview-iframe-wrapper",style:"width:"+t.preview.iframe.width+"px; height:"+t.preview.iframe.height+"px; top:"+t.preview.iframe.top+"px; left:"+t.preview.iframe.left+"px;"},[e("iframe",{staticStyle:{border:"0"},attrs:{width:"100%",height:t.preview.iframe.height+"px",src:t.preview.iframe.src}})]):t._e()])],1)],1)},u=[],m=i(629),g={computed:{...(0,m.Se)(["screen_type","campaign","lastHistoryEdit"])},data(){return{preview:{dialog:!1,width:400,height:600,image:"",iframe:{src:"/preview/campaign",width:360,height:700,top:0,left:24}}}},created(){},methods:{returnHome(){confirm("Are you sure you want to stop editing this campaign and return to the dashboard ?")&&this.$router.push({name:"Campaigns"})},setScreenSize(t){localStorage.getItem("campaign")&&localStorage.removeItem("campaign"),localStorage.setItem("campaign",JSON.stringify(this.campaign)),"mobile"===t?(this.preview.image="/img/iphone_n.png",this.preview.height=803,this.preview.width=381,this.preview.iframe.top=112,this.preview.iframe.left=24,this.preview.iframe.width=330,this.preview.iframe.height=581):(this.preview.image="/img/ipad_n.png",this.preview.height=903,this.preview.width=636,this.preview.iframe.top=83,this.preview.iframe.left=42,this.preview.iframe.width=550,this.preview.iframe.height=737),this.preview.dialog=!0}}},f=g,v=i(1001),_=(0,v.Z)(f,d,u,!1,null,null,null),w=_.exports}
1,3240:function(t,e,i){var s=i(5530),a=i(6141),n=i(950);e.Z=(0,s.Z)(a.Z,(0,n.J)("form")).extend({name:"v-form",provide(){return{form:this}},inheritAttrs:!1,props:{disabled:Boolean,lazyValidation:Boolean,readonly:Boolean,value:Boolean},data:()=>({inputs:[],watchers:[],errorBag:{}}),watch:{errorBag:{handler(t){const e=Object.values(t).includes(!0);this.$emit("input",!e)},deep:!0,immediate:!0}},methods:{watchInput(t){const e=t=>t.$watch("hasError",(e=>{this.$set(this.errorBag,t._uid,e)}),{immediate:!0}),i={_uid:t._uid,valid:()=>{},shouldValidate:()=>{}};return this.lazyValidation?i.shouldValidate=t.$watch("shouldValidate",(s=>{s&&(this.errorBag.hasOwnProperty(t._uid)||(i.valid=e(t)))})):i.valid=e(t),i},validate(){return 0===this.inputs.filter((t=>!t.validate(!0))).length},reset(){this.inputs.forEach((t=>t.reset())),this.resetErrorBag()},resetErrorBag(){this.lazyValidation&&setTimeout((()=>{this.errorBag={}}),0)},resetValidation(){this.inputs.forEach((t=>t.resetValidation())),this.resetErrorBag()},register(t){this.inputs.push(t),this.watchers.push(this.watchInput(t))},unregister(t){const e=this.inputs.find((e=>e._uid===t._uid));if(!e)return;const i=this.watchers.find((t=>t._uid===e._uid));i&&(i.valid(),i.shouldValidate()),this.watchers=this.watchers.filter((t=>t._uid!==e._uid)),this.inputs=this.inputs.filter((t=>t._uid!==e._uid)),this.$delete(this.errorBag,e._uid)}},render(t){return t("form",{staticClass:"v-form",attrs:{novalidate:!0,...this.attrs$},on:{submit:t=>this.$emit("submit",t)}},this.$slots.default)}})}}]); 2//# sourceMappingURL=8021.92e7e50e.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.