text: (("undefined"!==typeof self?self:this)["webpackJsonpflow_builder"]=("undefined"!==typeof self?self:this)["webpackJsonpflow_builder"]||[]).push([[9],{b4ec:function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"generic-contact-property-editor"},[o("hr"),o("label",{staticClass:"text-primary"},[t._v(t._s(t._f("trans")("flow-builder.contact-properties")))]),o("div",{staticClass:"custom-control custom-checkbox"},[o("input",{staticClass:"custom-control-input",attrs:{id:"setContactProperty",type:"checkbox",name:"setContactProperty"},domProps:{value:t.shouldSetContactProperty,checked:t.shouldSetContactProperty},on:{change:t.toggleSetContactProperty}}),o("label",{staticClass:"custom-control-label font-weight-normal",attrs:{for:"setContactProperty"}},[t._v(" "+t._s(t._f("trans")("flow-builder.set-contact-property-with-response"))+" ")])]),t.shouldSetContactProperty?o("div",{staticClass:"form-group"},[o("validation-message",{attrs:{"message-key":"block/"+t.block.uuid+"/config/set_contact_property/property_key"},scopedSlots:t._u([{key:"input-control",fn:function(e){var a=e.isValid;return[o("div",{staticClass:"block-contact-property-key"},[o("text-editor",{attrs:{value:t.propertyKey,label:t._f("trans")("flow-builder.property"),placeholder:t._f("trans")("flow-builder.enter-contact-property-label"),"valid-state":a},on:{input:t.updatePropertyKey}})],1)]}}],null,!1,1545571803)}),o("h6",[t._v(t._s(t._f("trans")("flow-builder.value")))]),t.isBlockInteractive(t.block)?o("div",{staticClass:"form-group"},[o("div",{staticClass:"custom-control custom-radio"},[o("input",{staticClass:"custom-control-input",attrs:{id:"setProp",type:"radio",name:"contactPropAction"},domProps:{checked:t.propertyValueAction===t.PROPERTY_VALUE_ACTION.FROM_CURRENT_BLOCK_RESPONSE,value:t.PROPERTY_VALUE_ACTION.FROM_CURRENT_BLOCK_RESPONSE},on:{change:t.updatePropertyValueAction}}),o("label",{staticClass:"custom-control-label font-weight-normal",attrs:{for:"setProp"}},[t._v(" "+t._s(t._f("trans")("flow-builder.entry-from-this-block"))+" ")])]),o("div",{staticClass:"custom-control custom-radio"},[o("input",{staticClass:"custom-control-input",attrs:{id:"clearProp",type:"radio",name:"contactPropAction"},domProps:{checked:t.propertyValueAction===t.PROPERTY_VALUE_ACTION.OPEN_EXPRESSION,value:t.PROPERTY_VALUE_ACTION.OPEN_EXPRESSION},on:{change:t.updatePropertyValueAction}}),o("label",{staticClass:"custom-control-label font-weight-normal",attrs:{for:"clearProp"}},[t._v(" "+t._s(t._f("trans")("flow-builder.expression"))+" ")])])]):t._e(),t.shouldUseOpenExpression?o("validation-message",{attrs:{"message-key":"block/"+t.block.uuid+"/config/set_contact_property/property_value"},scopedSlots:t._u([{key:"input-control",fn:function(e){var a=e.isValid;return[o("expression-input",{attrs:{label:"",placeholder:t._f("trans")("flow-builder.enter-expression"),"current-expression":t.propertyValue,"valid-state":a},on:{commitExpressionChange:t.updatePropertyValue}})]}}],null,!1,3441631689)}):t._e()],1):t._e()])},r=[],c=o("276c"),i=o("e954"),n=o("2c4c"),s=o("920b"),l=o("92a6"),u=o("fc11"),p=(o("99af"),o("9ab4")),b=o("1b40"),d=o("4bb5"),_=o("4a51"),f=o("2ef0"),y=o("2fe1"),k=o("21e9"),O=o("6faa"),h=o("d883"),v=o("6df9"),E=Object(d["e"])("flow"),P="",C="@block.value",m=function(t){Object(s["a"])(o,t);var e=Object(l["a"])(o);function o(){var t;Object(c["a"])(this,o);for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r)),Object(u["a"])(Object(n["a"])(t),"block",void 0),Object(u["a"])(Object(n["a"])(t),"shouldSetContactProperty",!1),Object(u["a"])(Object(n["a"])(t),"PROPERTY_VALUE_ACTION",{OPEN_EXPRESSION:"openExpression",FROM_CURRENT_BLOCK_RESPONSE:"fromCurrentBlockResponse"}),Object(u["a"])(Object(n["a"])(t),"propertyValueAction",""),Object(u["a"])(Object(n["a"])(t),"propertyKey",""),Object(u["a"])(Object(n["a"])(t),"propertyValue",""),Object(u["a"])(Object(n["a"])(t),"block_updateConfigByPath",void 0),Object(u["a"])(Object(n["a"])(t),"block_updateVendorMetadataByPath",void 0),Object(u["a"])(Object(n["a"])(t),"block_removeConfigByKey",void 0),t}return Object(i["a"])(o,[{key:"created",value:function(){this.shouldSetContactProperty=Object(f["has"])(this.block.config,"set_contact_property"),this.propertyKey=Object(f["get"])(this.block.config.set_contact_property,"property_key",""),this.propertyValue=Object(f["get"])(this.block.config.set_contact_property,"property_value",null),null===this.propertyValue&&this.updatePropertyValue(C),this.initPropertyValueAction()}},{key:"isBlockInteractive",value:function(t){return Object(v["c"])(t)}},{key:"toggleSetContactProperty",value:function(){this.shouldSetContactProperty=!this.shouldSetContactProperty,this.shouldSetContactProperty?this.block_updateConfigByPath({blockId:this.block.uuid,path:"set_contact_property",value:{property_key:"",property_value:this.shouldUseOpenExpression?P:C}}):this.block_removeConfigByKey({blockId:this.block.uuid,key:"set_contact_property"})}},{key:"initPropertyValueAction",value:function(){this.propertyValue===C?this.propertyValueAction=this.PROPERTY_VALUE_ACTION.FROM_CURRENT_BLOCK_RESPONSE:this.propertyValueAction=this.PROPERTY_VALUE_ACTION.OPEN_EXPRESSION}},{key:"updatePropertyValueAction",value:function(t){var e=t.target.value;this.propertyValueAction=e,e===this.PROPERTY_VALUE_ACTION.FROM_CURRENT_BLOCK_RESPONSE?this.updatePropertyValue(C):this.updatePropertyValue(P)}},{key:"shouldUseOpenExpression",get:function(){return this.propertyValueAction===this.PROPERTY_VALUE_ACTION.OPEN_EXPRESSION}},{key:"updatePropertyKey",value:function(t){this.propertyKey=t,this.block_updateConfigByPath({blockId:this.block.uuid,path:"set_contact_property.property_key",value:t})}},{key:"updatePropertyValue",value:function(t){this.propertyValue=t,this.block_updateConfigByPath({blockId:this.block.uuid,path:"set_contact_property.property_value",value:t})}}]),o}(Object(y["c"])(_["a"]));Object(p["__decorate"])([Object(b["b"])()],m.prototype,"block",void 0),Object(p["__decorate"])([E.Mutation],m.prototype,"block_updateConfigByPath",void 0),Object(p["__decorate"])([E.Mutation],m.prototype,"block_updateVendorMetadataByPath",void 0),Object(p["__decorate"])([E.Mutation],m.prototype,"block_removeConfigByKey",void 0),m=Object(p["__decorate"])([Object(b["a"])({components:{TextEditor:h["a"],ExpressionInput:O["a"],ValidationMessage:k["a"]}})],m);var j=m,g=j,x=o("2877"),R=Object(x["a"])(g,a,r,!1,null,null,null);e["a"]=R.exports},cf2c:function(t,e,o){"use strict";o.r(e),o.d(e,"install",(function(){return K}));var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"core-case-block"},[o("h3",{staticClass:"no-room-above"},[t._v(" "+t._s(t._f("trans")("flow-builder.edit-block-type",{block_type:t.trans("flow-builder."+t.block.type)}))+" ")]),o("fieldset",{attrs:{disabled:!t.isEditable}},[o("block-label-editor",{attrs:{block:t.block},on:{gearClicked:function(e){t.showSemanticLabel=!t.showSemanticLabel}}}),t.showSemanticLabel?o("block-semantic-label-editor",{attrs:{block:t.block}}):t._e(),o("block-name-editor",{attrs:{block:t.block}}),t._l(t.exits,(function(e,a){return o("div",{staticClass:"form-group"},[o("validation-message",{attrs:{"message-key":"block/"+t.block.uuid+"/exits/"+a+"/test"},scopedSlots:t._u([{key:"input-control",fn:function(r){var c=r.isValid;return[o("expression-input",{staticClass:"d-flex m-0",attrs:{label:a+1,placeholder:t._f("trans")("flow-builder.enter-expression"),"valid-state":c,"current-expression":e.test,"expression-identifier":e.uuid},on:{commitExpressionChange:t.editCaseBlockExit}})]}}],null,!0)})],1)})),t._t("extras"),o("categorization",{attrs:{block:t.block}}),o("generic-contact-property-editor",{attrs:{block:t.block}}),o("hr"),o("first-block-editor-button",{attrs:{flow:t.flow,"block-id":t.block.uuid}})],2),o("block-id",{attrs:{block:t.block}})],1)},r=[],c=o("276c"),i=o("e954"),n=o("2c4c"),s=o("920b"),l=o("92a6"),u=o("fc11"),p=(o("99af"),o("9ab4")),b=o("4bb5"),d=o("1b40"),_=o("6faa"),f=o("c964"),y=(o("96cf"),o("31aa")),k=o("2ef0"),O=o("b199"),h="Core.Case",v={allExitsHaveTests:function(t,e,o,a){return Object(O["a"])(a["builder/activeBlock"].exits,"test")},twoExitsBlank:function(t,e,o,a){return Object(O["c"])(a["builder/activeBlock"].exits,"test")}},E={},P={editCaseBlockExit:function(t,e){return Object(f["a"])(regeneratorRuntime.mark((function o(){var a,r,c,i,n,s,l,u;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return a=t.commit,r=t.dispatch,c=t.getters,i=t.rootGetters,n=e.identifier,s=e.value,l=i["builder/activeBlock"],o.next=5,r("flow/block_updateBlockExitWith",{blockId:i["builder/activeBlock"].uuid,exitId:n,props:{name:s,test:s}},{root:!0});case 5:if(!c.allExitsHaveTests){o.next=19;break}return o.t0=r,o.next=9,(new y["IdGeneratorUuidV4"]).generate();case 9:return o.t1=o.sent,o.t2={uuid:o.t1,name:"",test:""},o.t3={props:o.t2},o.t4={root:!0},o.next=15,(0,o.t0)("flow/block_createBlockExitWith",o.t3,o.t4);case 15:u=o.sent,a("flow/block_addExit",{blockId:l.uuid,newExit:u},{root:!0}),o.next=20;break;case 19:c.twoExitsBlank&&a("flow/block_popFirstExitWithoutTest",{blockId:l.uuid},{root:!0});case 20:case"end":return o.stop()}}),o)})))()},createWith:function(t,e){return Object(f["a"])(regeneratorRuntime.mark((function o(){var a,r,c;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return a=t.dispatch,r=e.props,o.t0=a,o.next=5,(new y["IdGeneratorUuidV4"]).generate();case 5:return o.t1=o.sent,o.t2={uuid:o.t1,name:"",test:""},o.t3={props:o.t2},o.t4={root:!0},o.next=11,(0,o.t0)("flow/block_createBlockDefaultExitWith",o.t3,o.t4);case 11:return o.t5=o.sent,c=[o.t5],o.abrupt("return",Object(k["defaultsDeep"])(r,{type:h,name:"",label:"",semantic_label:"",exits:c,config:{},tags:[]}));case 14:case"end":return o.stop()}}),o)})))()}},C={namespaced:!0,getters:v,mutations:E,actions:P},m=o("4a51"),j=o("8619"),g=o("af98"),x=o("2fe1"),R=o("21e9"),w=o("f04e"),V=o("3411"),S=o("1b4e"),B=o("192b"),A=o("792f"),N=o("b4ec"),I=Object(b["e"])("flow/".concat(h)),T=Object(b["e"])("builder"),L=function(t){Object(s["a"])(o,t);var e=Object(l["a"])(o);function o(){var t;Object(c["a"])(this,o);for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r)),Object(u["a"])(Object(n["a"])(t),"block",void 0),Object(u["a"])(Object(n["a"])(t),"flow",void 0),Object(u["a"])(Object(n["a"])(t),"showSemanticLabel",!1),Object(u["a"])(Object(n["a"])(t),"editCaseBlockExit",void 0),Object(u["a"])(Object(n["a"])(t),"isEditable",void 0),t}return Object(i["a"])(o,[{key:"exits",get:function(){return this.block.exits}}]),o}(Object(x["c"])(m["a"]));Object(p["__decorate"])([Object(d["b"])()],L.prototype,"block",void 0),Object(p["__decorate"])([Object(d["b"])()],L.prototype,"flow",void 0),Object(p["__decorate"])([I.Action],L.prototype,"editCaseBlockExit",void 0),Object(p["__decorate"])([T.Getter],L.prototype,"isEditable",void 0),L=Object(p["__decorate"])([Object(d["a"])({components:{GenericContactPropertyEditor:N["a"],ExpressionInput:_["a"],BlockNameEditor:w["a"],BlockLabelEditor:V["a"],BlockSemanticLabelEditor:S["a"],FirstBlockEditorButton:B["a"],BlockId:A["a"],ValidationMessage:R["a"],Categorization:j["a"]}})],L);var U=L,K=Object(g["d"])(h,C),M=U,Y=o("2877"),F=Object(Y["a"])(M,a,r,!1,null,null,null);e["default"]=F.exports}}]);
  //# sourceMappingURL=flow-builder.umd.min.9.js.map