@creaditor/newsletter-starterkit 1.0.57 → 1.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/1142.creaditor.bundle.js +1 -1
  2. package/dist/1142.creaditor.bundle.js.gz +0 -0
  3. package/dist/1260.creaditor.bundle.js +1 -1
  4. package/dist/1260.creaditor.bundle.js.gz +0 -0
  5. package/dist/1271.creaditor.bundle.js +1 -544
  6. package/dist/1271.creaditor.bundle.js.gz +0 -0
  7. package/dist/1529.creaditor.bundle.js +1 -1
  8. package/dist/1529.creaditor.bundle.js.gz +0 -0
  9. package/dist/170.creaditor.bundle.js +1 -1
  10. package/dist/170.creaditor.bundle.js.gz +0 -0
  11. package/dist/2765.creaditor.bundle.js +1 -1
  12. package/dist/2765.creaditor.bundle.js.gz +0 -0
  13. package/dist/3521.creaditor.bundle.js +1 -1
  14. package/dist/3521.creaditor.bundle.js.gz +0 -0
  15. package/dist/3553.creaditor.bundle.js +1 -1
  16. package/dist/3553.creaditor.bundle.js.gz +0 -0
  17. package/dist/380.creaditor.bundle.js +7 -5
  18. package/dist/380.creaditor.bundle.js.gz +0 -0
  19. package/dist/3847.creaditor.bundle.js +951 -21
  20. package/dist/3847.creaditor.bundle.js.gz +0 -0
  21. package/dist/5909.creaditor.bundle.js +6 -6
  22. package/dist/5909.creaditor.bundle.js.gz +0 -0
  23. package/dist/5926.creaditor.bundle.js +1 -1
  24. package/dist/5926.creaditor.bundle.js.gz +0 -0
  25. package/dist/7238.creaditor.bundle.js +1 -1
  26. package/dist/7238.creaditor.bundle.js.gz +0 -0
  27. package/dist/763.creaditor.bundle.js +15 -1
  28. package/dist/763.creaditor.bundle.js.gz +0 -0
  29. package/dist/7654.creaditor.bundle.js +1 -1
  30. package/dist/7654.creaditor.bundle.js.gz +0 -0
  31. package/dist/8516.creaditor.bundle.js +1 -1
  32. package/dist/8516.creaditor.bundle.js.gz +0 -0
  33. package/dist/8547.creaditor.bundle.js +3 -3
  34. package/dist/8547.creaditor.bundle.js.gz +0 -0
  35. package/dist/9041.creaditor.bundle.js +1 -1
  36. package/dist/9041.creaditor.bundle.js.gz +0 -0
  37. package/dist/9994.creaditor.bundle.js +1 -1
  38. package/dist/9994.creaditor.bundle.js.gz +0 -0
  39. package/dist/creaditor.bundle.js +511 -220
  40. package/dist/creaditor.bundle.js.gz +0 -0
  41. package/dist/service-worker.js +1 -1
  42. package/dist/service-worker.js.gz +0 -0
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,s=t.parent("col");return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"style"},{text:"animations"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:i}=e;const l=[{type:"input",title:"add_urlAddress_from_media_site",active:()=>"style"===r.text,value:t.props.url||"",onChange:e=>{let t=e.target.value;if(-1!==t.indexOf("youtube.com/shorts/")){const e=t.split("/");e.length>0&&(t=`https://youtu.be/${e[e.length-1]}`)}n.execCommand("url",t)}},{type:"divider",active:()=>"style"===r.text},{type:"fontSize",title:"size",min:10,active:()=>"style"===r.text,max:s?.element?.offsetWidth,value:parseInt(t.props.style.width),device:e=>{if("phone"===e.target.device){const n=t.props?.breakpoints?.sm?.style?.width||t.props.style.width;e.target.value=parseInt(n)}else e.target.value=parseInt(t.props.style.width)},onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{width:t+"px",height:e.props.isCircle?t+"px":"auto"}})}}):n.execCommand("style",e=>({width:t+"px",height:e.props.isCircle?t+"px":"auto"}))}},{type:"divider"},{type:"divider",active:()=>"style"===r.text}];return l}}}};var s=n(52144);const r=()=>({set:(e,t,n)=>{switch(t){case"url":return e[t]=n,!0;case"style":if("object"==typeof n)return n.width&&(n.height=parseFloat(n.width)/1.8+"px"),e[t]=(0,s.A)(e[t],n),!0}}});var a=n(72591),i=n.n(a),l=n(88639),c=n.n(l),p=n(88128),d=n.n(p),h=n(30855),u=n.n(h),A=n(93051),m=n.n(A),y=n(51115),g={};g.setAttributes=u(),g.insert=d().bind(null,"head"),g.domAPI=c(),g.insertStyleElement=m();i()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0;n(15284);const C="video";const b=()=>({name:C,create:e=>{const{createElement:t,compose:n,helpers:s}=e,{arrayToString:a,mergeDiff:i}=s,l=document.createElement("div");l.classList.add(v.root);const c=document.createElement("div");c.classList.add(v.cover);const p=document.createElement("cdtr-media-player");return l.append(p,c),l.addEventListener("click",()=>{p.playing=!1}),t({name:C,id:n.id,template:l,defaultProps:{style:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},draggable:{group:"element"},droppable:{group:"element"},render:e=>{p.url=n.props.url,i(p,{style:n.props.style}),p.width=n.props.style.width,p.height=n.props.style.height},atomElement:p,resizeable:()=>l,handleBar:!0,validator:r(),schema:n.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:n,remove:()=>{l.remove()},createEditor:o})}})},51115(e,t,n){n.d(t,{A:()=>i});var o=n(82001),s=n.n(o),r=n(40935),a=n.n(r)()(s());a.push([e.id,".BaT92HY5C7Gxgg9C1_pc {\n position: relative;\n max-width: 100%;\n}\n.aybkK2AXl8f2XctkkRjJ {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.BaT92HY5C7Gxgg9C1_pc:hover .aybkK2AXl8f2XctkkRjJ {\n display: block;\n background-color: var(--primary);\n}\n","",{version:3,sources:["webpack://./../web-editors/video-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,gCAAgC;AAClC",sourcesContent:[".root {\n position: relative;\n max-width: 100%;\n}\n.cover {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.root:hover .cover {\n display: block;\n background-color: var(--primary);\n}\n"],sourceRoot:""}]),a.locals={root:"BaT92HY5C7Gxgg9C1_pc",cover:"aybkK2AXl8f2XctkkRjJ"};const i=a}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,a=t.parent("col"),l=e=>"style"===e.text,s=(e,n)=>t.props[e]??t.props.style?.[e]??n;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("style")},tabs:e=>{const t=[{text:"style",selected:!0},{text:"animations"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:c,changeTab:i,tabs:r}=e;return[{type:"heading",level:6,text:"video",active:()=>l(c)},{type:"input",title:"add_urlAddress_from_media_site",active:()=>l(c),value:s("url",""),onChange:e=>{let t=e.target.value;if(-1!==t.indexOf("youtube.com/shorts/")){const e=t.split("/");e.length>0&&(t=`https://youtu.be/${e[e.length-1]}`)}n.execCommand("url",t)}},{type:"heading",level:6,text:"playback",active:()=>l(c)},{type:"checkbox",title:"autoplay",info:"autoplayMutedInfo",active:()=>l(c),checked:!!s("playing",!1),onChange:e=>{const t=e.target.checked;n.execCommand("playing",t),t&&!s("muted",!0)&&(n.execCommand("muted",!0),i("style"))}},{type:"checkbox",title:"playInLoop",active:()=>l(c),checked:!!s("loop",!1),onChange:e=>{n.execCommand("loop",e.target.checked)}},{type:"checkbox",title:"slientMode",active:()=>l(c),checked:!!s("muted",!0),onChange:e=>{n.execCommand("muted",e.target.checked)}},{type:"checkbox",title:"showControls",active:()=>l(c),checked:!1!==s("controls",!0),onChange:e=>{n.execCommand("controls",e.target.checked)}},{type:"checkbox",title:"showAsImage",active:()=>l(c),checked:!!s("light",!1),onChange:e=>{n.execCommand("light",e.target.checked)}},{type:"checkbox",title:"playInline",active:()=>l(c),checked:!!s("playsinline",!1),onChange:e=>{n.execCommand("playsinline",e.target.checked)}},{type:"slider",title:"volume",min:0,max:100,unit:"%",active:()=>l(c),value:Math.round(100*(s("volume",.8)??.8)),onInput:e=>{n.execCommand("volume",Number(e.target.value)/100)}},{type:"heading",level:6,text:"size",active:()=>l(c)},{type:"fontSize",title:"size",min:10,active:()=>l(c),max:a?.element?.offsetWidth,value:parseInt(t.props.style.width),device:e=>{if("phone"===e.target.device){const n=t.props?.breakpoints?.sm?.style?.width||t.props.style.width;e.target.value=parseInt(n)}else e.target.value=parseInt(t.props.style.width)},onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{width:t+"px",height:9*t/16+"px"}})}}):n.execCommand("style",{width:t+"px"})}}]}}}};var a=n(52144);const l=["playing","loop","muted","controls","light","playsinline"],s=()=>({set:(e,t,n)=>{if(l.includes(t))return e[t]=Boolean(n),!0;switch(t){case"url":return e[t]=n,!0;case"volume":{const o=parseFloat(n);return!Number.isNaN(o)&&(e[t]=Math.min(1,Math.max(0,o)),!0)}case"style":if("object"==typeof n)return n.width&&(n.height=9*parseFloat(n.width)/16+"px"),e[t]=(0,a.A)(e[t],n),!0}}});var c=n(72591),i=n.n(c),r=n(88639),d=n.n(r),p=n(88128),h=n.n(p),m=n(30855),u=n.n(m),y=n(93051),g=n.n(y),v=n(51115),A={};A.setAttributes=u(),A.insert=h().bind(null,"head"),A.domAPI=d(),A.insertStyleElement=g();i()(v.A,A);const C=v.A&&v.A.locals?v.A.locals:void 0;n(15284);const k="video";const b=()=>({name:k,create:e=>{const{createElement:t,compose:n,helpers:a}=e,{arrayToString:l,mergeDiff:c}=a,i=document.createElement("div");i.classList.add(C.root);const r=document.createElement("div");r.classList.add(C.cover);const d=document.createElement("cdtr-media-player");return i.append(d,r),i.addEventListener("click",()=>{d.playing=!1}),t({name:k,id:n.id,template:i,defaultProps:{url:"https://www.youtube.com/watch?v=04Or_U9OexU",playing:!1,loop:!1,muted:!0,controls:!0,light:!1,playsinline:!1,volume:.8,style:{width:"400px",height:"225px"}},draggable:{group:"element"},droppable:{group:"element"},render:e=>{const t=n.props,o=(e,n)=>t[e]??t.style?.[e]??n;d.url=o("url"),c(d,{style:t.style}),d.width=t.style.width,d.height=t.style.height,d.playing=!!o("playing",!1),d.loop=!!o("loop",!1),d.controls=!1!==o("controls",!0),d.light=!!o("light",!1),d.playsinline=!!o("playsinline",!1);const a=o("volume",.8);d.volume="number"==typeof a?a:.8,d.muted=!0},atomElement:d,resizeable:()=>i,handleBar:!0,validator:s(),schema:n.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:n,remove:()=>{i.remove()},createEditor:o})}})},51115(e,t,n){n.d(t,{A:()=>c});var o=n(82001),a=n.n(o),l=n(40935),s=n.n(l)()(a());s.push([e.id,".BaT92HY5C7Gxgg9C1_pc {\n position: relative;\n max-width: 100%;\n}\n.aybkK2AXl8f2XctkkRjJ {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.BaT92HY5C7Gxgg9C1_pc:hover .aybkK2AXl8f2XctkkRjJ {\n display: block;\n background-color: var(--primary);\n}\n","",{version:3,sources:["webpack://./../web-editors/video-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,gCAAgC;AAClC",sourcesContent:[".root {\n position: relative;\n max-width: 100%;\n}\n.cover {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.root:hover .cover {\n display: block;\n background-color: var(--primary);\n}\n"],sourceRoot:""}]),s.locals={root:"BaT92HY5C7Gxgg9C1_pc",cover:"aybkK2AXl8f2XctkkRjJ"};const c=s}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),a=o(86319),i=o(36565),n=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var l=o(9334),c=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;i.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=a.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=a.M.get("config","channel");this.tabs=[{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=a.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{i.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,i.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;i.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background","transparent")},onRemoveBackground:()=>{this.background="",this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background",null),i.Ay.store().execCommand("style",{background:"",backgroundColor:null,backgroundImage:null})},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(i.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),i.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;i.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(i.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):i.Ay.store().execCommand("style",{[(0,l.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,l.A)(`padding-${o.toLowerCase()}`);"all"===o?(i.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(i.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;i.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,c.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),i.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==a.M.get("config","channel")&&i.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,i.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),i.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();i.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=i.Ay.components[i.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,a=window.getComputedStyle(r);this.maxWidth=parseInt(a.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||a.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(a.paddingTop),bottomValue:parseInt(a.paddingBottom),leftValue:parseInt(a.paddingLeft),rightValue:parseInt(a.paddingRight)},this.margin={topValue:parseInt(a.marginTop),bottomValue:parseInt(a.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,i.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=a.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,i.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,i.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,i.Ay.store().execCommand("popupDelay",e)}_hasBackground(){if(this.backgroundInstance&&this.backgroundInstance.component)return!0;const t=(this.background||"").trim();return!!t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&"none"!==t}render(){const t=a.M.get("config","channel");return r.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),a=o(86319),i=o(15604),n=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var l=o(9334),c=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;i.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=a.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=a.M.get("config","channel");this.tabs=[{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=a.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{i.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,i.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;i.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background","transparent")},onRemoveBackground:()=>{this.background="",this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background",null),i.Ay.store().execCommand("style",{background:"",backgroundColor:null,backgroundImage:null})},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(i.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),i.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;i.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(i.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):i.Ay.store().execCommand("style",{[(0,l.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,l.A)(`padding-${o.toLowerCase()}`);"all"===o?(i.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(i.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;i.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,c.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),i.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==a.M.get("config","channel")&&i.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,i.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),i.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();i.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=i.Ay.components[i.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,a=window.getComputedStyle(r);this.maxWidth=parseInt(a.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||a.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(a.paddingTop),bottomValue:parseInt(a.paddingBottom),leftValue:parseInt(a.paddingLeft),rightValue:parseInt(a.paddingRight)},this.margin={topValue:parseInt(a.marginTop),bottomValue:parseInt(a.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,i.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=a.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,i.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,i.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,i.Ay.store().execCommand("popupDelay",e)}_hasBackground(){if(this.backgroundInstance&&this.backgroundInstance.component)return!0;const t=(this.background||"").trim();return!!t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&"none"!==t}render(){const t=a.M.get("config","channel");return r.qy`
2
2
  <cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
3
3
  <div slot="content">
4
4
  ${"style"===this.tabName?r.qy`
Binary file