(()=>{var e={6942(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var r=t[o++],s=t[o++];n.o(e,r)?0===s&&o++:0===s?Object.defineProperty(e,r,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,r,{enumerable:!0,get:s})}else for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.hasOwn(e,t),(()=>{"use strict";const e=window.wp.blocks;var t=n(6942),o=n.n(t);const r=window.wp.i18n,s=window.wp.blockEditor,i=window.wp.components,l=window.ReactJSXRuntime;function a(e){const{attributes:t,setAttributes:n}=e,{comment:o=""}=t;return(0,l.jsx)(s.InspectorControls,{children:(0,l.jsx)(i.Panel,{children:(0,l.jsx)(i.PanelBody,{children:(0,l.jsx)(i.PanelRow,{children:(0,l.jsx)(i.TextareaControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Comment","mailster"),help:(0,r.__)("Add a comment to help you understand your workflow","mailster"),rows:8,value:o.replace(/<br>/g,"\n"),onChange:e=>n({comment:e||void 0})})})})})})}const c=window.wp.data;function d(e){const{attributes:t,clientId:n,name:o,isSelectionEnabled:a}=e,{isExample:d}=t;if((0,c.useSelect)(e=>{const t=e("core/block-editor").getBlocks();return t.length?t.at(-1).clientId:null})!==n)return null;const m="mailster-workflow/triggers"===o?(0,r.__)("Click + to add a step","mailster"):(0,r.__)("Workflow Finished","mailster");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Tooltip,{text:(0,r.__)("Once the user reaches this point the workflow will be finished.","mailster"),children:(0,l.jsx)("span",{className:"workflow-finished "+o.replace("mailster-workflow/","workflow-finished-"),children:!d&&m})}),a&&(0,l.jsx)(s.ButtonBlockAppender,{})]})}const m=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsxs)("g",{fill:"none",stroke:"#323232",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[(0,l.jsx)("path",{d:"M7 16.994H5a2 2 0 01-2-2v-10a2 2 0 012-2h14a2 2 0 012 2v10a2 2 0 01-2 2h-6.125l-4.21 3.745C8.02 21.313 7 20.855 7 19.992v-2.998z"}),(0,l.jsx)("path",{d:"M7 7.49L17 7.49"}),(0,l.jsx)("path",{d:"M7 11.99L14 11.99"})]}),(0,l.jsx)("path",{fill:"none",d:"M0-.006h24v24H0v-24z"})]}),u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"mailster-workflow/comment","title":"Comment","category":"mailster-workflow-steps","keywords":["comment"],"parent":["core/post-content","mailster-workflow/condition-yes","mailster-workflow/condition-no"],"description":"This is a comment block to better document your workflow. It has no effect on the workflow.","example":{"attributes":{"comment":"Code is Poetry"}},"supports":{"html":false,"className":false,"customClassName":false},"attributes":{"comment":{"type":"string"}},"textdomain":"mailster","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),{name:p,...f}=u;(0,e.registerBlockType)(p,{...f,icon:m,__experimentalLabel:function(e,{context:t}){const{comment:n,content:o,metadata:r}=e;return r?.name?r.name:n||o},edit:function(e){const{attributes:t,setAttributes:n,isSelected:i,clientId:c}=e,{comment:m=""}=t,u=(0,s.useBlockProps)({className:o()({},[])});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{...u,children:[(0,l.jsx)("div",{className:"mailster-comment",children:(0,l.jsx)(s.RichText,{tagName:"blockquote",placeholder:(0,r.__)("Enter Comment","mailster"),allowedFormats:[],value:m.replace(/(\r\n|\r|\n)/g,"<br>"),onChange:e=>n({comment:e||void 0})})}),(0,l.jsx)("div",{className:"end-stop canvas-handle"})]}),(0,l.jsx)(d,{...e}),(0,l.jsx)(a,{...e})]})},save:()=>null})})()})();