!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){return o(e[i][1][r]||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeGroups=_interopRequireDefault(require("./components/NodeGroups")),_NodeTriggerBuilder=_interopRequireDefault(require("./components/NodeTriggerBuilder")),_NodeTriggerBuilderPreview=_interopRequireDefault(require("./components/NodeTriggerBuilderPreview"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(App,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(App);function App(){return _classCallCheck(this,App),_super.apply(this,arguments)}return Constructor=App,(protoProps=[{key:"render",value:function(){return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-4"},_react.default.createElement(_NodeGroups.default,{botId:this.props.botId})),_react.default.createElement("div",{className:"col-5"},_react.default.createElement(_NodeTriggerBuilder.default,{botId:this.props.botId})),_react.default.createElement("div",{className:"col-3"},_react.default.createElement(_NodeTriggerBuilderPreview.default,null)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),App}(_react.Component);exports.default=_default},{"./components/NodeGroups":8,"./components/NodeTriggerBuilder":9,"./components/NodeTriggerBuilderPreview":10,react:146}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addNodeGroup=function(botId){return function(dispatch){dispatch({type:"FETCH_NODE_GROUPS"}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/addgroup/"+botId).then((function(response){dispatch({type:"ADD_GROUP_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"ADD_GROUP_REJECTED",payload:err})}))}},exports.fetchNodeGroups=function(botId){return function(dispatch){dispatch({type:"FETCH_NODE_GROUPS"}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/nodegroups/"+botId).then((function(response){dispatch({type:"FETCH_NODE_GROUPS_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"FETCH_NODE_GROUPS_REJECTED",payload:err})}))}},exports.updateNodeGroup=function(obj){return function(dispatch){dispatch({type:"UPDATE_GROUP_FULFILLED",payload:obj}),clearTimeout(timeout),timeout=setTimeout((function(){_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/updategroup",obj.toJS()).then((function(response){dispatch({type:"UPDATE_GROUP_UPDATED",payload:response.data})})).catch((function(err){dispatch({type:"ADD_GROUP_REJECTED",payload:err})}))}),200)}};var obj,_axios=(obj=require("axios"))&&obj.__esModule?obj:{default:obj};_axios.default.defaults.headers.common["X-CSRFToken"]=confLH.csrf_token;var timeout=null},{axios:72}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addTrigger=function(obj){return function(dispatch){dispatch({type:"ADD_TRIGGER",payload:obj}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/addtrigger/"+obj.id).then((function(response){dispatch({type:"ADD_TRIGGER_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"ADD_TRIGGER_REJECTED",payload:err})}))}},exports.addTriggerEvent=function(obj){return function(dispatch){dispatch({type:"ADD_TRIGGER_EVENT",payload:obj}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/addtriggerevent/"+obj.id).then((function(response){dispatch({type:"ADD_TRIGGER_EVENT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"ADD_TRIGGER_EVENT_FULFILLED",payload:err})}))}},exports.deleteGroup=function(groupId){return function(dispatch){dispatch({type:"DELETE_TRIGGER_GROUP",payload:{groupId:groupId}}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/deletegroup/"+groupId.id).then((function(response){dispatch({type:"DELETE_TRIGGER_GROUP_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"DELETE_TRIGGER_GROUP_REJECTED",payload:err})}))}},exports.deleteTriggerEvent=function(obj){return function(dispatch){dispatch({type:"DELETE_TRIGGER_EVENT",payload:obj}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/deletetriggerevent/"+obj.get("id")).then((function(response){dispatch({type:"DELETE_TRIGGER_EVENT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"DELETE_TRIGGER_EVENT_FULFILLED",payload:err})}))}},exports.fetchNodeGroupTriggerAction=fetchNodeGroupTriggerAction,exports.fetchNodeGroupTriggers=fetchNodeGroupTriggers,exports.initArgumentTemplates=function(){return function(dispatch){_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/argumenttemplates").then((function(response){dispatch({type:"INIT_BOT_ARGUMENTS_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"INIT_BOT_ARGUMENTS_REJECTED",payload:err})}))}},exports.initBot=function(botId){return function(dispatch){dispatch({type:"INIT_BOT",payload:botId}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/initbot/"+botId).then((function(response){dispatch({type:"INIT_BOT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"INIT_BOT_REJECTED",payload:err})}))}},exports.initRestMethods=function(RestAPIID){return function(dispatch){_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/restapimethods/"+RestAPIID).then((function(response){dispatch({type:"INIT_BOT_REST_API_METHODS",payload:response.data})})).catch((function(err){}))}},exports.loadUseCases=function(obj){return function(dispatch){_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/loadusecases/"+obj.get("id")).then((function(response){dispatch({type:"LOAD_USE_CASES_TRIGGER_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"LOAD_USE_CASES_TRIGGER_FULFILLED",payload:err})}))}},exports.makeTriggerCopy=function(obj){return function(dispatch){_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/maketriggercopy/"+obj.get("id")).then((function(response){fetchNodeGroupTriggers(obj.get("group_id"))(dispatch),fetchNodeGroupTriggerAction(response.data.id)(dispatch)})).catch((function(err){dispatch({type:"COPY_TRIGGER_REJECTED",payload:err})}))}},exports.removeTrigger=function(obj){return function(dispatch){dispatch({type:"REMOVE_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/removetrigger/"+obj.get("id")).then((function(response){dispatch({type:"REMOVE_TRIGGER_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"REMOVE_TRIGGER_REJECTED",payload:err})}))}},exports.saveTrigger=function(obj){return function(dispatch){dispatch({type:"SAVE_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/savetrigger/(method)/actions",obj.toJS()).then((function(response){dispatch({type:"SAVE_TRIGGER_FULFILLED",payload:response.data}),updatePayload(dispatch,obj)})).catch((function(err){dispatch({type:"SAVE_TRIGGER_REJECTED",payload:err})}))}},exports.setAsArgumentTrigger=function(obj){return function(dispatch){dispatch({type:"SET_AS_ARGUMENT_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/setasargument/"+obj.get("id")+"/"+obj.get("as_argument")).then((function(response){dispatch({type:"SET_AS_ARGUMENT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_AS_ARGUMENT__REJECTED",payload:err})}))}},exports.setDefaultAlwaysTrigger=function(obj){return function(dispatch){dispatch({type:"SET_DEFAULT_ALWAYS_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/setdefaultalwaystrigger/"+obj.get("id")+"/"+obj.get("default_always")).then((function(response){dispatch({type:"SET_DEFAULT_ALWAYS_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_DEFAULT_ALWAYS_REJECTED",payload:err})}))}},exports.setDefaultTrigger=function(obj){return function(dispatch){dispatch({type:"SET_DEFAULT_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/setdefaulttrigger/"+obj.get("id")+"/"+obj.get("default")).then((function(response){dispatch({type:"SET_DEFAULT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_DEFAULT_REJECTED",payload:err})}))}},exports.setDefaultUnknownBtnTrigger=function(obj){return function(dispatch){dispatch({type:"SET_DEFAULT_UNKNOWN_BTN_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/setdefaultunknownbtntrigger/"+obj.get("id")+"/"+obj.get("default_unknown_btn")).then((function(response){dispatch({type:"SET_DEFAULT_UNKNOWN_BTN_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_DEFAULT_UNKNOWN_BTN_REJECTED",payload:err})}))}},exports.setDefaultUnknownTrigger=function(obj){return function(dispatch){dispatch({type:"SET_DEFAULT_UNKNOWN_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/setdefaultunknowntrigger/"+obj.get("id")+"/"+obj.get("default_unknown")).then((function(response){dispatch({type:"SET_DEFAULT_UNKNOWN_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_DEFAULT_UNKNOWN_REJECTED",payload:err})}))}},exports.setInProgressTrigger=function(obj){return function(dispatch){dispatch({type:"SET_IN_PROGRESS_TRIGGER",payload:obj}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/setinprogresstrigger/"+obj.get("id")+"/"+obj.get("in_progress")).then((function(response){dispatch({type:"SET_IN_PROGRESS_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_IN_PROGRESS_REJECTED",payload:err})}))}},exports.setTriggerGroup=function(obj,group_id){return function(dispatch){dispatch({type:"SET_GROUP_TRIGGER_EVENT",payload:obj,group_id:group_id}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/settriggergroup/"+obj.get("id")+"/"+obj.get("group_id")).then((function(response){dispatch({type:"SET_GROUP_TRIGGER_EVENT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"SET_GROUP_TRIGGER_EVENT_FULFILLED",payload:err})}))}},exports.updatePayload=updatePayload,exports.updateTriggerEvent=function(obj){return function(dispatch){dispatch({type:"UPDATE_TRIGGER_EVENT",payload:obj}),clearTimeout(timeoutEvent),timeoutEvent=setTimeout((function(){_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/updatetriggerevent",obj.toJS()).then((function(response){dispatch({type:"UPDATE_TRIGGER_EVENT_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"UPDATE_TRIGGER_EVENT_FULFILLED",payload:err})}))}),1e3)}},exports.updateTriggerName=function(obj){return function(dispatch){dispatch({type:"UPDATE_TRIGGER_NAME",payload:obj})}},exports.updateTriggerType=function(obj){return function(dispatch){dispatch({type:"UPDATE_TRIGGER_TYPE",payload:obj})}};var obj,_axios=(obj=require("axios"))&&obj.__esModule?obj:{default:obj};function fetchNodeGroupTriggers(groupId){return function(dispatch){dispatch({type:"FETCH_NODE_GROUP_TRIGGERS"}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/nodegrouptriggers/"+groupId).then((function(response){dispatch({type:"FETCH_NODE_GROUP_TRIGGERS_FULFILLED",payload:response.data,group_id:groupId})})).catch((function(err){dispatch({type:"FETCH_NODE_GROUP_TRIGGERS_REJECTED",payload:err})}))}}function fetchNodeGroupTriggerAction(triggerId){return function(dispatch){dispatch({type:"FETCH_TRIGGER_RESPONSE",payload:{triggerid:triggerId}}),_axios.default.get(WWW_DIR_JAVASCRIPT+"genericbot/nodetriggeractions/"+triggerId).then((function(response){dispatch({type:"FETCH_TRIGGER_RESPONSE_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"FETCH_TRIGGER_RESPONSE_REJECTED",payload:err})}))}}_axios.default.defaults.headers.common["X-CSRFToken"]=confLH.csrf_token;var timeoutEvent=null;function updatePayload(dispatch,obj){_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/getpayloads/"+obj.get("id")).then((function(response){dispatch({type:"UPDATE_PAYLOADS_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"UPDATE_PAYLOADS_REJECTED",payload:err})}))}},{axios:72}],4:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addPayload=function(payload){return function(dispatch){dispatch({type:"ADD_PAYLOAD_TRIGGERS"}),_axios.default.post(WWW_DIR_JAVASCRIPT+"genericbot/addpayload",payload).then((function(response){dispatch({type:"ADD_PAYLOAD_TRIGGERS_FULFILLED",payload:response.data})})).catch((function(err){dispatch({type:"ADD_PAYLOAD_TRIGGERS_REJECTED",payload:err})}))}};var obj,_axios=(obj=require("axios"))&&obj.__esModule?obj:{default:obj};_axios.default.defaults.headers.common["X-CSRFToken"]=confLH.csrf_token},{axios:72}],5:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeGroupTrigger=_interopRequireDefault(require("./NodeGroupTrigger")),_NodeGroupTriggerEvents=_interopRequireDefault(require("./NodeGroupTriggerEvents")),_reactRedux=require("react-redux"),_nodeGroupTriggerActions=require("../actions/nodeGroupTriggerActions"),_nodeGroupActions=require("../actions/nodeGroupActions");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{nodegrouptriggers:store.nodegrouptriggers,currenttrigger:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeGroup,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeGroup);function NodeGroup(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeGroup),(_this=_super.call(this,props)).state={position:_this.props.group.get("pos")},_this.addTriggerEvent=_this.addTriggerEvent.bind(_assertThisInitialized(_this)),_this.updateEvent=_this.updateEvent.bind(_assertThisInitialized(_this)),_this.deleteEvent=_this.deleteEvent.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeGroup,(protoProps=[{key:"handleChange",value:function(e){var name=e.target.value;this.props.changeTitle(this.props.group.set("name",name))}},{key:"handleCollapse",value:function(){this.props.dispatch((0,_nodeGroupActions.updateNodeGroup)(this.props.group.set("is_collapsed",!this.props.group.get("is_collapsed"))))}},{key:"addTrigger",value:function(){this.props.dispatch((0,_nodeGroupTriggerActions.addTrigger)({id:this.props.group.get("id")}))}},{key:"componentWillMount",value:function(){this.props.dispatch((0,_nodeGroupTriggerActions.fetchNodeGroupTriggers)(this.props.group.get("id")))}},{key:"addTriggerEvent",value:function(){this.props.dispatch((0,_nodeGroupTriggerActions.addTriggerEvent)({id:this.props.currenttrigger.getIn(["currenttrigger","id"])}))}},{key:"updateEvent",value:function(event){this.props.dispatch((0,_nodeGroupTriggerActions.updateTriggerEvent)(event))}},{key:"deleteEvent",value:function(event){this.props.dispatch((0,_nodeGroupTriggerActions.deleteTriggerEvent)(event))}},{key:"deleteGroup",value:function(){confirm("Are you sure?")&&this.props.dispatch((0,_nodeGroupTriggerActions.deleteGroup)({id:this.props.group.get("id")}))}},{key:"setPosition",value:function(){this.props.dispatch((0,_nodeGroupActions.updateNodeGroup)(this.props.group.set("pos",this.state.position)))}},{key:"render",value:function(){var _this2=this;if(this.props.nodegrouptriggers.get("nodegrouptriggers").has(this.props.group.get("id")))var mappedNodeGroupTriggers=this.props.nodegrouptriggers.get("nodegrouptriggers").get(this.props.group.get("id")).map((function(nodegrouptrigger){return _react.default.createElement(_NodeGroupTrigger.default,{key:nodegrouptrigger.get("id"),trigger:nodegrouptrigger})}));else mappedNodeGroupTriggers="";if(this.props.currenttrigger.getIn(["currenttrigger","id"])&&this.props.currenttrigger.getIn(["currenttrigger","group_id"])==this.props.group.get("id"))var triggerAction=_react.default.createElement(_NodeGroupTriggerEvents.default,{deleteEvent:this.deleteEvent.bind(this),addEvent:this.addTriggerEvent.bind(this),updateEvent:this.updateEvent.bind(this),trigger:this.props.currenttrigger.get("currenttrigger")});else triggerAction="";var classNameCurrent="material-icons chat-active";return this.props.group.get("bot_id")!=this.props.botId&&(classNameCurrent="material-icons chat-unread"),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",{className:"my-2"}),_react.default.createElement("div",{className:"d-flex"},_react.default.createElement("div",{className:"flex-grow-1"},_react.default.createElement("div",{className:"input-group"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",null,_react.default.createElement("i",{className:classNameCurrent,title:"Bot Id - "+this.props.group.get("bot_id")},"home"))),_react.default.createElement("input",{className:"form-control form-control-sm gbot-group-name",value:this.props.group.get("name"),onChange:this.handleChange.bind(this)}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-toolbar"},_react.default.createElement("div",{className:"input-group input-group-sm mr-2"},_react.default.createElement("input",{type:"number",title:"Position",onChange:function(e){return _this2.setState({position:parseInt(e.target.value)})},className:"form-control",style:{width:"65px"},defaultValue:this.props.group.get("pos"),placeholder:"Position","aria-label":"Input group example","aria-describedby":"btnGroupAddon"}),_react.default.createElement("div",{className:"input-group-append"},_react.default.createElement("button",{className:"btn btn-secondary",disabled:this.props.group.get("pos")==this.state.position,onClick:this.setPosition.bind(this),type:"button",id:"button-addon1"},_react.default.createElement("span",{className:"material-icons mr-0"},"done")))),_react.default.createElement("div",{className:"btn-group btn-group-sm",role:"group","aria-label":"Basic example"},_react.default.createElement("button",{title:"Collapse/Expand",className:"btn btn-sm btn-secondary float-right",onClick:this.handleCollapse.bind(this)},_react.default.createElement("span",{className:"material-icons mr-0"},this.props.group.get("is_collapsed")?"unfold_more":"unfold_less")," ",_react.default.createElement("span",{className:"fs11"},this.props.nodegrouptriggers.get("nodegrouptriggers").get(this.props.group.get("id"))?"["+this.props.nodegrouptriggers.get("nodegrouptriggers").get(this.props.group.get("id")).size+"]":"")),_react.default.createElement("a",{className:"btn btn-sm btn-secondary float-right",href:WWW_DIR_JAVASCRIPT+"genericbot/downloadbotgroup/"+this.props.group.get("id")},_react.default.createElement("i",{className:"material-icons mr-0"},"cloud_download")),_react.default.createElement("button",{className:"btn btn-sm btn-danger float-right",onClick:this.deleteGroup.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))))),_react.default.createElement("div",{className:this.props.group.get("is_collapsed")?"d-none":""},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("ul",{className:"gbot-trglist"},mappedNodeGroupTriggers,_react.default.createElement("li",null,_react.default.createElement("button",{className:"btn btn-sm btn-secondary",onClick:this.addTrigger.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"add")))))),triggerAction)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeGroup}(_react.Component))||_class;exports.default=_default},{"../actions/nodeGroupActions":2,"../actions/nodeGroupTriggerActions":3,"./NodeGroupTrigger":6,"./NodeGroupTriggerEvents":7,react:146,"react-redux":131}],6:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_nodeGroupTriggerActions=require("../actions/nodeGroupTriggerActions");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,require("react-redux").connect)((function(store){return{currenttrigger:store.currenttrigger,nodegroups:store.nodegroups}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeGroupTrigger,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeGroupTrigger);function NodeGroupTrigger(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeGroupTrigger),(_this=_super.call(this,props)).state={isCurrent:!1,changingGroup:!1},_this.removeTrigger=_this.removeTrigger.bind(_assertThisInitialized(_this)),_this.setDefaultTrigger=_this.setDefaultTrigger.bind(_assertThisInitialized(_this)),_this.setDefaultUnknownTrigger=_this.setDefaultUnknownTrigger.bind(_assertThisInitialized(_this)),_this.setDefaultUnknownBtnTrigger=_this.setDefaultUnknownBtnTrigger.bind(_assertThisInitialized(_this)),_this.setDefaultAlwaysTrigger=_this.setDefaultAlwaysTrigger.bind(_assertThisInitialized(_this)),_this.setInProgressTrigger=_this.setInProgressTrigger.bind(_assertThisInitialized(_this)),_this.setAsArgumentTrigger=_this.setAsArgumentTrigger.bind(_assertThisInitialized(_this)),_this.changeGroup=_this.changeGroup.bind(_assertThisInitialized(_this)),_this.makeCopy=_this.makeCopy.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeGroupTrigger,(protoProps=[{key:"loadTriggerActions",value:function(){this.props.dispatch((0,_nodeGroupTriggerActions.fetchNodeGroupTriggerAction)(this.props.trigger.get("id")))}},{key:"removeTrigger",value:function(){this.props.dispatch((0,_nodeGroupTriggerActions.removeTrigger)(this.props.trigger))}},{key:"setDefaultTrigger",value:function(e){var value=e.target.checked;this.props.dispatch((0,_nodeGroupTriggerActions.setDefaultTrigger)(this.props.trigger.set("default",1==value?1:0)))}},{key:"setAsArgumentTrigger",value:function(e){var value=e.target.checked;this.props.dispatch((0,_nodeGroupTriggerActions.setAsArgumentTrigger)(this.props.trigger.set("as_argument",1==value?1:0)))}},{key:"setDefaultUnknownTrigger",value:function(e){var value=e.target.checked;this.props.dispatch((0,_nodeGroupTriggerActions.setDefaultUnknownTrigger)(this.props.trigger.set("default_unknown",1==value?1:0)))}},{key:"setDefaultUnknownBtnTrigger",value:function(e){var value=e.target.checked;this.props.dispatch((0,_nodeGroupTriggerActions.setDefaultUnknownBtnTrigger)(this.props.trigger.set("default_unknown_btn",1==value?1:0)))}},{key:"setDefaultAlwaysTrigger",value:function(e){var value=e.target.checked;this.props.dispatch((0,_nodeGroupTriggerActions.setDefaultAlwaysTrigger)(this.props.trigger.set("default_always",1==value?1:0)))}},{key:"setInProgressTrigger",value:function(e){var value=e.target.checked;this.props.dispatch((0,_nodeGroupTriggerActions.setInProgressTrigger)(this.props.trigger.set("in_progress",1==value?1:0)))}},{key:"changeGroup",value:function(state,group_id){this.props.currenttrigger.getIn(["currenttrigger","id"])!=this.props.trigger.get("id")?(this.setState({changingGroup:state}),group_id&&this.props.dispatch((0,_nodeGroupTriggerActions.setTriggerGroup)(this.props.trigger.set("group_id",parseInt(group_id)),this.props.trigger.get("group_id")))):alert("Please cancel trigger editing before changing it's group!")}},{key:"makeCopy",value:function(){this.props.dispatch((0,_nodeGroupTriggerActions.makeTriggerCopy)(this.props.trigger))}},{key:"shouldComponentUpdate",value:function(nextProps,nextState){return this.props.trigger!==nextProps.trigger||this.props.nodegroups!==nextProps.nodegroups||(nextProps.currenttrigger.getIn(["currenttrigger","id"])===this.props.trigger.get("id")&&0==this.state.isCurrent?(this.state.isCurrent=!0,!0):nextProps.currenttrigger.getIn(["currenttrigger","id"])!==this.props.trigger.get("id")&&1==this.state.isCurrent?(this.state.isCurrent=!1,!0):this.state.changingGroup!=nextState.changingGroup)}},{key:"render",value:function(){var _this2=this,classNameCurrent="btn btn-secondary btn-sm";this.props.currenttrigger.get("currenttrigger").get("id")===this.props.trigger.get("id")&&(classNameCurrent="btn btn-secondary btn-sm btn-success"),1==this.props.trigger.get("default")&&(classNameCurrent+=" default-trigger-btn"),1!=this.props.trigger.get("default_unknown")&&1!=this.props.trigger.get("default_unknown_btn")||(classNameCurrent+=" btn-warning"),1==this.props.trigger.get("default_always")&&(classNameCurrent+=" btn-info");var list=this.props.nodegroups.get("nodegroups").sortBy((function(group){return group.get("pos")})).map((function(nodegroup){return _react.default.createElement("option",{key:nodegroup.get("id"),value:nodegroup.get("id")},nodegroup.get("name"))}));return _react.default.createElement("li",null,_react.default.createElement("div",{className:"btn-group trigger-btn"},_react.default.createElement("button",{onClick:this.loadTriggerActions.bind(this),className:classNameCurrent},this.props.trigger.get("name")),_react.default.createElement("button",{type:"button",className:"btn btn-sm btn-success dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}),_react.default.createElement("ul",{className:"dropdown-menu dropdown-menu-trigger"},_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("a",{href:"#",onClick:this.removeTrigger},_react.default.createElement("i",{className:"material-icons"},"delete")," Delete")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("a",{href:"#",onClick:this.makeCopy},_react.default.createElement("i",{className:"material-icons"},"file_copy")," Copy")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("a",{href:"#",onClick:function(e){return _this2.changeGroup(!_this2.state.changingGroup)}},_react.default.createElement("i",{className:"material-icons"},"home")," Change group")),_react.default.createElement("div",{className:"dropdown-divider"}),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("label",{className:"mb-0",title:"This message will be send tu visitor then chat starts"},_react.default.createElement("input",{onChange:this.setDefaultTrigger,type:"checkbox",checked:this.props.trigger.get("default")})," Default")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("label",{className:"mb-0",title:"This message will be send to visitor then we could dot determine what we should do with a visitor message"},_react.default.createElement("input",{onChange:this.setDefaultUnknownTrigger,type:"checkbox",checked:this.props.trigger.get("default_unknown")})," Default for unknown message")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("label",{className:"mb-0",title:"This message will be send to visitor then we could dot determine what we should do with a button click"},_react.default.createElement("input",{onChange:this.setDefaultUnknownBtnTrigger,type:"checkbox",checked:this.props.trigger.get("default_unknown_btn")})," Default for unknown button click")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("label",{className:"mb-0",title:"This trigger will be always checking independently in what process we are"},_react.default.createElement("input",{onChange:this.setDefaultAlwaysTrigger,type:"checkbox",checked:this.props.trigger.get("default_always")})," Execute always")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("label",{className:"mb-0",title:"This trigger will be executed if previous process has not finished yet."},_react.default.createElement("input",{onChange:this.setInProgressTrigger,type:"checkbox",checked:this.props.trigger.get("in_progress")})," In progress trigger")),_react.default.createElement("li",{className:"dropdown-item"},_react.default.createElement("label",{className:"mb-0",title:"This trigger can be passed as argument. Required for it to work for Themes, Proactive chat and for trigger_id argument."},_react.default.createElement("input",{onChange:this.setAsArgumentTrigger,type:"checkbox",checked:this.props.trigger.get("as_argument")})," Can be passed as argument ",_react.default.createElement("b",null,this.props.trigger.get("id")))))),this.state.changingGroup&&_react.default.createElement("div",{className:"btn-group ml-1"},_react.default.createElement("select",{className:"form-control form-control-sm",onChange:function(e){return _this2.changeGroup(!1,e.currentTarget.value)},value:this.props.trigger.get("group_id")},list),_react.default.createElement("button",{type:"button",className:"btn btn-sm btn-warning",onClick:function(e){return _this2.changeGroup(!1)}},_react.default.createElement("span",{className:"material-icons mr-0"},"close"))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeGroupTrigger}(_react.Component))||_class;exports.default=_default},{"../actions/nodeGroupTriggerActions":3,react:146,"react-redux":131}],7:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeGroupTriggerEvent=(require("immutable"),(obj=require("./events/NodeGroupTriggerEvent"))&&obj.__esModule?obj:{default:obj});function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeGroupTriggerEvents,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeGroupTriggerEvents);function NodeGroupTriggerEvents(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeGroupTriggerEvents),(_this=_super.call(this,props)).addEvent=_this.addEvent.bind(_assertThisInitialized(_this)),_this.deleteEvent=_this.deleteEvent.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeGroupTriggerEvents,(protoProps=[{key:"addEvent",value:function(){this.props.addEvent()}},{key:"updateEvent",value:function(event){this.props.updateEvent(event)}},{key:"deleteEvent",value:function(event){this.props.deleteEvent(event)}},{key:"render",value:function(){var _this2=this,mappedEvents=this.props.trigger.get("events").map((function(event){return _react.default.createElement(_NodeGroupTriggerEvent.default,{deleteEvent:_this2.deleteEvent.bind(_this2),updateEvent:_this2.updateEvent.bind(_this2),key:event.get("id"),event:event})}));return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("br",null),mappedEvents,_react.default.createElement("button",{onClick:this.addEvent,className:"btn btn-info btn-sm"},"Add event"),_react.default.createElement("span",{className:"pl-2"},_react.default.createElement("i",null,_react.default.createElement("small",null,"Saved automatically.")))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeGroupTriggerEvents}(_react.Component);exports.default=_default},{"./events/NodeGroupTriggerEvent":49,immutable:102,react:146}],8:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeGroup=(obj=require("./NodeGroup"))&&obj.__esModule?obj:{default:obj},_reactRedux=require("react-redux"),_nodeGroupActions=require("../actions/nodeGroupActions");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(state){return{nodegroups:state.nodegroups}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeGroups,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeGroups);function NodeGroups(){return _classCallCheck(this,NodeGroups),_super.apply(this,arguments)}return Constructor=NodeGroups,(protoProps=[{key:"componentWillMount",value:function(){this.props.dispatch((0,_nodeGroupActions.fetchNodeGroups)(this.props.botId))}},{key:"addGroup",value:function(){this.props.dispatch((0,_nodeGroupActions.addNodeGroup)(this.props.botId))}},{key:"importGroup",value:function(){lhc.revealModal({iframe:!0,height:500,url:WWW_DIR_JAVASCRIPT+"/genericbot/botimportgroup/"+this.props.botId})}},{key:"changeTitle",value:function(obj){this.props.dispatch((0,_nodeGroupActions.updateNodeGroup)(obj))}},{key:"render",value:function(){var _this=this,mappedNodeGroups=this.props.nodegroups.get("nodegroups").sortBy((function(group){return group.get("pos")})).map((function(nodegroup){return _react.default.createElement(_NodeGroup.default,{botId:_this.props.botId,changeTitle:_this.changeTitle.bind(_this),key:nodegroup.get("id"),group:nodegroup})}));return _react.default.createElement("div",null,mappedNodeGroups,_react.default.createElement("hr",null),_react.default.createElement("div",{className:"btn-group",role:"group","aria-label":"Basic example"},_react.default.createElement("button",{className:"btn btn-sm btn-secondary",onClick:this.addGroup.bind(this)},_react.default.createElement("i",{className:"material-icons"},"add"),"Add group"),_react.default.createElement("button",{className:"btn btn-sm btn-secondary",onClick:this.importGroup.bind(this)},_react.default.createElement("i",{className:"material-icons"},"cloud_upload"),"Import group")))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeGroups}(_react.Component))||_class;exports.default=_default},{"../actions/nodeGroupActions":2,"./NodeGroup":5,react:146,"react-redux":131}],9:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_reactRedux=require("react-redux"),_nodeGroupTriggerActions=require("../actions/nodeGroupTriggerActions"),_NodeTriggerActionText=_interopRequireDefault(require("./builder/NodeTriggerActionText")),_NodeTriggerActionList=_interopRequireDefault(require("./builder/NodeTriggerActionList")),_NodeTriggerActionGeneric=_interopRequireDefault(require("./builder/NodeTriggerActionGeneric")),_NodeTriggerActionCollectable=_interopRequireDefault(require("./builder/NodeTriggerActionCollectable")),_NodeTriggerActionButtons=_interopRequireDefault(require("./builder/NodeTriggerActionButtons")),_NodeTriggerActionCommand=_interopRequireDefault(require("./builder/NodeTriggerActionCommand")),_NodeTriggerActionPredefined=_interopRequireDefault(require("./builder/NodeTriggerActionPredefined")),_NodeTriggerActionTyping=_interopRequireDefault(require("./builder/NodeTriggerActionTyping")),_NodeTriggerActionProgress=_interopRequireDefault(require("./builder/NodeTriggerActionProgress")),_NodeTriggerActionVideo=_interopRequireDefault(require("./builder/NodeTriggerActionVideo")),_NodeTriggerActionAttribute=_interopRequireDefault(require("./builder/NodeTriggerActionAttribute")),_NodeTriggerActionActions=_interopRequireDefault(require("./builder/NodeTriggerActionActions")),_NodeTriggerActionIntent=_interopRequireDefault(require("./builder/NodeTriggerActionIntent")),_NodeTriggerActionIntentCheck=_interopRequireDefault(require("./builder/NodeTriggerActionIntentCheck")),_NodeTriggerActionConditions=_interopRequireDefault(require("./builder/NodeTriggerActionConditions")),_NodeTriggerActionMatchActions=_interopRequireDefault(require("./builder/NodeTriggerActionMatchActions")),_NodeTriggerActionEventType=_interopRequireDefault(require("./builder/NodeTriggerActionEventType")),_NodeTriggerActionRepeatRestrict=_interopRequireDefault(require("./builder/NodeTriggerActionRepeatRestrict")),_NodeTriggerActionExecuteJS=_interopRequireDefault(require("./builder/NodeTriggerActionExecuteJS")),_NodeTriggerActionRestAPI=_interopRequireDefault(require("./builder/NodeTriggerActionRestAPI")),_NodeTriggerActionTbody=_interopRequireDefault(require("./builder/NodeTriggerActionTbody")),_NodeTriggerActionTextConditional=_interopRequireDefault(require("./builder/NodeTriggerActionTextConditional")),_NodeTriggerActionAlertIcon=_interopRequireDefault(require("./builder/NodeTriggerActionAlertIcon")),_NodeTriggerActionMail=_interopRequireDefault(require("./builder/NodeTriggerActionMail")),_NodeTriggerActionLogAction=_interopRequireDefault(require("./builder/NodeTriggerActionLogAction"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{currenttrigger:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerBuilder,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerBuilder);function NodeTriggerBuilder(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerBuilder),(_this=_super.call(this,props)).state={dataChanged:!1,value:"",viewCode:!1,viewUseCases:!1,compressCode:!1},_this.handleChange=_this.handleChange.bind(_assertThisInitialized(_this)),_this.handleTypeChange=_this.handleTypeChange.bind(_assertThisInitialized(_this)),_this.handleContentChange=_this.handleContentChange.bind(_assertThisInitialized(_this)),_this.addResponse=_this.addResponse.bind(_assertThisInitialized(_this)),_this.saveResponse=_this.saveResponse.bind(_assertThisInitialized(_this)),_this.cancelChanges=_this.cancelChanges.bind(_assertThisInitialized(_this)),_this.addQuickReply=_this.addQuickReply.bind(_assertThisInitialized(_this)),_this.removeQuickReply=_this.removeQuickReply.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.addSubelement=_this.addSubelement.bind(_assertThisInitialized(_this)),_this.deleteSubelement=_this.deleteSubelement.bind(_assertThisInitialized(_this)),_this.moveUpSubelement=_this.moveUpSubelement.bind(_assertThisInitialized(_this)),_this.moveDownSubelement=_this.moveDownSubelement.bind(_assertThisInitialized(_this)),_this.viewCode=_this.viewCode.bind(_assertThisInitialized(_this)),_this.viewUseCases=_this.viewUseCases.bind(_assertThisInitialized(_this)),_this.navigateToTrigger=_this.navigateToTrigger.bind(_assertThisInitialized(_this)),_this.upField=_this.upField.bind(_assertThisInitialized(_this)),_this.downField=_this.downField.bind(_assertThisInitialized(_this)),_this.props.dispatch((0,_nodeGroupTriggerActions.initBot)(_this.props.botId)),_this}return Constructor=NodeTriggerBuilder,(protoProps=[{key:"handleChange",value:function(e){this.setState({dataChanged:!0});var name=e.target.value;this.props.dispatch((0,_nodeGroupTriggerActions.updateTriggerName)(this.props.currenttrigger.get("currenttrigger").set("name",name)))}},{key:"saveResponse",value:function(){this.setState({dataChanged:!1}),this.props.dispatch((0,_nodeGroupTriggerActions.saveTrigger)(this.props.currenttrigger.get("currenttrigger")))}},{key:"cancelChanges",value:function(){this.props.dispatch({type:"CANCEL_TRIGGER",payload:this.props.currenttrigger.get("currenttrigger")})}},{key:"handleTypeChange",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch((0,_nodeGroupTriggerActions.updateTriggerType)(obj))}},{key:"handleContentChange",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"HANDLE_CONTENT_CHANGE",payload:obj})}},{key:"addResponse",value:function(){this.setState({dataChanged:!0}),this.props.dispatch({type:"ADD_TRIGGER_RESPONSE"})}},{key:"addQuickReply",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"HANDLE_ADD_QUICK_REPLY",payload:obj})}},{key:"removeQuickReply",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"HANDLE_ADD_QUICK_REPLY_REMOVE",payload:obj})}},{key:"removeAction",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"REMOVE_TRIGGER_RESPONSE",payload:obj})}},{key:"addSubelement",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"ADD_SUBELEMENT",payload:obj})}},{key:"deleteSubelement",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"REMOVE_SUBELEMENT",payload:obj})}},{key:"moveUpSubelement",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"MOVE_UP_SUBELEMENT",payload:obj})}},{key:"moveDownSubelement",value:function(obj){this.setState({dataChanged:!0}),this.props.dispatch({type:"MOVE_DOWN_SUBELEMENT",payload:obj})}},{key:"viewCode",value:function(){this.setState({viewCode:!this.state.viewCode})}},{key:"viewUseCases",value:function(){this.setState({viewUseCases:!this.state.viewUseCases}),0==this.state.viewUseCases&&this.props.dispatch((0,_nodeGroupTriggerActions.loadUseCases)(this.props.currenttrigger.get("currenttrigger")))}},{key:"upField",value:function(fieldIndex){this.setState({dataChanged:!0}),this.props.dispatch({type:"MOVE_UP",payload:{index:fieldIndex}})}},{key:"downField",value:function(fieldIndex){this.setState({dataChanged:!0}),this.props.dispatch({type:"MOVE_DOWN",payload:{index:fieldIndex}})}},{key:"navigateToTrigger",value:function(obj){this.setState({viewUseCases:!1}),this.props.dispatch((0,_nodeGroupTriggerActions.fetchNodeGroupTriggerAction)(obj.get("id")))}},{key:"render",value:function(){var _this2=this,actions=[];if(this.props.currenttrigger.get("currenttrigger").has("actions")){var totalTriggers=this.props.currenttrigger.get("currenttrigger").get("actions").size;actions=this.props.currenttrigger.get("currenttrigger").get("actions").map((function(action,index){var key=index+"-"+_this2.props.currenttrigger.get("currenttrigger").get("id")+"-"+action.get("_id");return"text"==action.get("type")?_react.default.createElement(_NodeTriggerActionText.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,moveDownSubelement:_this2.moveDownSubelement,moveUpSubelement:_this2.moveUpSubelement,addSubelement:_this2.addSubelement,deleteSubelement:_this2.deleteSubelement,key:key,id:index,removeAction:_this2.removeAction,removeQuickReply:_this2.removeQuickReply,addQuickReply:_this2.addQuickReply,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action}):"list"==action.get("type")?_react.default.createElement(_NodeTriggerActionList.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,moveDownSubelement:_this2.moveDownSubelement,moveUpSubelement:_this2.moveUpSubelement,addSubelement:_this2.addSubelement,removeQuickReply:_this2.removeQuickReply,addQuickReply:_this2.addQuickReply,deleteSubelement:_this2.deleteSubelement,key:key,id:index,removeAction:_this2.removeAction,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action}):"generic"==action.get("type")?_react.default.createElement(_NodeTriggerActionGeneric.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,moveDownSubelement:_this2.moveDownSubelement,moveUpSubelement:_this2.moveUpSubelement,addSubelement:_this2.addSubelement,removeQuickReply:_this2.removeQuickReply,addQuickReply:_this2.addQuickReply,deleteSubelement:_this2.deleteSubelement,key:key,id:index,removeAction:_this2.removeAction,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action}):"collectable"==action.get("type")?_react.default.createElement(_NodeTriggerActionCollectable.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,moveDownSubelement:_this2.moveDownSubelement,moveUpSubelement:_this2.moveUpSubelement,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement,key:key,id:index,removeAction:_this2.removeAction,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action}):"buttons"==action.get("type")?_react.default.createElement(_NodeTriggerActionButtons.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,moveDownSubelement:_this2.moveDownSubelement,moveUpSubelement:_this2.moveUpSubelement,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement,key:key,id:index,removeAction:_this2.removeAction,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action}):"command"==action.get("type")?_react.default.createElement(_NodeTriggerActionCommand.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"predefined"==action.get("type")?_react.default.createElement(_NodeTriggerActionPredefined.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"typing"==action.get("type")?_react.default.createElement(_NodeTriggerActionTyping.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"progress"==action.get("type")?_react.default.createElement(_NodeTriggerActionProgress.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"video"==action.get("type")?_react.default.createElement(_NodeTriggerActionVideo.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"attribute"==action.get("type")?_react.default.createElement(_NodeTriggerActionAttribute.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"actions"==action.get("type")?_react.default.createElement(_NodeTriggerActionActions.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"intent"==action.get("type")?_react.default.createElement(_NodeTriggerActionIntent.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,moveDownSubelement:_this2.moveDownSubelement,moveUpSubelement:_this2.moveUpSubelement,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"intentcheck"==action.get("type")?_react.default.createElement(_NodeTriggerActionIntentCheck.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"conditions"==action.get("type")?_react.default.createElement(_NodeTriggerActionConditions.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"match_actions"==action.get("type")?_react.default.createElement(_NodeTriggerActionMatchActions.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction}):"event_type"==action.get("type")?_react.default.createElement(_NodeTriggerActionEventType.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"repeat_restrict"==action.get("type")?_react.default.createElement(_NodeTriggerActionRepeatRestrict.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"execute_js"==action.get("type")?_react.default.createElement(_NodeTriggerActionExecuteJS.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"tbody"==action.get("type")?_react.default.createElement(_NodeTriggerActionTbody.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"restapi"==action.get("type")?_react.default.createElement(_NodeTriggerActionRestAPI.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"text_conditional"==action.get("type")?_react.default.createElement(_NodeTriggerActionTextConditional.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"alert_icon"==action.get("type")?_react.default.createElement(_NodeTriggerActionAlertIcon.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"mail"==action.get("type")?_react.default.createElement(_NodeTriggerActionMail.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):"laction"==action.get("type")?_react.default.createElement(_NodeTriggerActionLogAction.default,{upField:_this2.upField,downField:_this2.downField,isFirst:0==index,isLast:index+1==totalTriggers,key:key,id:index,onChangeContent:_this2.handleContentChange,onChangeType:_this2.handleTypeChange,action:action,removeAction:_this2.removeAction,deleteSubelement:_this2.deleteSubelement,addSubelement:_this2.addSubelement}):void 0}))}var usecases=[];return this.props.currenttrigger.get("currenttrigger").has("use_cases")&&(usecases=this.props.currenttrigger.get("currenttrigger").get("use_cases").map((function(use_case,index){return _react.default.createElement("button",{onClick:function(e){return _this2.navigateToTrigger(use_case)},className:"btn btn-secondary btn-xs m-1"},use_case.get("name"))}))),this.props.currenttrigger.hasIn(["currenttrigger","name"])?_react.default.createElement("div",null,_react.default.createElement("input",{className:"form-control gbot-group-name",value:this.props.currenttrigger.getIn(["currenttrigger","name"]),onChange:this.handleChange}),_react.default.createElement("hr",null),actions,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("div",{className:"btn-group",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{className:"btn btn-info btn-sm",onClick:this.addResponse},"Add response"),_react.default.createElement("button",{className:"btn btn-info btn-sm",onClick:this.viewCode},_react.default.createElement("i",{className:"material-icons"},"code"),1==this.state.viewCode?"Hide code":"Show code"),_react.default.createElement("button",{className:"btn btn-info btn-sm",onClick:this.viewUseCases},_react.default.createElement("i",{className:"material-icons"},"info"),1==this.state.viewUseCases?"Hide use cases":"Show use cases"))),1==this.state.viewCode?_react.default.createElement("div",{className:"form-group"},_react.default.createElement("div",{className:"float-right"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",value:"on",onChange:function(e){return _this2.setState({compressCode:!_this2.state.compressCode})},defaultChecked:this.state.compressCode}),"Compressed version")),_react.default.createElement("label",null,"JSON body you can use for REST API"),_react.default.createElement("textarea",{readOnly:"readOnly",rows:10,className:"form-control fs11",value:JSON.stringify(this.props.currenttrigger.getIn(["currenttrigger","actions"]).toJSON(),null,0==this.state.compressCode?4:0)}),_react.default.createElement("p",null,_react.default.createElement("small",null,_react.default.createElement("i",null,'"_id" can be ignored')))):"",1==this.state.viewUseCases?_react.default.createElement("div",{className:"form-group"},this.props.currenttrigger.get("currenttrigger").has("use_cases")&&0!=this.props.currenttrigger.getIn(["currenttrigger","use_cases"]).size?"":_react.default.createElement("p",null,"No use cases were found"),usecases):"",_react.default.createElement("hr",null),_react.default.createElement("div",{className:"btn-group",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{className:"btn btn-success btn-sm",disabled:!this.state.dataChanged,onClick:this.saveResponse},"Save"),_react.default.createElement("button",{className:"btn btn-success btn-sm",onClick:this.cancelChanges},"Cancel"))):_react.default.createElement("div",{className:"alert alert-warning",role:"alert"},"Choose a trigger")}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerBuilder}(_react.Component))||_class;exports.default=_default},{"../actions/nodeGroupTriggerActions":3,"./builder/NodeTriggerActionActions":11,"./builder/NodeTriggerActionAlertIcon":12,"./builder/NodeTriggerActionAttribute":13,"./builder/NodeTriggerActionButtons":14,"./builder/NodeTriggerActionCollectable":15,"./builder/NodeTriggerActionCommand":16,"./builder/NodeTriggerActionConditions":17,"./builder/NodeTriggerActionEventType":18,"./builder/NodeTriggerActionExecuteJS":19,"./builder/NodeTriggerActionGeneric":20,"./builder/NodeTriggerActionIntent":21,"./builder/NodeTriggerActionIntentCheck":22,"./builder/NodeTriggerActionList":23,"./builder/NodeTriggerActionLogAction":24,"./builder/NodeTriggerActionMail":25,"./builder/NodeTriggerActionMatchActions":26,"./builder/NodeTriggerActionPredefined":27,"./builder/NodeTriggerActionProgress":28,"./builder/NodeTriggerActionRepeatRestrict":31,"./builder/NodeTriggerActionRestAPI":32,"./builder/NodeTriggerActionTbody":33,"./builder/NodeTriggerActionText":34,"./builder/NodeTriggerActionTextConditional":35,"./builder/NodeTriggerActionTyping":37,"./builder/NodeTriggerActionVideo":38,react:146,"react-redux":131}],10:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_reactRedux=require("react-redux"),_NodeTriggerActionTextPreview=(require("../actions/nodeGroupTriggerActions"),_interopRequireDefault(require("./preview/NodeTriggerActionTextPreview"))),_NodeTriggerActionListPreview=_interopRequireDefault(require("./preview/NodeTriggerActionListPreview")),_NodeTriggerActionButtonsPreview=_interopRequireDefault(require("./preview/NodeTriggerActionButtonsPreview")),_NodeTriggerActionGenericPreview=_interopRequireDefault(require("./preview/NodeTriggerActionGenericPreview")),_NodeTriggerActionPredefinedPreview=_interopRequireDefault(require("./preview/NodeTriggerActionPredefinedPreview")),_NodeTriggerActionTypingPreview=_interopRequireDefault(require("./preview/NodeTriggerActionTypingPreview")),_NodeTriggerActionVideoPreview=_interopRequireDefault(require("./preview/NodeTriggerActionVideoPreview"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{currenttrigger:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerBuilderPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerBuilderPreview);function NodeTriggerBuilderPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerBuilderPreview),_super.call(this,props)}return Constructor=NodeTriggerBuilderPreview,(protoProps=[{key:"render",value:function(){var _this=this,actions=[];return this.props.currenttrigger.get("currenttrigger").has("actions")&&(actions=this.props.currenttrigger.get("currenttrigger").get("actions").map((function(action,index){return"text"==action.get("type")?_react.default.createElement(_NodeTriggerActionTextPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):"list"==action.get("type")?_react.default.createElement(_NodeTriggerActionListPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):"buttons"==action.get("type")?_react.default.createElement(_NodeTriggerActionButtonsPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):"generic"==action.get("type")?_react.default.createElement(_NodeTriggerActionGenericPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):"predefined"==action.get("type")?_react.default.createElement(_NodeTriggerActionPredefinedPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):"typing"==action.get("type")?_react.default.createElement(_NodeTriggerActionTypingPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):"video"==action.get("type")?_react.default.createElement(_NodeTriggerActionVideoPreview.default,{key:index+"-"+_this.props.currenttrigger.get("currenttrigger").get("id"),id:index,action:action}):void 0}))),_react.default.createElement("div",null,actions)}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerBuilderPreview}(_react.Component))||_class;exports.default=_default},{"../actions/nodeGroupTriggerActions":3,"./preview/NodeTriggerActionButtonsPreview":50,"./preview/NodeTriggerActionGenericPreview":51,"./preview/NodeTriggerActionListPreview":52,"./preview/NodeTriggerActionPredefinedPreview":53,"./preview/NodeTriggerActionTextPreview":55,"./preview/NodeTriggerActionTypingPreview":56,"./preview/NodeTriggerActionVideoPreview":57,react:146,"react-redux":131}],11:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionActions,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionActions);function NodeTriggerActionActions(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionActions),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.addAnswerVariation=_this.addAnswerVariation.bind(_assertThisInitialized(_this)),_this.textMessageRef=_react.default.createRef(),_this}return Constructor=NodeTriggerActionActions,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"addAnswerVariation",value:function(){var newVal=this.props.action.getIn(["content","success_message"])+" |||\n";this.props.onChangeContent({id:this.props.id,path:["content","success_message"],value:newVal}),this.textMessageRef.current.focus(),this.textMessageRef.current.value=newVal}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Message before dispatching event"),_react.default.createElement("a",{title:"Add answer variation",className:"float-right",onClick:this.addAnswerVariation},_react.default.createElement("i",{className:"material-icons mr-0"},"question_answer")),_react.default.createElement("textarea",{rows:3,className:"form-control form-control-sm",ref:this.textMessageRef,defaultValue:this.props.action.getIn(["content","success_message"]),onChange:function(e){return _this2.onchangeAttr({path:["success_message"],value:e.target.value})}})),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Event identifier"),_react.default.createElement("input",{type:"text",placeholder:"Event name",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["event"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",null,_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["event_background"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","event_background"])})," Event is processed on next visitor message.")),_react.default.createElement("div",null,_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["event_background_inst"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","event_background_inst"])})," Event is processed instantly.")))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["event_default"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","event_default"])})," Check for default matching text first.")),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Check for alternative scenario first executing this trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_match"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_match"])})),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-8"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"For success visitor message has to contain one of these words"),_react.default.createElement("input",{type:"text",placeholder:"ok, yes, great, go ahead",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["event_validate"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_validate"])}))),_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Typos per word?"),_react.default.createElement("input",{type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["event_typos"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_typos"])}))),_react.default.createElement("div",{className:"col-8"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Bot not any of"),_react.default.createElement("input",{type:"text",placeholder:"no, not",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["event_validate_exc"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_validate_exc"])}))),_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Typos per word?"),_react.default.createElement("input",{type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["event_typos_exc"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_typos_exc"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Extract arguments from visitor message"),_react.default.createElement("textarea",{className:"form-control form-control-sm",placeholder:"Match rule ==> Matched item number to use ==> identifier",onChange:function(e){return _this2.onchangeAttr({path:["event_arg_match"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_arg_match"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Static arguments"),_react.default.createElement("textarea",{className:"form-control form-control-sm",placeholder:"Argument value ==> identifier",onChange:function(e){return _this2.onchangeAttr({path:["event_arg_static"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_arg_static"])})))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","check_default"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","check_default"])})," On failure check for default match trigger first.")),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger on success"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_pattern"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_pattern"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger on fail"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_cancel"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_cancel"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger on failed format"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_format"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_format"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Alternative answer match"),_react.default.createElement("input",{type:"text",title:"no, nop, not ok, ne",placeholder:"no, nop, not ok, ne",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["event_in_validate"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event_in_validate"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_alternative"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_alternative"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionActions}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,react:146}],12:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionAlertIcon,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionAlertIcon);function NodeTriggerActionAlertIcon(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionAlertIcon),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionAlertIcon,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Icon identifier. ",_react.default.createElement("a",{target:"_blank",href:"https://material.io/resources/icons/?style=baseline"},_react.default.createElement("span",{className:"material-icons"},"open_in_new")," Material Icons")),_react.default.createElement("input",{type:"text",placeholder:"Icon identifier - new_releases",onChange:function(e){return _this2.onchangeAttr({path:["alert_icon"],value:e.target.value})},defaultValue:this.props.action.hasIn(["content","alert_icon"])?this.props.action.getIn(["content","alert_icon"]):"new_releases",className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Color E.g green, #509646"),_react.default.createElement("input",{type:"text",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","aicon_color"],value:e.target.value})},defaultValue:this.props.action.hasIn(["content","attr_options","aicon_color"])?this.props.action.getIn(["content","attr_options","aicon_color"]):"",className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Title. If you do not enter title we will show icon text."),_react.default.createElement("input",{type:"text",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","aicon_title"],value:e.target.value})},defaultValue:this.props.action.hasIn(["content","attr_options","aicon_title"])?this.props.action.getIn(["content","attr_options","aicon_title"]):"",className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","show_alert"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","show_alert"])})," Show alert. We will show alert if this icon is added to the chat."))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","remove_icon"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","remove_icon"])})," Remove icon if it exists.")))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionAlertIcon}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],13:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionAttribute,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionAttribute);function NodeTriggerActionAttribute(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionAttribute),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.showHelp=_this.showHelp.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionAttribute,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"showHelp",value:function(e){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"genericbot/help/"+e})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Attribute identifier ",_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("attribute_identifier")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help"))),_react.default.createElement("input",{type:"text",placeholder:"Attribute identifier",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","identifier"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","attr_options","identifier"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Attribute name ",_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("attribute_name")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help"))),_react.default.createElement("input",{type:"text",placeholder:"Attribute name",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","name"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","attr_options","name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Preg match rule. ",_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("preg_match")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help"))),_react.default.createElement("input",{type:"text",placeholder:"Attribute name",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["preg_match"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","preg_match"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Custom event to validate"),_react.default.createElement("input",{type:"text",placeholder:"Event name",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["event"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","event"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","cancel_button_enabled"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","cancel_button_enabled"])}),"Cancel button enabled on failed validation"))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Cancel button text"),_react.default.createElement("input",{type:"text",placeholder:"Cancel",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["cancel_button"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","cancel_button"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Intro message"),_react.default.createElement("textarea",{className:"form-control",defaultValue:this.props.action.getIn(["content","intro_message"]),onChange:function(e){return _this2.onchangeAttr({path:["intro_message"],value:e.target.value})}}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger on validation failure"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_fail"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_fail"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Validation error message"),_react.default.createElement("textarea",{className:"form-control",defaultValue:this.props.action.getIn(["content","validation_error"]),onChange:function(e){return _this2.onchangeAttr({path:["validation_error"],value:e.target.value})}}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger on success"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_pattern"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_pattern"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Success message"),_react.default.createElement("textarea",{className:"form-control",defaultValue:this.props.action.getIn(["content","success_message"]),onChange:function(e){return _this2.onchangeAttr({path:["success_message"],value:e.target.value})}}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger on cancelation, overrides message on cancelation"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","collection_callback_cancel"],value:e})},payload:this.props.action.getIn(["content","attr_options","collection_callback_cancel"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Message on cancelation"),_react.default.createElement("textarea",{className:"form-control",defaultValue:this.props.action.getIn(["content","cancel_message"]),onChange:function(e){return _this2.onchangeAttr({path:["cancel_message"],value:e.target.value})}}))))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["soft_event"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","soft_event"])})," Soft event. If this event is found while cliking another button - we will automatically terminate it."))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionAttribute}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,react:146}],14:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeActionButton=_interopRequireDefault(require("./buttons/NodeActionButton")),_shortid=(_interopRequireDefault(require("./NodeTriggerPayloadList")),_interopRequireDefault(require("shortid")));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionButtons,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionButtons);function NodeTriggerActionButtons(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionButtons),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onMoveUpField=_this.onMoveUpField.bind(_assertThisInitialized(_this)),_this.onMoveDownField=_this.onMoveDownField.bind(_assertThisInitialized(_this)),_this.onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionButtons,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"addField",value:function(){this.props.addSubelement({id:this.props.id,path:["content","buttons"],default:{_id:_shortid.default.generate(),type:"button",content:{name:"",payload:""}}})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","buttons",e.id].concat(e.path),value:e.value})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","buttons",fieldIndex]})}},{key:"onMoveUpField",value:function(fieldIndex){this.props.moveUpSubelement({id:this.props.id,index:fieldIndex,path:["content","buttons"]})}},{key:"onMoveDownField",value:function(fieldIndex){this.props.moveDownSubelement({id:this.props.id,index:fieldIndex,path:["content","buttons"]})}},{key:"onChangeMainAttr",value:function(field,e){this.props.onChangeContent({id:this.props.id,path:["content","buttons_options",field],value:e})}},{key:"render",value:function(){var _this2=this,button_list=[];return this.props.action.hasIn(["content","buttons"])&&(button_list=this.props.action.getIn(["content","buttons"]).map((function(field,index){return _react.default.createElement(_NodeActionButton.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","buttons"]).size,key:field.get("_id"),button:field,onMoveDownField:_this2.onMoveDownField,onMoveUpField:_this2.onMoveUpField,onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",null,_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onChangeMainAttr("hide_text_area",e.target.checked)},defaultChecked:this.props.action.getIn(["content","buttons_options","hide_text_area"])})," Hide text area on response.")," ",_react.default.createElement("i",{className:"material-icons",title:"Textarea to enter user message will be disabled. Make sure you include buttons for user to click."},"info")),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Default message"),_react.default.createElement("input",{type:"text",className:"form-control",onChange:function(e){return _this2.onChangeMainAttr("message",e.target.value)},defaultValue:this.props.action.getIn(["content","buttons_options","message"])})))),_react.default.createElement("hr",null),_react.default.createElement("div",{className:"bot-buttons"},button_list),_react.default.createElement("button",{className:"btn btn-info btn-sm",onClick:this.addField.bind(this)},"Add button"),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionButtons}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerPayloadList":42,"./buttons/NodeActionButton":43,react:146,shortid:158}],15:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeCollectableField=_interopRequireDefault(require("./collectable/NodeCollectableField")),_shortid=(_interopRequireDefault(require("./NodeTriggerPayloadList")),_interopRequireDefault(require("shortid"))),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionCollectable,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionCollectable);function NodeTriggerActionCollectable(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionCollectable),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onMoveUpField=_this.onMoveUpField.bind(_assertThisInitialized(_this)),_this.onMoveDownField=_this.onMoveDownField.bind(_assertThisInitialized(_this)),_this.payloadChange=_this.payloadChange.bind(_assertThisInitialized(_this)),_this.onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionCollectable,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"addField",value:function(){this.props.addSubelement({id:this.props.id,path:["content","collectable_fields"],default:{_id:_shortid.default.generate(),type:"text",content:{message:"",name:"",validation:"",field:""}}})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","collectable_fields",e.id].concat(e.path),value:e.value})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","collectable_fields",fieldIndex]})}},{key:"onMoveUpField",value:function(fieldIndex){this.props.moveUpSubelement({id:this.props.id,index:fieldIndex,path:["content","collectable_fields"]})}},{key:"onMoveDownField",value:function(fieldIndex){this.props.moveDownSubelement({id:this.props.id,index:fieldIndex,path:["content","collectable_fields"]})}},{key:"payloadChange",value:function(e){console.log(e.target.value)}},{key:"onChangeMainAttr",value:function(field,e){this.props.onChangeContent({id:this.props.id,path:["content","collectable_options",field],value:e})}},{key:"render",value:function(){var _this2=this,collectable_fields=[];return this.props.action.hasIn(["content","collectable_fields"])&&(collectable_fields=this.props.action.getIn(["content","collectable_fields"]).map((function(field,index){return _react.default.createElement(_NodeCollectableField.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","collectable_fields"]).size,key:field.get("_id"),field:field,onMoveDownField:_this2.onMoveDownField,onMoveUpField:_this2.onMoveUpField,onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Collection identifier"),_react.default.createElement("input",{type:"text",className:"form-control",onChange:function(e){return _this2.onChangeMainAttr("identifier_collection",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","identifier_collection"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onChangeMainAttr("show_summary",e.target.checked)},defaultChecked:this.props.action.getIn(["content","collectable_options","show_summary"])}),"Ask user to confirm collected information")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onChangeMainAttr("show_summary_checkbox",e.target.checked)},defaultChecked:this.props.action.getIn(["content","collectable_options","show_summary_checkbox"])}),"Ask user to confirm information by checking checkbox"))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Checkbox value"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("show_summary_checkbox_name",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","show_summary_checkbox_name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Confirm button value"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("show_summary_confirm_name",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","show_summary_confirm_name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Cancel button value"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("show_summary_cancel_name",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","show_summary_cancel_name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Custom summary formation event"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("show_summary_callback",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","show_summary_callback"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Dispatch this event then all steps are successfuly completed"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("collection_callback",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","collection_callback"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Question to confirm collected information"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("collection_confirm",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","collection_confirm"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Message if user types instead of clicking confirm button"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("collection_confirm_missing",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","collection_confirm_missing"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Argument"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("collection_argument",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","collection_argument"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Workflow from begining expires in n minutes, 0 for unlimited"),_react.default.createElement("input",{type:"number",className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("expires_in",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","expires_in"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("p",null,"Then process is complete send this message to user or execute trigger"),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Confirmation message"),_react.default.createElement("textarea",{className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("confirmation_message",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","confirmation_message"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onChangeMainAttr("collection_callback_pattern",e)},payload:this.props.action.getIn(["content","collectable_options","collection_callback_pattern"])})))),_react.default.createElement("p",null,"Then process is canceled send this message to user or execute trigger"),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Cancel message"),_react.default.createElement("textarea",{className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("cancel_message",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","cancel_message"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onChangeMainAttr("collection_cancel_callback_pattern",e)},payload:this.props.action.getIn(["content","collectable_options","collection_cancel_callback_pattern"])})))),_react.default.createElement("p",null,"Then process is expired send this message to user or execute trigger"),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Expire message"),_react.default.createElement("textarea",{className:"form-control",onChange:function(e){return _this2.onChangeMainAttr("expire_message",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","expire_message"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onChangeMainAttr("collection_expire_callback_pattern",e)},payload:this.props.action.getIn(["content","collectable_options","collection_expire_callback_pattern"])}))))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Edit collected information image URL"),_react.default.createElement("input",{type:"text",className:"form-control",onChange:function(e){return _this2.onChangeMainAttr("edit_image_url",e.target.value)},defaultValue:this.props.action.getIn(["content","collectable_options","edit_image_url"])})))))),_react.default.createElement("hr",null),collectable_fields,_react.default.createElement("a",{className:"btn btn-info btn-sm",onClick:this.addField.bind(this)},"Add field"),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionCollectable}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,"./NodeTriggerPayloadList":42,"./collectable/NodeCollectableField":44,react:146,shortid:158}],16:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionCommand,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionCommand);function NodeTriggerActionCommand(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionCommand),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionCommand,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Command"),_react.default.createElement("select",{className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["command"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","command"])},_react.default.createElement("option",{value:""},"Select action"),_react.default.createElement("optgroup",{label:"Chat related"},_react.default.createElement("option",{value:"stopchat"},"Stop chat and transfer to human"),_react.default.createElement("option",{value:"transfertobot"},"Transfer chat to bot"),_react.default.createElement("option",{value:"closechat"},"Close chat"),_react.default.createElement("option",{value:"chatvariable"},"Set chat variable [not visible by operator]"),_react.default.createElement("option",{value:"chatattribute"},"Set chat additional attribute [visible by operator]"),_react.default.createElement("option",{value:"dispatchevent"},"Dispatch Event"),_react.default.createElement("option",{value:"setchatattribute"},"Update main chat attribute"),_react.default.createElement("option",{value:"setdepartment"},"Change department"),_react.default.createElement("option",{value:"setsubject"},"Set subject"),_react.default.createElement("option",{value:"setliveattr"},"Set widget live attribute"),_react.default.createElement("option",{value:"removeprocess"},"Remove any previous process")),_react.default.createElement("optgroup",{label:"Chat messages aggregation"},_react.default.createElement("option",{value:"messageaggregation"},"Messages aggregation")),_react.default.createElement("optgroup",{label:"Visitor message related"},_react.default.createElement("option",{value:"messageattribute"},"Update main message attribute"),_react.default.createElement("option",{value:"metamsg"},"Set meta_msg attribute")))))),"closechat"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["close_widget"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","close_widget"])})," Close widget also.")),"stopchat"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["payload_ignore_status"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","payload_ignore_status"])})," Ignore department status and always transfer to operator."),_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["payload_ignore_dep_hours"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","payload_ignore_dep_hours"])})," Ignore department online hours. This will force chat to be transfered to operator only if there is logged operators."),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Search only for operators with this field"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"email",onChange:function(e){return _this2.onchangeAttr({path:["payload_attr"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_attr"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"equal to"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"",onChange:function(e){return _this2.onchangeAttr({path:["payload_val"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_val"])})))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If there is no online operators send this trigger to user"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["payload"],value:e})},payload:this.props.action.getIn(["content","payload"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If there is online operators send this trigger to user"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["payload_online"],value:e})},payload:this.props.action.getIn(["content","payload_online"])}))),"transfertobot"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"What trigger to execute once chat is transfered to bot"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["payload"],value:e})},payload:this.props.action.getIn(["content","payload"])}))),"metamsg"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Set meta_msg variables in JSON format. It will merge with existing one."),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:'{"bot_touched":true}',onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])}))),"chatvariable"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["update_if_empty"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","update_if_empty"])})," Update only if empty")),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Set chat variables in JSON format."),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:'{"bot_touched":true}',onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])}))),"setliveattr"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Live attribute path"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"['chat_ui','survey_id']",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["remove_subject"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","remove_subject"])})," Remove attribute if it exists.")),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["remove_if_empty"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","remove_if_empty"])}),' Remove attribute if it\'s value is empty (0,"",null).')),!this.props.action.getIn(["content","remove_subject"])&&_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Live attribute value in JSON format."),_react.default.createElement("textarea",{className:"form-control form-control-sm",type:"text",placeholder:"",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg"])}))),"chatattribute"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["update_if_empty"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","update_if_empty"])})," Update only if empty")),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Set chat attribute in JSON format."),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:'[{"value":"Attribute value or {content_1}","identifier":"attribute_name","key":"Attribute Name"}]',onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])}))),"setsubject"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Set subject for a chat. Enter subject ID from the subject list."),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"Please enter Subject ID.",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["remove_subject"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","remove_subject"])})," Remove subject. Instead of adding we will remove subject."))),"messageattribute"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Main message attribute (msg,name_support,user_id,chat_id,time)"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"remarks",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Message attribute value."),_react.default.createElement("textarea",{className:"form-control form-control-sm",type:"text",placeholder:"",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg"])}))),"messageaggregation"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Chat variable as Group field"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])}))),"count_filter"!=this.props.action.getIn(["content","payload_arg_type"])&&"count"!=this.props.action.getIn(["content","payload_arg_type"])&&"ratio"!=this.props.action.getIn(["content","payload_arg_type"])&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Calculated value from group method"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",onChange:function(e){return _this2.onchangeAttr({path:["payload_cond_field"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_cond_field"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Group method"),_react.default.createElement("select",{className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg_type"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg_type"])},_react.default.createElement("option",{value:""},"Select group logic"),_react.default.createElement("optgroup",{label:"Grouping"},_react.default.createElement("option",{value:"avg"},"AVG"),_react.default.createElement("option",{value:"sum"},"SUM"),_react.default.createElement("option",{value:"sum_avg"},"SUM as comparator and AVG as value"),_react.default.createElement("option",{value:"max"},"MAX"),_react.default.createElement("option",{value:"min"},"MIN"),_react.default.createElement("option",{value:"count_max"},"COUNT MAX (maximum number of grouped record)")),_react.default.createElement("optgroup",{label:"Counting"},_react.default.createElement("option",{value:"count"},"COUNT (total number of messages)"),_react.default.createElement("option",{value:"count_filter"},"COUNT FILTER (filtered by group value field)"),_react.default.createElement("option",{value:"ratio"},"RATIO in comparison with all messages"))))),"count"!=this.props.action.getIn(["content","payload_arg_type"])&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Group field (sentiment)"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg_field"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg_field"])}))),"count"!=this.props.action.getIn(["content","payload_arg_type"])&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},("count_filter"==this.props.action.getIn(["content","payload_arg_type"])||"ratio"==this.props.action.getIn(["content","payload_arg_type"]))&&_react.default.createElement("label",null,"Filter value"),"count_filter"!=this.props.action.getIn(["content","payload_arg_type"])&&"ratio"!=this.props.action.getIn(["content","payload_arg_type"])&&_react.default.createElement("label",null,"Group value field. Eg (score field of the sentiment)"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg_val"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg_val"])}))),-1!==["ratio","avg","sum_avg","max","min","count_max"].indexOf(this.props.action.getIn(["content","payload_arg_type"]))&&_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Use only if value is one of. If not defined all possible values will be used."),_react.default.createElement("input",{className:"form-control form-control-sm",placeholder:"negative,positive",type:"text",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg_val_sum"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg_val_sum"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,"Messages to include"),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["msg_type_all"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","msg_type_all"])})," All messages")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["msg_type_vis"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","msg_type_vis"])})," All visitor messages")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["msg_type_vis_bot"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","msg_type_vis_bot"])})," Visitor messages with a bot")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["msg_type_vis_op"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","msg_type_vis_op"])})," Visitor messages with an operator")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["msg_type_op"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","msg_type_op"])})," Operator messages")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["msg_type_bot"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","msg_type_bot"])})," Bot messages")))),_react.default.createElement("label",null,"Number of messages to include"),_react.default.createElement("select",{className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["payload_include_number"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_include_number"])},_react.default.createElement("option",{value:""},"All messages"),_react.default.createElement("option",{value:"f10"},"First 10% of the messages"),_react.default.createElement("option",{value:"f20"},"First 20% of the messages"),_react.default.createElement("option",{value:"f30"},"First 30% of the messages"),_react.default.createElement("option",{value:"f40"},"First 40% of the messages"),_react.default.createElement("option",{value:"f50"},"First 50% of the messages"),_react.default.createElement("option",{value:"f60"},"First 60% of the messages"),_react.default.createElement("option",{value:"f70"},"First 70% of the messages"),_react.default.createElement("option",{value:"f80"},"First 80% of the messages"),_react.default.createElement("option",{value:"f90"},"First 90% of the messages"),_react.default.createElement("option",{value:"l10"},"Last 10% of the messages"),_react.default.createElement("option",{value:"l20"},"Last 20% of the messages"),_react.default.createElement("option",{value:"l30"},"Last 30% of the messages"),_react.default.createElement("option",{value:"l40"},"Last 40% of the messages"),_react.default.createElement("option",{value:"l50"},"Last 50% of the messages"),_react.default.createElement("option",{value:"l60"},"Last 60% of the messages"),_react.default.createElement("option",{value:"l70"},"Last 70% of the messages"),_react.default.createElement("option",{value:"l80"},"Last 80% of the messages"),_react.default.createElement("option",{value:"l90"},"Last 90% of the messages"))))),"setchatattribute"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Chat attribute name (nick,remarks,email,dep_id)."),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"remarks",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["update_if_empty"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","update_if_empty"])})," Update only if empty")),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Chat attribute value."),_react.default.createElement("textarea",{className:"form-control form-control-sm",type:"text",placeholder:"",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg"])}))),"setdepartment"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Enter department ID"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"Department ID",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])}))),"dispatchevent"==this.props.action.getIn(["content","command"])&&_react.default.createElement("div",null,_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Event Name"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",placeholder:"SetSubjectExtension",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Event argument"),_react.default.createElement("textarea",{className:"form-control form-control-sm",type:"text",onChange:function(e){return _this2.onchangeAttr({path:["payload_arg"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload_arg"])}))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionCommand}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,react:146}],17:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList")),_NodeActionConditionItem=_interopRequireDefault(require("./condition/NodeActionConditionItem")),_shortid=_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionConditions,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionConditions);function NodeTriggerActionConditions(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionConditions),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.addCondition=_this.addCondition.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionConditions,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","conditions",e.id].concat(e.path),value:e.value})}},{key:"addCondition",value:function(){this.props.addSubelement({id:this.props.id,path:["content","conditions"],default:{_id:_shortid.default.generate(),type:"condition",content:{field:"",comp:"",val:""}}})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","conditions",fieldIndex]})}},{key:"render",value:function(){var _this2=this,button_list=[];return this.props.action.hasIn(["content","conditions"])&&(button_list=this.props.action.getIn(["content","conditions"]).map((function(field,index){return _react.default.createElement(_NodeActionConditionItem.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","conditions"]).size,key:field.get("_id"),action:field,onMoveDownField:_this2.onMoveDownField,onMoveUpField:_this2.onMoveUpField,onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-right",role:"group"},_react.default.createElement("button",{type:"button",onClick:this.addCondition,className:"btn btn-sm btn-secondary"},_react.default.createElement("i",{className:"material-icons mr-0"},"add")," Add condition")))),button_list,_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If conditions ",_react.default.createElement("b",null,"are")," met execute this trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","callback_match"],value:e})},payload:this.props.action.getIn(["content","attr_options","callback_match"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Schedule this trigger execution"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","callback_reschedule"],value:e})},payload:this.props.action.getIn(["content","attr_options","callback_reschedule"])})))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If conditions ",_react.default.createElement("b",null,"are NOT")," met execute this trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","callback_unmatch"],value:e})},payload:this.props.action.getIn(["content","attr_options","callback_unmatch"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Schedule this trigger execution"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["attr_options","callback_unreschedule"],value:e})},payload:this.props.action.getIn(["content","attr_options","callback_unreschedule"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","continue_all"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","continue_all"])})," If conditions are matched continue executing responses."),_react.default.createElement("p",null,_react.default.createElement("small",null,"By default if conditions are met we execute trigger and stop any futher responses execution."))))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionConditions}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,"./condition/NodeActionConditionItem":45,react:146,shortid:158}],18:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeEventActionTypeItem=_interopRequireDefault(require("./events/NodeEventActionTypeItem")),_shortid=_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionEventType,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionEventType);function NodeTriggerActionEventType(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionEventType),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionEventType,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"addField",value:function(){this.props.addSubelement({id:this.props.id,path:["content","events"],default:{_id:_shortid.default.generate(),type:"button",content:{identifier:"",trigger_id:""}}})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","events",fieldIndex]})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","events",e.id].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this,event_list=[];return this.props.action.hasIn(["content","events"])&&(event_list=this.props.action.getIn(["content","events"]).map((function(field,index){return _react.default.createElement(_NodeEventActionTypeItem.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","events"]).size,key:field.get("_id"),button:field,onMoveDownField:_this2.onMoveDownField,onMoveUpField:_this2.onMoveUpField,onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("hr",null),_react.default.createElement("div",{className:"bot-buttons"},event_list),_react.default.createElement("button",{className:"btn btn-info btn-sm",onClick:this.addField.bind(this)},"Add event"),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionEventType}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./events/NodeEventActionTypeItem":46,react:146,shortid:158}],19:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionExecuteJS,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionExecuteJS);function NodeTriggerActionExecuteJS(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionExecuteJS),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.showHelp=_this.showHelp.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionExecuteJS,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"showHelp",value:function(e){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"genericbot/help/"+e})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("execute_js")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help")),_react.default.createElement("label",null,"Execute JS"),_react.default.createElement("textarea",{rows:3,placeholder:"Write your javascript here!",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Script identifier"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["ext_execute"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","ext_execute"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Arguments for the callback"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",placeholder:"{show:true}",onChange:function(e){return _this2.onchangeAttr({path:["ext_args"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","ext_args"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionExecuteJS}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],20:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeActionListItem=_interopRequireDefault(require("./list/NodeActionListItem")),_shortid=(_interopRequireDefault(require("./NodeTriggerPayloadList")),_interopRequireDefault(require("shortid")));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionGeneric,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionGeneric);function NodeTriggerActionGeneric(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionGeneric),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onMoveUpField=_this.onMoveUpField.bind(_assertThisInitialized(_this)),_this.onMoveDownField=_this.onMoveDownField.bind(_assertThisInitialized(_this)),_this.onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this.addSubelement=_this.addSubelement.bind(_assertThisInitialized(_this)),_this.onDeleteSubField=_this.onDeleteSubField.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionGeneric,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"addField",value:function(){this.props.addSubelement({id:this.props.id,path:["content","list"],default:{_id:_shortid.default.generate(),type:"none",content:{img:"",title:"",subtitle:"",payload:"",subbuttons:[]}}})}},{key:"addSubelement",value:function(e){this.props.addSubelement({id:this.props.id,path:["content","list"].concat(e.path),default:e.default})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","list",e.id].concat(e.path),value:e.value})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","list",fieldIndex]})}},{key:"onDeleteSubField",value:function(e){this.props.deleteSubelement({id:this.props.id,path:["content","list"].concat(e.path)})}},{key:"onMoveUpField",value:function(fieldIndex){this.props.moveUpSubelement({id:this.props.id,index:fieldIndex,path:["content","list"]})}},{key:"onMoveDownField",value:function(fieldIndex){this.props.moveDownSubelement({id:this.props.id,index:fieldIndex,path:["content","list"]})}},{key:"onChangeMainAttr",value:function(field,e){this.props.onChangeContent({id:this.props.id,path:["content","list_options",field],value:e})}},{key:"render",value:function(){var _this2=this,element_list=[];return this.props.action.hasIn(["content","list"])&&(element_list=this.props.action.getIn(["content","list"]).map((function(field,index){return _react.default.createElement(_NodeActionListItem.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","list"]).size,onDeleteSubField:_this2.onDeleteSubField,addSubelement:_this2.addSubelement,key:field.get("_id"),item:field,onMoveDownField:_this2.onMoveDownField,onMoveUpField:_this2.onMoveUpField,onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onChangeMainAttr("hide_text_area",e.target.checked)},defaultChecked:this.props.action.getIn(["content","list_options","hide_text_area"])})," Hide text area on response.")," ",_react.default.createElement("i",{className:"material-icons",title:"Textarea to enter user message will be disabled. Make sure you include buttons for user to click."},"info")),_react.default.createElement("div",{className:"bot-elements"},element_list,_react.default.createElement("div",null,_react.default.createElement("a",{className:"btn btn-info btn-sm",onClick:this.addField.bind(this)},"Add Element"))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionGeneric}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerPayloadList":42,"./list/NodeActionListItem":48,react:146,shortid:158}],21:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeActionIntentItem=(_interopRequireDefault(require("./NodeTriggerList")),_interopRequireDefault(require("./intent/NodeActionIntentItem"))),_shortid=_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionIntent,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionIntent);function NodeTriggerActionIntent(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionIntent),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.addIntent=_this.addIntent.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionIntent,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","intents",e.id].concat(e.path),value:e.value})}},{key:"addIntent",value:function(){this.props.addSubelement({id:this.props.id,path:["content","intents"],default:{_id:_shortid.default.generate(),type:"intent",content:{words:""}}})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","intents",fieldIndex]})}},{key:"render",value:function(){var _this2=this,button_list=[];return this.props.action.hasIn(["content","intents"])&&(button_list=this.props.action.getIn(["content","intents"]).map((function(field,index){return _react.default.createElement(_NodeActionIntentItem.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","intents"]).size,key:field.get("_id"),action:field,onMoveDownField:_this2.onMoveDownField,onMoveUpField:_this2.onMoveUpField,onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})}))),_react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-right",role:"group"},_react.default.createElement("button",{onClick:this.addIntent,className:"btn btn-sm btn-secondary"},_react.default.createElement("i",{className:"material-icons mr-0"},"add")," Add intent detection")))),button_list,_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionIntent}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,"./intent/NodeActionIntentItem":47,react:146,shortid:158}],22:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType"));_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionIntentCheck,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionIntentCheck);function NodeTriggerActionIntentCheck(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionIntentCheck),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionIntentCheck,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("p",null,"Check for pending intended actions. If atleast one pending actions will be found. None of the rest triggers will be executed.")),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionIntentCheck}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146,shortid:158}],23:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeActionListItem=_interopRequireDefault(require("./list/NodeActionListItem")),_NodeTriggerActionQuickReply=(_interopRequireDefault(require("./NodeTriggerPayloadList")),_interopRequireDefault(require("./NodeTriggerActionQuickReply"))),_shortid=_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionList,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionList);function NodeTriggerActionList(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionList),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onMoveUpField=_this.onMoveUpField.bind(_assertThisInitialized(_this)),_this.onMoveDownField=_this.onMoveDownField.bind(_assertThisInitialized(_this)),_this.onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this.addSubelement=_this.addSubelement.bind(_assertThisInitialized(_this)),_this.onDeleteSubField=_this.onDeleteSubField.bind(_assertThisInitialized(_this)),_this.addQuickReply=_this.addQuickReply.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionList,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"addField",value:function(){this.props.addSubelement({id:this.props.id,path:["content","list"],default:{_id:_shortid.default.generate(),type:"none",content:{img:"",title:"",subtitle:"",payload:"",subbuttons:[]}}})}},{key:"addSubelement",value:function(e){this.props.addSubelement({id:this.props.id,path:["content","list"].concat(e.path),default:e.default})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","list",e.id].concat(e.path),value:e.value})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","list",fieldIndex]})}},{key:"onDeleteSubField",value:function(e){this.props.deleteSubelement({id:this.props.id,path:["content","list"].concat(e.path)})}},{key:"onMoveUpField",value:function(fieldIndex,path){this.props.moveUpSubelement({id:this.props.id,index:fieldIndex,path:path})}},{key:"onMoveDownField",value:function(fieldIndex,path){this.props.moveDownSubelement({id:this.props.id,index:fieldIndex,path:path})}},{key:"onChangeMainAttr",value:function(field,e){this.props.onChangeContent({id:this.props.id,path:["content","list_options",field],value:e})}},{key:"addQuickReply",value:function(e){this.props.addQuickReply({id:this.props.id})}},{key:"render",value:function(){var _this2=this,element_list=[];this.props.action.hasIn(["content","list"])&&(element_list=this.props.action.getIn(["content","list"]).map((function(field,index){return _react.default.createElement(_NodeActionListItem.default,{id:index,isFirst:0==index,isLast:index+1==_this2.props.action.getIn(["content","list"]).size,onDeleteSubField:_this2.onDeleteSubField,addSubelement:_this2.addSubelement,key:field.get("_id"),item:field,onMoveDownField:function(e){return _this2.onMoveDownField(index,["content","list"])},onMoveUpField:function(e){return _this2.onMoveUpField(index,["content","list"])},onDeleteField:_this2.onDeleteField,onChangeFieldAttr:_this2.onchangeFieldAttr})})));var button_list=[];if(this.props.action.hasIn(["content","quick_replies"])){var totalButtons=this.props.action.getIn(["content","quick_replies"]).size;button_list=this.props.action.getIn(["content","quick_replies"]).map((function(reply,index){return _react.default.createElement(_NodeTriggerActionQuickReply.default,{onPayloadAttrChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["content","quick_replies",e.id,"content",e.payload.attr],value:e.payload.value})},onPayloadTypeChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["content","quick_replies",e.id,"type"],value:e.value})},deleteReply:function(e){return _this2.props.removeQuickReply({id:_this2.props.id,path:["content","quick_replies",e.id]})},onNameChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["content","quick_replies",e.id,"content","name"],value:e.value})},onPayloadChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["content","quick_replies",e.id,"content","payload"],value:e.value})},upField:function(e){return _this2.onMoveUpField(index,["content","quick_replies"])},downField:function(e){return _this2.onMoveDownField(index,["content","quick_replies"])},isFirst:0==index,isLast:index+1==totalButtons,id:index,key:reply.get("_id")||index,reply:reply})}))}return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"float-right"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onChangeMainAttr("no_highlight",e.target.checked)},defaultChecked:this.props.action.getIn(["content","list_options","no_highlight"])})," No Highlight Top Element")),_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onChangeMainAttr("hide_text_area",e.target.checked)},defaultChecked:this.props.action.getIn(["content","list_options","hide_text_area"])})," Hide text area on response.")," ",_react.default.createElement("i",{className:"material-icons",title:"Textarea to enter user message will be disabled. Make sure you include buttons for user to click."},"info"))),_react.default.createElement("div",{className:"bot-elements"},element_list,_react.default.createElement("div",null,_react.default.createElement("a",{className:"btn btn-info btn-sm",onClick:this.addField.bind(this)},"Add Element"))),_react.default.createElement("hr",null),_react.default.createElement("div",{className:"bot-buttons"},button_list,_react.default.createElement("div",null,_react.default.createElement("a",{className:"btn btn-info btn-sm",onClick:this.addQuickReply.bind(this)},"Add buttom"))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionList}(_react.Component);exports.default=_default},{"./NodeTriggerActionQuickReply":29,"./NodeTriggerActionType":36,"./NodeTriggerPayloadList":42,"./list/NodeActionListItem":48,react:146,shortid:158}],24:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionLogAction,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionLogAction);function NodeTriggerActionLogAction(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionLogAction),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionLogAction,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Action identifier"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["action_options","action"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","action_options","action"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Action body, content is always saved as JSON"),_react.default.createElement("textarea",{placeholder:"Put your action to log here",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["text"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","text"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionLogAction}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],25:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionMail,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionMail);function NodeTriggerActionMail(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionMail),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionMail,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Subject"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","subject"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","subject"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"From name"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","from_name"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","from_name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"From e-mail"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","from_email"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","from_email"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Reply to"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","reply_to"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","reply_to"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Recipient"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","recipient"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","recipient"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"CC Recipient"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","cc_recipient"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","cc_recipient"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"BCC Recipient"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["mail_options","bcc_recipient"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","mail_options","bcc_recipient"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Mail body"),_react.default.createElement("textarea",{placeholder:"Video URL",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["text"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","text"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionMail}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],26:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionMatchActions,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionMatchActions);function NodeTriggerActionMatchActions(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionMatchActions),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionMatchActions,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["event_background"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","event_background"])})," Event is processed on next visitor message.")),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["check_visitor_msg"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","check_visitor_msg"])})," Check for visitor message also. If you put ","{content_1}",", or any other value, but still want to check by vistior message check this.")),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["check_visitor_first"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","check_visitor_first"])})," Check first by visitor message.")),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,"Search for text. This field will override user message text. Usefull in case you want to search by Rest API response. You can put here like ","{content_1}"),_react.default.createElement("input",{type:"text",placeholder:"Bot content {content_1}",onChange:function(e){return _this2.onchangeAttr({path:["text"],value:e.target.value})},defaultValue:this.props.action.hasIn(["content","text"])?this.props.action.getIn(["content","text"]):"",className:"form-control form-control-sm"})),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"For what start chat actions to search"),_react.default.createElement("select",{className:"form-control form-control-sm",defaultValue:this.props.action.getIn(["content","on_start_type"]),onChange:function(e){return _this2.onchangeAttr({path:["on_start_type"],value:e.target.value})}},_react.default.createElement("option",{value:"0"},"Do not check on chat start"),_react.default.createElement("option",{value:"1"},"Instant execution (Executes and continues workflow)"),_react.default.createElement("option",{value:"2"},"Instant execution and block (executes and blocks further triggers execution)"),_react.default.createElement("option",{value:"3"},"Instant execution and continue if stop is returned from this trigger"),_react.default.createElement("option",{value:"4"},"Schedule (schedules for further execution trigger)"),_react.default.createElement("option",{value:"5"},"Any")))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If no trigger was found execute this"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["alternative_callback"],value:e})},payload:this.props.action.getIn(["content","alternative_callback"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionMatchActions}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,react:146}],27:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionPredefined,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionPredefined);function NodeTriggerActionPredefined(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionPredefined),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionPredefined,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Execute trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["payload"],value:e})},payload:this.props.action.getIn(["content","payload"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionPredefined}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,react:146}],28:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerArgumentTemplate=_interopRequireDefault(require("./NodeTriggerArgumentTemplate"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionProgress,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionProgress);function NodeTriggerActionProgress(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionProgress),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionProgress,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Update interval"),_react.default.createElement("input",{type:"text",placeholder:"Value in seconds",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["interval"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","interval"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Event identifier"),_react.default.createElement("input",{placeholder:"progress_event",type:"text",className:"form-control",onChange:function(e){return _this2.onchangeAttr({path:["method"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","method"])})))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Argument template"),_react.default.createElement(_NodeTriggerArgumentTemplate.default,{showOptional:!0,onChange:this.onchangeAttr,argument:this.props.action.getIn(["content","argument_template"])})),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionProgress}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerArgumentTemplate":39,react:146}],29:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_reactRedux=require("react-redux"),_NodeTriggerActionQuickReplyPayload=(obj=require("./NodeTriggerActionQuickReplyPayload"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{payloads:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionQuickReply,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionQuickReply);function NodeTriggerActionQuickReply(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionQuickReply),(_this=_super.call(this,props)).onNameChange=_this.onNameChange.bind(_assertThisInitialized(_this)),_this.onPayloadChange=_this.onPayloadChange.bind(_assertThisInitialized(_this)),_this.deleteReply=_this.deleteReply.bind(_assertThisInitialized(_this)),_this.onPayloadTypeChange=_this.onPayloadTypeChange.bind(_assertThisInitialized(_this)),_this.onPayloadAttrChange=_this.onPayloadAttrChange.bind(_assertThisInitialized(_this)),_this.onPrecheckChange=_this.onPrecheckChange.bind(_assertThisInitialized(_this)),_this.onRenderArgsChange=_this.onRenderArgsChange.bind(_assertThisInitialized(_this)),_this.onStoreNameChange=_this.onStoreNameChange.bind(_assertThisInitialized(_this)),_this.onStoreValueChange=_this.onStoreValueChange.bind(_assertThisInitialized(_this)),_this.onButtonIDChange=_this.onButtonIDChange.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionQuickReply,(protoProps=[{key:"onStoreNameChange",value:function(e){this.props.onStoreNameChange({id:this.props.id,value:e.target.value})}},{key:"onStoreValueChange",value:function(e){this.props.onStoreValueChange({id:this.props.id,value:e.target.value})}},{key:"onButtonIDChange",value:function(e){this.props.onButtonIDChange({id:this.props.id,value:e.target.value})}},{key:"onPrecheckChange",value:function(e){this.props.onPrecheckChange({id:this.props.id,value:e.target.value})}},{key:"onRenderArgsChange",value:function(e){this.props.onRenderArgsChange({id:this.props.id,value:e.target.value})}},{key:"onNameChange",value:function(e){this.props.onNameChange({id:this.props.id,value:e.target.value})}},{key:"onPayloadChange",value:function(payload){this.props.onPayloadChange({id:this.props.id,value:payload})}},{key:"onPayloadTypeChange",value:function(payload){this.props.onPayloadChange({id:this.props.id,value:""}),this.props.onPayloadTypeChange({id:this.props.id,value:payload})}},{key:"onPayloadAttrChange",value:function(payload){this.props.onPayloadAttrChange({id:this.props.id,payload:payload})}},{key:"deleteReply",value:function(){this.props.deleteReply({id:this.props.id})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-5"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",{className:"font-weight-bold"},"Name"),_react.default.createElement("input",{type:"text",onChange:this.onNameChange,defaultValue:this.props.reply.getIn(["content","name"]),className:"form-control form-control-sm"})),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Precheck event"),_react.default.createElement("input",{type:"text",onChange:this.onPrecheckChange,defaultValue:this.props.reply.getIn(["content","render_precheck_function"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Arguments"),_react.default.createElement("input",{type:"text",onChange:this.onRenderArgsChange,defaultValue:this.props.reply.getIn(["content","render_args"]),className:"form-control form-control-sm"}))))),_react.default.createElement("div",{className:"col-5"},_react.default.createElement(_NodeTriggerActionQuickReplyPayload.default,{onPayloadAttrChange:this.onPayloadAttrChange,onPayloadTypeChange:this.onPayloadTypeChange,onPayloadChange:this.onPayloadChange,payloadType:this.props.reply.get("type"),currentPayload:this.props.reply.getIn(["content"])})),_react.default.createElement("div",{className:"col-2"},_react.default.createElement("div",{className:"btn-group float-left mt-4 pt-2",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-xs btn-secondary"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-xs",onClick:this.props.upField},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-xs",onClick:this.props.downField},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down"))),_react.default.createElement("div",{className:"form-group float-right mt-4 pt-1"},_react.default.createElement("div",null,_react.default.createElement("a",{onClick:this.deleteReply},_react.default.createElement("i",{className:"material-icons mr-0"},"delete"))))),"url"==this.props.reply.get("type")&&_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Button ID"),_react.default.createElement("input",{type:"text",placeholder:"Button ID",onChange:this.onButtonIDChange,defaultValue:this.props.reply.getIn(["content","button_id"]),className:"form-control form-control-sm"}))),("trigger"==this.props.reply.get("type")||"button"==this.props.reply.get("type"))&&_react.default.createElement("div",{className:"col-10"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Store name"),_react.default.createElement("input",{type:"text",title:"If you do not set we will not save button click",placeholder:"How should we name stored attribute?",onChange:this.onStoreNameChange,defaultValue:this.props.reply.getIn(["content","store_name"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Store value"),_react.default.createElement("input",{type:"text",placeholder:"Button name is used by default.",onChange:this.onStoreValueChange,defaultValue:this.props.reply.getIn(["content","store_value"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.props.onButtonStoreTypeChange({id:_this2.props.id,value:e.target.checked})},defaultChecked:this.props.reply.getIn(["content","as_variable"])})," Save value as chat variable.")," ",_react.default.createElement("i",{className:"material-icons",title:"This will be invisible for the operator."},"info")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Button ID"),_react.default.createElement("input",{type:"text",placeholder:"Button ID",onChange:this.onButtonIDChange,defaultValue:this.props.reply.getIn(["content","button_id"]),className:"form-control form-control-sm"}))))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionQuickReply}(_react.Component))||_class;exports.default=_default},{"./NodeTriggerActionQuickReplyPayload":30,react:146,"react-redux":131}],30:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_reactRedux=require("react-redux"),_nodePayloadActions=require("../../actions/nodePayloadActions"),_NodeTriggerList=(obj=require("./NodeTriggerList"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{payloads:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionQuickReplyPayload,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionQuickReplyPayload);function NodeTriggerActionQuickReplyPayload(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionQuickReplyPayload),(_this=_super.call(this,props)).state={addingPayload:!1,value:""},_this}return Constructor=NodeTriggerActionQuickReplyPayload,(protoProps=[{key:"addPayload",value:function(){this.setState({addingPayload:!0})}},{key:"savePayload",value:function(){this.props.dispatch((0,_nodePayloadActions.addPayload)({trigger_id:this.props.payloads.getIn(["currenttrigger","id"]),name:this.props.currentPayload.get("name"),value:this.state.value})),this.props.onPayloadChange(this.state.value),this.setState({addingPayload:!1})}},{key:"cancelSavePayload",value:function(){this.setState({addingPayload:!1})}},{key:"onChange",value:function(e){this.props.onPayloadChange(e.target.value)}},{key:"onChangeType",value:function(e){this.props.onPayloadTypeChange(e.target.value)}},{key:"onPayloadNameChange",value:function(e){this.setState({value:e.target.value})}},{key:"onChangeMessageToVisitor",value:function(e){this.props.onPayloadAttrChange({attr:"payload_message",value:e.target.value})}},{key:"onChangePayload",value:function(val){this.props.onPayloadAttrChange({attr:"payload",value:val})}},{key:"render",value:function(){var _this2=this,list=this.props.payloads.get("payloads").map((function(option,index){return _react.default.createElement("option",{key:option.get("id"),value:option.get("payload")},option.get("name")+" ["+option.get("payload")+"]")})),controlPayload="";return"button"==this.props.payloadType?controlPayload=_react.default.createElement("div",{className:"col-9"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Payload"),0==this.state.addingPayload?_react.default.createElement("select",{className:"form-control form-control-sm",onChange:this.onChange.bind(this),value:this.props.currentPayload.get("payload")},_react.default.createElement("option",{value:""},"Select event"),list):_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",onChange:this.onPayloadNameChange.bind(this),defaultValue:""}))):"url"==this.props.payloadType?controlPayload=_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"URL"),_react.default.createElement("input",{className:"form-control form-control-sm",type:"text",onChange:this.onChange.bind(this),defaultValue:this.props.currentPayload.get("payload")}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Payload"),_react.default.createElement("select",{className:"form-control form-control-sm",onChange:this.onChangeMessageToVisitor.bind(this),value:this.props.currentPayload.get("payload_message")},_react.default.createElement("option",{value:""},"Select event"),list))))):"file"==this.props.payloadType?controlPayload=_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"File ID"),_react.default.createElement("input",{className:"form-control form-control-sm",placeholder:"File ID",type:"text",onChange:this.onChange.bind(this),defaultValue:this.props.currentPayload.get("payload")}))):"updatechat"==this.props.payloadType?controlPayload=_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Select action"),_react.default.createElement("select",{className:"form-control form-control-sm",value:this.props.currentPayload.get("payload"),onChange:this.onChange.bind(this)},_react.default.createElement("option",{value:""},"Select event"),_react.default.createElement("option",{value:"transferToOperator"},"Transfer to operator"),_react.default.createElement("option",{value:"transferToBot"},"Transfer to bot"),_react.default.createElement("option",{value:"subscribeToNotifications"},"Subscribe to notifications"))),("transferToOperator"==this.props.currentPayload.get("payload")||"transferToBot"==this.props.currentPayload.get("payload"))&&_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Message to user after transfer"),_react.default.createElement("input",{className:"form-control form-control-sm",onChange:this.onChangeMessageToVisitor.bind(this),defaultValue:this.props.currentPayload.get("payload_message"),type:"text",placeholder:"Message to visitor"}))):"trigger"==this.props.payloadType&&(controlPayload=_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Select what trigger to execute"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.props.onPayloadChange(e)},payload:this.props.currentPayload.get("payload")})))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Type"),_react.default.createElement("select",{className:"form-control form-control-sm",defaultValue:this.props.payloadType,onChange:this.onChangeType.bind(this)},_react.default.createElement("option",{value:"none"},"No action"),_react.default.createElement("option",{value:"url"},"URL"),_react.default.createElement("option",{value:"button"},"Click"),_react.default.createElement("option",{value:"updatechat"},"Update chat"),_react.default.createElement("option",{value:"trigger"},"Execute trigger"),_react.default.createElement("option",{value:"file"},"File")))),controlPayload,"button"==this.props.payloadType&&_react.default.createElement("div",{className:"col-3"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null," "),_react.default.createElement("div",null,0==this.state.addingPayload?_react.default.createElement("a",{title:"Add new payload",onClick:this.addPayload.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"add")):_react.default.createElement("div",null,_react.default.createElement("a",{title:"Save",onClick:this.savePayload.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"check")),_react.default.createElement("a",{title:"Cancel",onClick:this.cancelSavePayload.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"cancel")))))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionQuickReplyPayload}(_react.Component))||_class;exports.default=_default},{"../../actions/nodePayloadActions":4,"./NodeTriggerList":41,react:146,"react-redux":131}],31:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=_interopRequireDefault(require("./NodeTriggerList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionRepeatRestrict,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionRepeatRestrict);function NodeTriggerActionRepeatRestrict(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionRepeatRestrict),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionRepeatRestrict,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"How many times allow to execute this trigger"),_react.default.createElement("input",{type:"text",className:"form-control form-control-sm",defaultValue:this.props.action.getIn(["content","repeat_count"]),onChange:function(e){return _this2.onchangeAttr({path:["repeat_count"],value:e.target.value})}}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Repeat identifier"),_react.default.createElement("input",{type:"text",maxLength:"20",placeholder:"E.g global_counter",title:"If you define identifier counter will be using it for repeatable identification so you can use same identifier in multiple places.",className:"form-control form-control-sm",defaultValue:this.props.action.getIn(["content","identifier"]),onChange:function(e){return _this2.onchangeAttr({path:["identifier"],value:e.target.value})}}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Set value manually. It wil not increment counter and will set value defined in this field"),_react.default.createElement("input",{type:"number",maxLength:"20",title:"You can set counter value manually",placeholder:"You can set counter value manually",className:"form-control form-control-sm",defaultValue:this.props.action.getIn(["content","value_man"]),onChange:function(e){return _this2.onchangeAttr({path:["value_man"],value:e.target.value})}}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["reset_counter"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","reset_counter"])})," This is reset operation.")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["do_not_inc"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","do_not_inc"])})," Do not increment counter on check.")),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["continue_all"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","continue_all"])})," Continue executing responses. By default if limit is reached we do not execute any other response.")),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If limit is reached execute this trigger"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["alternative_callback"],value:e})},payload:this.props.action.getIn(["content","alternative_callback"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionRepeatRestrict}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,"./NodeTriggerList":41,react:146}],32:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerList=(_interopRequireDefault(require("./NodeTriggerArgumentTemplate")),_interopRequireDefault(require("./NodeTriggerList"))),_nodeGroupTriggerActions=require("../../actions/nodeGroupTriggerActions"),_reactRedux=require("react-redux"),_immutable=require("immutable");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{payloads:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionRestAPI,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionRestAPI);function NodeTriggerActionRestAPI(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionRestAPI),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.onRestAPIChange=_this.onRestAPIChange.bind(_assertThisInitialized(_this)),_this.onRestAPIMethodChange=_this.onRestAPIMethodChange.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionRestAPI,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"componentDidMount",value:function(){this.props.action.hasIn(["content","rest_api"])&&(this.props.dispatch((0,_nodeGroupTriggerActions.initRestMethods)(this.props.action.getIn(["content","rest_api"]))),_immutable.List.isList(this.props.action.getIn(["content","rest_api_method_output"]))&&this.onchangeAttr({path:["rest_api_method_output"],value:(0,_immutable.fromJS)({})}),_immutable.List.isList(this.props.action.getIn(["content","rest_api_method_params"]))&&this.onchangeAttr({path:["rest_api_method_params"],value:(0,_immutable.fromJS)({})}))}},{key:"onRestAPIChange",value:function(e){this.props.dispatch((0,_nodeGroupTriggerActions.initRestMethods)(e)),this.onchangeAttr({path:["rest_api"],value:e}),this.onchangeAttr({path:["rest_api_method"],value:null}),this.onchangeAttr({path:["rest_api_method_params"],value:(0,_immutable.fromJS)({})}),this.onchangeAttr({path:["rest_api_method_output"],value:(0,_immutable.fromJS)({})})}},{key:"onRestAPIMethodChange",value:function(e){this.onchangeAttr({path:["rest_api_method"],value:e}),this.onchangeAttr({path:["rest_api_method_params"],value:(0,_immutable.fromJS)({})}),this.onchangeAttr({path:["rest_api_method_output"],value:(0,_immutable.fromJS)({})})}},{key:"render",value:function(){var _this2=this,list=this.props.payloads.get("rest_api_calls").map((function(option,index){return _react.default.createElement("option",{key:option.get("id"),value:option.get("id")},option.get("name"))})),indexOfListingToUpdate=this.props.payloads.getIn(["rest_api_calls"]).findIndex((function(listing){return listing.get("id")==_this2.props.action.getIn(["content","rest_api"])})),listMethods=[],userParams=[],outputCombinations=[];if(-1!==indexOfListingToUpdate&&this.props.payloads.hasIn(["rest_api_calls",indexOfListingToUpdate,"methods"])&&(listMethods=this.props.payloads.getIn(["rest_api_calls",indexOfListingToUpdate,"methods"]).map((function(option,index){return _react.default.createElement("option",{key:option.get("id"),value:option.get("id")},option.get("name"))})),this.props.action.hasIn(["content","rest_api_method"]))){var indexOfListingToUpdateMethod=this.props.payloads.getIn(["rest_api_calls",indexOfListingToUpdate,"methods"]).findIndex((function(listing){return listing.get("id")==_this2.props.action.getIn(["content","rest_api_method"])}));-1!==indexOfListingToUpdateMethod&&(userParams=this.props.payloads.getIn(["rest_api_calls",indexOfListingToUpdate,"methods",indexOfListingToUpdateMethod,"userparams"]).map((function(option,index){return _react.default.createElement("div",{className:"form-group",key:option.get("id")},_react.default.createElement("label",null,option.get("value")),_react.default.createElement("input",{className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["rest_api_method_params",option.get("id")],value:e.target.value})},defaultValue:_this2.props.action.getIn(["content","rest_api_method_params",option.get("id")]),type:"text"}))})),outputCombinations=this.props.payloads.getIn(["rest_api_calls",indexOfListingToUpdate,"methods",indexOfListingToUpdateMethod,"output"]).map((function(option,index){return _react.default.createElement("div",{key:option.get("id"),className:"form-group"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,"Execute trigger for [",_react.default.createElement("b",null,option.get("success_name")),"]")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",value:"",onChange:function(e){return _this2.onchangeAttr({path:["rest_api_method_output",option.get("id")+"_chk"],value:e.target.checked})},defaultChecked:_this2.props.action.getIn(["content","rest_api_method_output",option.get("id")+"_chk"])})," Check only this response. ",_react.default.createElement("i",{className:"material-icons",title:"By default we are checking all output combinations. You can force to check only selected ones."},"info")))),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["rest_api_method_output",option.get("id")],value:e})},payload:_this2.props.action.getIn(["content","rest_api_method_output",option.get("id")])}))})))}return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Rest API"),_react.default.createElement("select",{className:"form-control form-control-sm",defaultValue:this.props.action.getIn(["content","rest_api"]),onChange:function(e){return _this2.onRestAPIChange(e.target.value)}},_react.default.createElement("option",{value:""},"Choose a Rest API"),list))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Method"),_react.default.createElement("select",{className:"form-control form-control-sm",value:this.props.action.getIn(["content","rest_api_method"]),onChange:function(e){return _this2.onRestAPIMethodChange(e.target.value)}},_react.default.createElement("option",{value:""},"Choose a method"),listMethods)))),userParams,outputCombinations,_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Default trigger to execute"),_react.default.createElement(_NodeTriggerList.default,{enableAction:!0,payload_action_id:this.props.action.getIn(["content","rest_api_method_output","default_trigger_action_id"]),onSetPayloadActionId:function(e){return _this2.onchangeAttr({path:["rest_api_method_output","default_trigger_action_id"],value:e})},onSetPayload:function(e){return _this2.onchangeAttr({path:["rest_api_method_output","default_trigger"],value:e})},payload:this.props.action.getIn(["content","rest_api_method_output","default_trigger"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,"Trigger to execute before default ",_react.default.createElement("i",{className:"material-icons",title:"Usefull for logging purposes to track full path of navigation. Use `Log action` response type. This trigger is executed only if default trigger is executed."},"info")),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["rest_api_method_output","default_trigger_alt"],value:e})},payload:this.props.action.getIn(["content","rest_api_method_output","default_trigger_alt"])})),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If your Rest API takes long time and visitor writes a message while it's still hapenning, you can send a custom trigger to execute. E.g this trigger can write that we are still processing your request."),_react.default.createElement(_NodeTriggerList.default,{enableAction:!0,payload_action_id:this.props.action.getIn(["content","rest_api_method_output","long_taking_action_id"]),onSetPayloadActionId:function(e){return _this2.onchangeAttr({path:["rest_api_method_output","long_taking_action_id"],value:e})},onSetPayload:function(e){return _this2.onchangeAttr({path:["rest_api_method_output","long_taking_trigger"],value:e})},payload:this.props.action.getIn(["content","rest_api_method_output","long_taking_trigger"])})))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","background_process"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","background_process"])})," Send Rest API Call in the background.")," ",_react.default.createElement("i",{className:"material-icons",title:"You have to be using lhc-php-resque extension."},"info")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","no_body"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","no_body"])})," Do not save response.")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","as_system"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","as_system"])})," Save response as system message")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","on_next_msg"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","on_next_msg"])})," Process on next visitor message"))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionRestAPI}(_react.Component))||_class;exports.default=_default},{"../../actions/nodeGroupTriggerActions":3,"./NodeTriggerActionType":36,"./NodeTriggerArgumentTemplate":39,"./NodeTriggerList":41,immutable:102,react:146,"react-redux":131}],33:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionTbody,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionTbody);function NodeTriggerActionTbody(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionTbody),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.showHelp=_this.showHelp.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionTbody,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"showHelp",value:function(e){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"genericbot/help/"+e})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("execute_tbody")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help")),_react.default.createElement("label",null,"Execute JSON. There you can paste code directly from `Show code` section."),_react.default.createElement("textarea",{rows:3,placeholder:"Write your JSON here or use placeholder for Rest API response!",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"]),className:"form-control form-control-sm"})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionTbody}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],34:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=_interopRequireDefault(require("./NodeTriggerActionType")),_NodeTriggerActionQuickReply=_interopRequireDefault(require("./NodeTriggerActionQuickReply")),_NodeTriggerCallbackItem=_interopRequireDefault(require("./NodeTriggerCallbackItem")),_shortid=_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionText,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionText);function NodeTriggerActionText(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionText),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.setText=_this.setText.bind(_assertThisInitialized(_this)),_this.setHTML=_this.setHTML.bind(_assertThisInitialized(_this)),_this.addQuickReply=_this.addQuickReply.bind(_assertThisInitialized(_this)),_this.addAction=_this.addAction.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.addAnswerVariation=_this.addAnswerVariation.bind(_assertThisInitialized(_this)),_this.onQuickReplyNameChange=_this.onQuickReplyNameChange.bind(_assertThisInitialized(_this)),_this.onPrecheckChange=_this.onPrecheckChange.bind(_assertThisInitialized(_this)),_this.onRenderArgsChange=_this.onRenderArgsChange.bind(_assertThisInitialized(_this)),_this.onQuickReplyPayloadChange=_this.onQuickReplyPayloadChange.bind(_assertThisInitialized(_this)),_this.onDeleteQuickReply=_this.onDeleteQuickReply.bind(_assertThisInitialized(_this)),_this.onQuickReplyPayloadTypeChange=_this.onQuickReplyPayloadTypeChange.bind(_assertThisInitialized(_this)),_this.onPayloadAttrChange=_this.onPayloadAttrChange.bind(_assertThisInitialized(_this)),_this.showHelp=_this.showHelp.bind(_assertThisInitialized(_this)),_this.onStoreNameChange=_this.onStoreNameChange.bind(_assertThisInitialized(_this)),_this.onStoreValueChange=_this.onStoreValueChange.bind(_assertThisInitialized(_this)),_this.onButtonIDChange=_this.onButtonIDChange.bind(_assertThisInitialized(_this)),_this.onButtonStoreTypeChange=_this.onButtonStoreTypeChange.bind(_assertThisInitialized(_this)),_this.onDeleteField=_this.onDeleteField.bind(_assertThisInitialized(_this)),_this.onchangeFieldAttr=_this.onchangeFieldAttr.bind(_assertThisInitialized(_this)),_this.upChildField=_this.upChildField.bind(_assertThisInitialized(_this)),_this.downChildField=_this.downChildField.bind(_assertThisInitialized(_this)),_this.textMessageRef=_react.default.createRef(),_this}return Constructor=NodeTriggerActionText,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"setText",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","text"],value:e.target.value})}},{key:"addAnswerVariation",value:function(){console.log("add answer validation");var newVal=this.props.action.getIn(["content","text"])+" |||\n";this.props.onChangeContent({id:this.props.id,path:["content","text"],value:newVal}),this.textMessageRef.current.focus(),this.textMessageRef.current.value=newVal}},{key:"setHTML",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","html"],value:e.target.value})}},{key:"addQuickReply",value:function(e){this.props.addQuickReply({id:this.props.id})}},{key:"addAction",value:function(e){this.props.addSubelement({id:this.props.id,path:["content","callback_list"],default:{_id:_shortid.default.generate(),content:{success_message:"",success_text_pattern:"",success_callback:"",type:"",field:"",event:""}}})}},{key:"onQuickReplyNameChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","name"],value:e.value})}},{key:"onQuickReplyPayloadChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","payload"],value:e.value})}},{key:"onQuickReplyPayloadTypeChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"type"],value:e.value})}},{key:"onPrecheckChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","render_precheck_function"],value:e.value})}},{key:"onStoreNameChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","store_name"],value:e.value})}},{key:"onStoreValueChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","store_value"],value:e.value})}},{key:"onButtonIDChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","button_id"],value:e.value})}},{key:"onButtonStoreTypeChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","as_variable"],value:e.value})}},{key:"onRenderArgsChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content","render_args"],value:e.value})}},{key:"onPayloadAttrChange",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","quick_replies",e.id,"content",e.payload.attr],value:e.payload.value})}},{key:"onDeleteQuickReply",value:function(e){this.props.removeQuickReply({id:this.props.id,path:["content","quick_replies",e.id]})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onDeleteField",value:function(fieldIndex){this.props.deleteSubelement({id:this.props.id,path:["content","callback_list",fieldIndex]})}},{key:"onchangeFieldAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content","callback_list",e.id].concat(e.path),value:e.value})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"showHelp",value:function(e){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"genericbot/help/"+e})}},{key:"upChildField",value:function(fieldIndex){this.props.moveUpSubelement({id:this.props.id,index:fieldIndex,path:["content","quick_replies"]})}},{key:"downChildField",value:function(fieldIndex){this.props.moveDownSubelement({id:this.props.id,index:fieldIndex,path:["content","quick_replies"]})}},{key:"render",value:function(){var _this2=this,quick_replies=[];if(this.props.action.hasIn(["content","quick_replies"])){var totalButtons=this.props.action.getIn(["content","quick_replies"]).size;quick_replies=this.props.action.getIn(["content","quick_replies"]).map((function(reply,index){return _react.default.createElement(_NodeTriggerActionQuickReply.default,{onPayloadAttrChange:_this2.onPayloadAttrChange,upField:function(e){return _this2.upChildField(index)},downField:function(e){return _this2.downChildField(index)},onButtonStoreTypeChange:_this2.onButtonStoreTypeChange,onButtonIDChange:_this2.onButtonIDChange,isFirst:0==index,isLast:index+1==totalButtons,onStoreValueChange:_this2.onStoreValueChange,onStoreNameChange:_this2.onStoreNameChange,onPrecheckChange:_this2.onPrecheckChange,onRenderArgsChange:_this2.onRenderArgsChange,onPayloadTypeChange:_this2.onQuickReplyPayloadTypeChange,deleteReply:_this2.onDeleteQuickReply,onNameChange:_this2.onQuickReplyNameChange,onPayloadChange:_this2.onQuickReplyPayloadChange,id:index,key:reply.get("_id")||index,reply:reply})}))}var callback_list=[];return this.props.action.hasIn(["content","callback_list"])&&(callback_list=this.props.action.getIn(["content","callback_list"]).map((function(callback,index){return _react.default.createElement(_NodeTriggerCallbackItem.default,{onChangeFieldAttr:_this2.onchangeFieldAttr,onDeleteField:_this2.onDeleteField,id:index,key:index,callback:callback})}))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("text")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help")),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Enter text"),_react.default.createElement("a",{title:"Add answer variation",className:"float-right",onClick:this.addAnswerVariation},_react.default.createElement("i",{className:"material-icons mr-0"},"question_answer")),_react.default.createElement("textarea",{rows:3,placeholder:"Write your response here!",onChange:this.setText,ref:this.textMessageRef,defaultValue:this.props.action.getIn(["content","text"]),className:"form-control form-control-sm"})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Enter HTML"),_react.default.createElement("textarea",{placeholder:"Write your response here!",onChange:this.setHTML,defaultValue:this.props.action.getIn(["content","html"]),className:"form-control form-control-sm"})),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","hide_text_area"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","hide_text_area"])})," Hide text area on response.")," ",_react.default.createElement("i",{className:"material-icons",title:"Textarea to enter user message will be disabled. Make sure you include buttons for user to click."},"info")),_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","on_start_chat"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","on_start_chat"])})," Send message only at chat start.")," ",_react.default.createElement("i",{className:"material-icons",title:"Message will be send only on chat start event."},"info")),_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","hide_on_next"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","hide_on_next"])})," Hide on next message.")," ",_react.default.createElement("i",{className:"material-icons",title:"Hide message content on next message."},"info"))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","as_system"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","as_system"])})," Save as a system message.")," ",_react.default.createElement("i",{className:"material-icons",title:"Message will be saved as system message and will be invisible by visitor."},"info")),_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","as_visitor"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","as_visitor"])})," Save as a visitor message.")," ",_react.default.createElement("i",{className:"material-icons",title:"Message will be saved as a visitor message."},"info")),_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","as_log_msg"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","as_log_msg"])})," Save as a log message.")," ",_react.default.createElement("i",{className:"material-icons",title:"Message will be saved in audit log only."},"info"))),_react.default.createElement("div",{className:"col-12 text-right"},_react.default.createElement("div",{className:"btn-group",role:"group"},_react.default.createElement("button",{onClick:this.addAction,className:"btn btn-xs btn-secondary"},_react.default.createElement("i",{className:"material-icons mr-0"},"add")," Add action on message"),_react.default.createElement("button",{onClick:this.addQuickReply,className:"btn btn-xs btn-secondary"},_react.default.createElement("i",{className:"material-icons mr-0"},"add")," Add quick reply"))))),_react.default.createElement("div",{className:"col-12"},callback_list,callback_list.size>0&&quick_replies.size>0&&_react.default.createElement("hr",null),quick_replies.size>0&&_react.default.createElement(_react.default.Fragment,null,_react.default.createElement("hr",null),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","as_dropdown"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","as_dropdown"])})," Render buttons as dropdown."),_react.default.createElement("br",null)),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["attr_options","always_show"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","attr_options","always_show"])})," Render buttons even if it's not the last message.")),this.props.action.hasIn(["content","attr_options","always_show"])&&1==this.props.action.getIn(["content","attr_options","always_show"])&&_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,"How many messages can be after buttons before they are hidden permanently? (applies only after page refresh)"),_react.default.createElement("input",{type:"number",placeholder:"1",className:"form-control form-control-sm",min:1,onChange:function(e){return _this2.onchangeAttr({path:["attr_options","after_messages_number"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","attr_options","after_messages_number"])})))),quick_replies),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",{className:"hr-big"})))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionText}(_react.Component);exports.default=_default},{"./NodeTriggerActionQuickReply":29,"./NodeTriggerActionType":36,"./NodeTriggerCallbackItem":40,react:146,shortid:158}],35:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionTextConditional,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionTextConditional);function NodeTriggerActionTextConditional(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionTextConditional),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.showHelp=_this.showHelp.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionTextConditional,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"showHelp",value:function(e){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"genericbot/help/"+e})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("a",{title:"Need help?",className:"float-right",onClick:function(e){return _this2.showHelp("conditional_message")}},_react.default.createElement("i",{className:"material-icons mr-0"},"help")),_react.default.createElement("label",null,"Intro message to the user"),_react.default.createElement("textarea",{rows:3,placeholder:"This message will receive a user",onChange:function(e){return _this2.onchangeAttr({path:["intro_us"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","intro_us"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Full message to the user"),_react.default.createElement("textarea",{rows:3,placeholder:"This is full message body after read more is clicked.",onChange:function(e){return _this2.onchangeAttr({path:["full_us"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","full_us"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Read more text for the visitor"),_react.default.createElement("input",{type:"text",placeholder:"Read more",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["readmore_us"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","readmore_us"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Intro message to the operator"),_react.default.createElement("textarea",{rows:3,placeholder:"This message will receive a user",onChange:function(e){return _this2.onchangeAttr({path:["intro_op"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","intro_op"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Full message to the operator"),_react.default.createElement("textarea",{rows:3,placeholder:"This is full message body after read more is clicked.",onChange:function(e){return _this2.onchangeAttr({path:["full_op"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","full_op"]),className:"form-control form-control-sm"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Read more text for the operator"),_react.default.createElement("input",{type:"text",placeholder:"Read more",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["readmore_op"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","readmore_op"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionTextConditional}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],36:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_immutable=require("immutable");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}exports.default=function(_ref){var _onChange=_ref.onChange,type=_ref.type,options=(0,_immutable.fromJS)([{value:"text",text:"Send Text"},{value:"attribute",text:"Collect custom attribute"},{value:"buttons",text:"Button list"},{value:"list",text:"Send List"},{value:"predefined",text:"Send predefined block"},{value:"typing",text:"Send Typing"},{value:"video",text:"Send Video"},{value:"generic",text:"Send Carrousel"},{value:"command",text:"Update Current chat"},{value:"intent",text:"Intent detection"},{value:"intentcheck",text:"Check for pending intentions"},{value:"conditions",text:"Check for conditions to proceed"},{value:"match_actions",text:"Search for default actions on message"},{value:"repeat_restrict",text:"Restrict execution more than defined times"},{value:"text_conditional",text:"Different text message to visitor and operator"},{value:"alert_icon",text:"Alert icon"},{value:"mail",text:"Send mail"}]),options_advanced=(0,_immutable.fromJS)([{value:"collectable",text:"Collect information"},{value:"progress",text:"Progress"},{value:"event_type",text:"Trigger to execute by response"},{value:"execute_js",text:"Execute Javascript"},{value:"actions",text:"Execute action"},{value:"restapi",text:"Rest API"},{value:"tbody",text:"Execute trigger body"},{value:"laction",text:"Log action"}]),list=options.map((function(option,index){return _react.default.createElement("option",{key:index,value:option.get("value")},option.get("text"))})),list_advanced=options_advanced.map((function(option,index){return _react.default.createElement("option",{key:index,value:option.get("value")},option.get("text"))}));return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("select",{title:"Response type",onChange:function(e){return _onChange(e)},className:"form-control form-control-sm",defaultValue:type},_react.default.createElement("optgroup",{label:"Basic"},list),_react.default.createElement("optgroup",{label:"Advanced"},list_advanced)))))}},{immutable:102,react:146}],37:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionTyping,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionTyping);function NodeTriggerActionTyping(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionTyping),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionTyping,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Show typing for N seconds"),_react.default.createElement("input",{type:"text",placeholder:"Value in seconds",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["duration"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","duration"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["untill_message"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","untill_message"])}),"OR untill next operator message")," ",_react.default.createElement("i",{className:"material-icons",title:"Usefull if some background job posts a message."},"info"))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Default typing text"),_react.default.createElement("input",{placeholder:"Typing...",type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["text"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","text"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Delay typing appearance for n seconds"),_react.default.createElement("input",{placeholder:"Value in seconds",type:"text",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["delay"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","delay"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{role:"group"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["on_start_chat"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","on_start_chat"])})," Send typing only at chat start.")," ",_react.default.createElement("i",{className:"material-icons",title:"Typing will be send only on chat start event."},"info")))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionTyping}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],38:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionType=(obj=require("./NodeTriggerActionType"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionVideo,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionVideo);function NodeTriggerActionVideo(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionVideo),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.removeAction=_this.removeAction.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerActionVideo,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"removeAction",value:function(){this.props.removeAction({id:this.props.id})}},{key:"onchangeAttr",value:function(e){this.props.onChangeContent({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",null,_react.default.createElement("div",{className:"d-flex flex-row"},_react.default.createElement("div",null,_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{disabled:!0,className:"btn btn-sm btn-info"},this.props.id+1),0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.upField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:function(e){return _this2.props.downField(_this2.props.id)}},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down")))),_react.default.createElement("div",{className:"flex-grow-1 px-2"},_react.default.createElement(_NodeTriggerActionType.default,{onChange:this.changeType,type:this.props.action.get("type")})),_react.default.createElement("div",{className:"pr-2"},_react.default.createElement("div",{className:"input-group input-group-sm"},_react.default.createElement("div",{className:"input-group-prepend"},_react.default.createElement("span",{className:"input-group-text",id:"basic-addon1"},_react.default.createElement("span",{className:"material-icons"},"vpn_key"))),_react.default.createElement("input",{type:"text",className:"form-control",readOnly:"true",value:this.props.action.getIn(["_id"]),title:"Action ID"}))),_react.default.createElement("div",{className:"pr-2 pt-1 text-nowrap"},_react.default.createElement("label",{className:"form-check-label",title:"Response will not be executed. Usefull for a quick testing."},_react.default.createElement("input",{onChange:function(e){return _this2.props.onChangeContent({id:_this2.props.id,path:["skip_resp"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["skip_resp"]),type:"checkbox"})," Skip")),_react.default.createElement("div",null,_react.default.createElement("button",{onClick:this.removeAction,type:"button",className:"btn btn-danger btn-sm float-right"},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["video_options","autoplay"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","video_options","autoplay"])})," Autoplay")),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["video_options","controls"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","video_options","controls"])})," Controls")),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Video URL"),_react.default.createElement("input",{type:"text",placeholder:"Video URL",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["payload"],value:e.target.value})},defaultValue:this.props.action.getIn(["content","payload"])})))),_react.default.createElement("hr",{className:"hr-big"}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionVideo}(_react.Component);exports.default=_default},{"./NodeTriggerActionType":36,react:146}],39:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_reactRedux=require("react-redux"),_nodeGroupTriggerActions=require("../../actions/nodeGroupTriggerActions"),_immutable=require("immutable");function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,_reactRedux.connect)((function(store){return{payloads:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerArgumentTemplate,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerArgumentTemplate);function NodeTriggerArgumentTemplate(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerArgumentTemplate),(_this=_super.call(this,props)).props.dispatch((0,_nodeGroupTriggerActions.initArgumentTemplates)()),_this.onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerArgumentTemplate,(protoProps=[{key:"onChange",value:function(e){this.props.onChange({path:["argument_template"],value:(0,_immutable.fromJS)({id:e.target.value})})}},{key:"onChangeMainAttr",value:function(path,e){this.props.onChange({id:this.props.id,path:["argument_template"].concat(path),value:e})}},{key:"render",value:function(){var _this2=this,list=[];this.props.payloads.has("arguments")&&(list=this.props.payloads.get("arguments").map((function(option,index){return _react.default.createElement("option",{key:index,value:index},option.get("name"))})));var argumentId=void 0!==this.props.argument?this.props.argument.get("id"):-1,header="",elements=[];return-1!=argumentId&&this.props.payloads.hasIn(["arguments",argumentId])&&(header=_react.default.createElement("div",null,_react.default.createElement("hr",null),_react.default.createElement("h4",null,this.props.payloads.getIn(["arguments",argumentId,"name"]))),elements=this.props.payloads.getIn(["arguments",argumentId,"items"]).map((function(option,index){return _react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{key:option.get("id"),className:"form-group"},_react.default.createElement("label",null,option.get("name")),_react.default.createElement("input",{type:"text",defaultValue:_this2.props.argument.getIn(["args",option.get("id"),"value"]),onChange:function(e){return _this2.onChangeMainAttr(["args",option.get("id"),"value"],e.target.value)},className:"form-control form-control-sm",placeholder:option.get("placeholder")})))}))),_react.default.createElement("div",null,_react.default.createElement("select",{className:"form-control form-control-sm",onChange:this.onChange.bind(this),value:argumentId},1==this.props.showOptional&&_react.default.createElement("option",{value:""},"Choose argument"),list),header,_react.default.createElement("div",{className:"row"},elements))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerArgumentTemplate}(_react.Component))||_class;exports.default=_default},{"../../actions/nodeGroupTriggerActions":3,immutable:102,react:146,"react-redux":131}],40:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerPayloadList=(obj=require("./NodeTriggerPayloadList"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerCallbackItem,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerCallbackItem);function NodeTriggerCallbackItem(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerCallbackItem),(_this=_super.call(this,props)).onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeTriggerCallbackItem,(protoProps=[{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"onChangeType",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","type"],value:e.target.value})}},{key:"onChangeField",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","field"],value:e.target.value})}},{key:"onChangeEvent",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","event"],value:e.target.value})}},{key:"onChangeSuccessCallback",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","success_callback"],value:e.target.value})}},{key:"onChangeMainAttr",value:function(field,e){this.props.onChangeFieldAttr({id:this.props.id,path:["content",field],value:e})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-3"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Type"),_react.default.createElement("select",{defaultValue:this.props.callback.getIn(["content","type"]),className:"form-control",onChange:this.onChangeType.bind(this)},_react.default.createElement("option",{value:""},"Choose what should be updated"),_react.default.createElement("option",{value:"chat"},"Set chat attribute")))),_react.default.createElement("div",{className:"col-3"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Attribute"),_react.default.createElement("select",{defaultValue:this.props.callback.getIn(["content","field"]),className:"form-control",onChange:this.onChangeField.bind(this)},_react.default.createElement("option",{value:""},"Choose what attribute should be set"),_react.default.createElement("option",{value:"email"},"E-mail"),_react.default.createElement("option",{value:"phone"},"Phone")))),_react.default.createElement("div",{className:"col-3"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Custom event to validate"),_react.default.createElement("input",{type:"text",defaultValue:this.props.callback.getIn(["content","event"]),onChange:this.onChangeEvent.bind(this),className:"form-control"}))),_react.default.createElement("div",{className:"col-3"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null," "),_react.default.createElement("div",null,_react.default.createElement("a",{onClick:this.deleteField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"delete"))))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Confirmation message"),_react.default.createElement("textarea",{className:"form-control",defaultValue:this.props.callback.getIn(["content","success_message"]),onChange:function(e){return _this2.onChangeMainAttr("success_message",e.target.value)}}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Choose payload to initialise after success"),_react.default.createElement(_NodeTriggerPayloadList.default,{showOptional:!0,onSetPayload:function(e){return _this2.onChangeMainAttr("success_callback",e)},payload:this.props.callback.getIn(["content","success_callback"])})),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Enter text pattern to find a trigger. This can be next trigger activation text."),_react.default.createElement("input",{type:"text",defaultValue:this.props.callback.getIn(["content","success_text_pattern"]),onChange:function(e){return _this2.onChangeMainAttr("success_text_pattern",e.target.value)},className:"form-control"}))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerCallbackItem}(_react.Component);exports.default=_default},{"./NodeTriggerPayloadList":42,react:146}],41:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,require("react-redux").connect)((function(store){return{nodegroups:store.nodegroups,nodegrouptriggers:store.nodegrouptriggers}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerList,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerList);function NodeTriggerList(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerList),_super.call(this,props)}return Constructor=NodeTriggerList,(protoProps=[{key:"onChange",value:function(e){this.props.onSetPayload(e.target.value)}},{key:"onChangeActionId",value:function(e){this.props.onSetPayloadActionId(e.target.value)}},{key:"render",value:function(){var _this=this,mappedNodeGroups=this.props.nodegroups.get("nodegroups").map((function(nodegroup){return _react.default.createElement("optgroup",{label:nodegroup.get("name"),key:nodegroup.get("id")},_this.props.nodegrouptriggers.get("nodegrouptriggers").has(nodegroup.get("id"))&&_this.props.nodegrouptriggers.get("nodegrouptriggers").get(nodegroup.get("id")).map((function(nodegrouptrigger){return _react.default.createElement("option",{key:nodegrouptrigger.get("id"),value:nodegrouptrigger.get("id")},nodegrouptrigger.get("name"))})))}));return _react.default.createElement(_react.default.Fragment,null,_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-"+(this.props.enableAction?6:12)},_react.default.createElement("select",{className:"form-control form-control-sm",onChange:this.onChange.bind(this),value:this.props.payload},_react.default.createElement("option",{value:""},"Choose a trigger"),mappedNodeGroups)),this.props.enableAction&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("input",{type:"text",defaultValue:this.props.payload_action_id,onChange:this.onChangeActionId.bind(this),className:"form-control form-control-sm",title:"Execute only one action from selected trigger from selected",placeholder:"Action ID"}))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerList}(_react.Component))||_class;exports.default=_default},{react:146,"react-redux":131}],42:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _class,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=(0,require("react-redux").connect)((function(store){return{payloads:store.currenttrigger}}))(_class=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerPayloadList,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerPayloadList);function NodeTriggerPayloadList(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerPayloadList),_super.call(this,props)}return Constructor=NodeTriggerPayloadList,(protoProps=[{key:"onChange",value:function(e){this.props.onSetPayload(e.target.value)}},{key:"render",value:function(){var list=this.props.payloads.get("payloads").map((function(option,index){return _react.default.createElement("option",{key:option.get("id"),value:option.get("payload")},option.get("name")+" ["+option.get("payload")+"]")}));return _react.default.createElement("select",{className:"form-control form-control-sm",onChange:this.onChange.bind(this),value:this.props.payload},1==this.props.showOptional&&_react.default.createElement("option",{value:""},"Choose payload"),list)}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerPayloadList}(_react.Component))||_class;exports.default=_default},{react:146,"react-redux":131}],43:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionQuickReplyPayload=(obj=require("../NodeTriggerActionQuickReplyPayload"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeActionButton,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeActionButton);function NodeActionButton(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeActionButton),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.onPayloadChange=_this.onPayloadChange.bind(_assertThisInitialized(_this)),_this.onChangeFieldType=_this.onChangeFieldType.bind(_assertThisInitialized(_this)),_this.onPayloadAttrChange=_this.onPayloadAttrChange.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeActionButton,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"onChangeFieldName",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","name"],value:e.target.value})}},{key:"onPayloadChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","payload"],value:payload})}},{key:"onChangeFieldType",value:function(type){this.props.onChangeFieldAttr({id:this.props.id,path:["type"],value:type})}},{key:"onPayloadAttrChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content",payload.attr],value:payload.value})}},{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"upField",value:function(){this.props.onMoveUpField(this.props.id)}},{key:"downField",value:function(){this.props.onMoveDownField(this.props.id)}},{key:"render",value:function(){return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,this.props.id+1,". Button name*"),_react.default.createElement("input",{className:"form-control",onChange:this.onChangeFieldName.bind(this),type:"text",defaultValue:this.props.button.getIn(["content","name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement(_NodeTriggerActionQuickReplyPayload.default,{onPayloadAttrChange:this.onPayloadAttrChange,onPayloadTypeChange:this.onChangeFieldType,onPayloadChange:this.onPayloadChange,payloadType:this.props.button.get("type"),currentPayload:this.props.button.getIn(["content"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},0==this.props.isFirst&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:this.upField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("button",{className:"btn btn-secondary btn-sm",onClick:this.downField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down"))),_react.default.createElement("div",{className:"btn-group float-right",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{className:"btn btn-warning btn-sm",onClick:this.deleteField.bind(this)},"Delete"))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",null)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeActionButton}(_react.Component);exports.default=_default},{"../NodeTriggerActionQuickReplyPayload":30,react:146}],44:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeCollectableField,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeCollectableField);function NodeCollectableField(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeCollectableField),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeCollectableField,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"onChangeFieldStoreName",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","field"],value:e.target.value})}},{key:"onChangeFieldName",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","name"],value:e.target.value})}},{key:"onChangeFieldType",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["type"],value:e.target.value})}},{key:"onChangeValidation",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","validation"],value:e.target.value})}},{key:"onChangeRenderFunction",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","render_function"],value:e.target.value})}},{key:"onChangePrecheckRenderFunction",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","render_precheck_function"],value:e.target.value})}},{key:"onChangeRenderArgs",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","render_args"],value:e.target.value})}},{key:"onChangeMessage",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","message"],value:e.target.value})}},{key:"onChangePrecheckMessage",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","message_precheck"],value:e.target.value})}},{key:"onChangeAdditionalMessage",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","message_explain"],value:e.target.value})}},{key:"onChangeProvider",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","provider_dropdown"],value:e.target.value})}},{key:"onChangeProviderName",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","provider_name"],value:e.target.value})}},{key:"onChangeProviderId",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","provider_id"],value:e.target.value})}},{key:"onChangeProviderDefault",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","provider_default"],value:e.target.value})}},{key:"onChangeProviderArgument",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","provider_argument"],value:e.target.value})}},{key:"onChangeRenderValidateFunction",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","render_validate"],value:e.target.value})}},{key:"onChangeValidationCallback",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","validation_callback"],value:e.target.value})}},{key:"onChangeValidationError",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","validation_error"],value:e.target.value})}},{key:"onChangeValidationArgument",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content","validation_argument"],value:e.target.value})}},{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"upField",value:function(){this.props.onMoveUpField(this.props.id)}},{key:"downField",value:function(){this.props.onMoveDownField(this.props.id)}},{key:"render",value:function(){return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,this.props.id+1,". Field name*"),_react.default.createElement("input",{className:"form-control",onChange:this.onChangeFieldName.bind(this),type:"text",defaultValue:this.props.field.getIn(["content","name"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Field store name*"),_react.default.createElement("input",{className:"form-control",onChange:this.onChangeFieldStoreName.bind(this),type:"text",defaultValue:this.props.field.getIn(["content","field"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Field type*"),_react.default.createElement("select",{className:"form-control",onChange:this.onChangeFieldType.bind(this),defaultValue:this.props.field.get("type")},_react.default.createElement("option",{value:""},"Select field type"),_react.default.createElement("option",{value:"text"},"Text"),_react.default.createElement("option",{value:"email"},"E-mail"),_react.default.createElement("option",{value:"phone"},"Phone"),_react.default.createElement("option",{value:"buttons"},"Buttons"),_react.default.createElement("option",{value:"dropdown"},"Dropdown"),_react.default.createElement("option",{value:"custom"},"Custom")))),"text"==this.props.field.get("type")&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Validation preg match rule"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeValidation.bind(this),defaultValue:this.props.field.getIn(["content","validation"])}))),"text"==this.props.field.get("type")&&_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Custom event validation"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeValidationCallback.bind(this),defaultValue:this.props.field.getIn(["content","validation_callback"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Validation error message"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeValidationError.bind(this),defaultValue:this.props.field.getIn(["content","validation_error"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Argument"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeValidationArgument.bind(this),defaultValue:this.props.field.getIn(["content","validation_argument"])}))))),"dropdown"==this.props.field.get("type")&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Provider event"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeProvider.bind(this),defaultValue:this.props.field.getIn(["content","provider_dropdown"])}))),_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Name attribute"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeProviderName.bind(this),defaultValue:this.props.field.getIn(["content","provider_name"])}))),_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Id attribute"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeProviderId.bind(this),defaultValue:this.props.field.getIn(["content","provider_id"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Default value"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeProviderDefault.bind(this),defaultValue:this.props.field.getIn(["content","provider_default"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Argument"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeProviderArgument.bind(this),defaultValue:this.props.field.getIn(["content","provider_argument"])}))))),("buttons"==this.props.field.get("type")||"custom"==this.props.field.get("type"))&&_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Precheck event"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangePrecheckRenderFunction.bind(this),defaultValue:this.props.field.getIn(["content","render_precheck_function"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Render event"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeRenderFunction.bind(this),defaultValue:this.props.field.getIn(["content","render_function"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Validate event"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeRenderValidateFunction.bind(this),defaultValue:this.props.field.getIn(["content","render_validate"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Arguments"),_react.default.createElement("input",{className:"form-control",type:"text",onChange:this.onChangeRenderArgs.bind(this),defaultValue:this.props.field.getIn(["content","render_args"])}))))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Message to user"),_react.default.createElement("textarea",{onChange:this.onChangeMessage.bind(this),defaultValue:this.props.field.getIn(["content","message"]),className:"form-control"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"If something wrong in precheck send this"),_react.default.createElement("textarea",{onChange:this.onChangePrecheckMessage.bind(this),defaultValue:this.props.field.getIn(["content","message_precheck"]),className:"form-control"}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Additional message to user"),_react.default.createElement("textarea",{onChange:this.onChangeAdditionalMessage.bind(this),defaultValue:this.props.field.getIn(["content","message_explain"]),className:"form-control"})))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},0==this.props.isFirst&&_react.default.createElement("a",{className:"btn btn-secondary btn-sm",onClick:this.upField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("a",{className:"btn btn-secondary btn-sm",onClick:this.downField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down"))),_react.default.createElement("div",{className:"btn-group float-right",role:"group","aria-label":"Trigger actions"},_react.default.createElement("a",{className:"btn btn-warning btn-sm",onClick:this.deleteField.bind(this)},"Delete")))),_react.default.createElement("hr",null)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeCollectableField}(_react.Component);exports.default=_default},{react:146}],45:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));(obj=require("../NodeTriggerList"))&&obj.__esModule;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeActionConditionItem,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeActionConditionItem);function NodeActionConditionItem(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeActionConditionItem),(_this=_super.call(this,props)).onAttrChange=_this.onAttrChange.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this.onConditionChange=_this.onConditionChange.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeActionConditionItem,(protoProps=[{key:"onAttrChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","attr"],value:payload})}},{key:"onValChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","val"],value:payload})}},{key:"onConditionChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","comp"],value:payload})}},{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"onchangeAttr",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Attribute"),_react.default.createElement("input",{type:"text",placeholder:"yes, thanks",className:"form-control form-control-sm",onChange:function(e){return _this2.onAttrChange(e.target.value)},defaultValue:this.props.action.getIn(["content","attr"])}))),_react.default.createElement("div",{className:"col-2"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Condition"),_react.default.createElement("select",{className:"form-control form-control-sm",onChange:function(e){return _this2.onConditionChange(e.target.value)},defaultValue:this.props.action.getIn(["content","comp"])},_react.default.createElement("option",{value:""},"--Choose--"),_react.default.createElement("option",{value:"gt"},">"),_react.default.createElement("option",{value:"gte"},">="),_react.default.createElement("option",{value:"lt"},"<"),_react.default.createElement("option",{value:"lte"},"<="),_react.default.createElement("option",{value:"eq"},"="),_react.default.createElement("option",{value:"neq"},"!="),_react.default.createElement("option",{value:"like"},"Text like"),_react.default.createElement("option",{value:"notlike"},"Text not like"),_react.default.createElement("option",{value:"contains"},"Contains")))),_react.default.createElement("div",{className:"col-4"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Value"),_react.default.createElement("input",{type:"text",placeholder:"",className:"form-control form-control-sm",onChange:function(e){return _this2.onValChange(e.target.value)},defaultValue:this.props.action.getIn(["content","val"])}))),_react.default.createElement("div",{className:"col-2"},_react.default.createElement("div",null,_react.default.createElement("label",null," ")),_react.default.createElement("button",{type:"button",className:"btn btn-block btn-warning btn-sm",onClick:this.deleteField.bind(this)},"Delete")))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeActionConditionItem}(_react.Component);exports.default=_default},{"../NodeTriggerList":41,react:146}],46:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerList=(obj=require("../NodeTriggerList"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeEventActionTypeItem,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeEventActionTypeItem);function NodeEventActionTypeItem(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeEventActionTypeItem),(_this=_super.call(this,props)).onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeEventActionTypeItem,(protoProps=[{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"upField",value:function(){this.props.onMoveUpField(this.props.id)}},{key:"downField",value:function(){this.props.onMoveDownField(this.props.id)}},{key:"onchangeAttr",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Event identifier"),_react.default.createElement("input",{className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["identifier"],value:e.target.value})},type:"text",defaultValue:this.props.button.getIn(["content","identifier"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Trigger to execute"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["trigger_id"],value:e})},payload:this.props.button.getIn(["content","trigger_id"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-right",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{type:"button",className:"btn btn-warning btn-sm",onClick:this.deleteField.bind(this)},"Delete"))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",null)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeEventActionTypeItem}(_react.Component);exports.default=_default},{"../NodeTriggerList":41,react:146}],47:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerList=(obj=require("../NodeTriggerList"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeActionIntentItem,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeActionIntentItem);function NodeActionIntentItem(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeActionIntentItem),(_this=_super.call(this,props)).onIncludeWordsChange=_this.onIncludeWordsChange.bind(_assertThisInitialized(_this)),_this.onExcludeWordsChange=_this.onExcludeWordsChange.bind(_assertThisInitialized(_this)),_this.onTypos=_this.onTypos.bind(_assertThisInitialized(_this)),_this.onTyposExc=_this.onTyposExc.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeActionIntentItem,(protoProps=[{key:"onIncludeWordsChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","words"],value:payload})}},{key:"onMatchIncludeWordsChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","words_match"],value:payload})}},{key:"onExcludeWordsChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","exc_words"],value:payload})}},{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"onchangeAttr",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["content"].concat(e.path),value:e.value})}},{key:"onTypos",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","words_typo"],value:payload})}},{key:"onTyposExc",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","exc_words_typo"],value:payload})}},{key:"render",value:function(){var _this2=this;return _react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",null)),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Should include any of these words"),_react.default.createElement("input",{type:"text",placeholder:"yes, thanks",className:"form-control form-control-sm",onChange:function(e){return _this2.onIncludeWordsChange(e.target.value)},defaultValue:this.props.action.getIn(["content","words"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"But not any of these"),_react.default.createElement("input",{type:"text",placeholder:"no, nop",className:"form-control form-control-sm",onChange:function(e){return _this2.onExcludeWordsChange(e.target.value)},defaultValue:this.props.action.getIn(["content","exc_words"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Or preg match, new match per line"),_react.default.createElement("textarea",{className:"form-control form-control-sm",placeholder:"Match rule ==> Matched item number to use ==> identifier",onChange:function(e){return _this2.onMatchIncludeWordsChange(e.target.value)},defaultValue:this.props.action.getIn(["content","words_match"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Number of typos allowed"),_react.default.createElement("input",{type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onTypos(e.target.value)},defaultValue:this.props.action.getIn(["content","words_typo"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Number of typos allowed"),_react.default.createElement("input",{type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onTyposExc(e.target.value)},defaultValue:this.props.action.getIn(["content","exc_words_typo"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["only_these"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","only_these"])})," Should include only words from above, not any."),_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["exec_insta"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","exec_insta"])})," Do not schedule execution of this but execute it instantly. Blocks execution of all other responses and checks."),_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["exec_cont"],value:e.target.checked})},defaultChecked:this.props.action.getIn(["content","exec_cont"])})," Continue workflow if stop is returned from executed trigger."),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Schedule this trigger for execution"),_react.default.createElement(_NodeTriggerList.default,{onSetPayload:function(e){return _this2.onchangeAttr({path:["trigger_id"],value:e})},payload:this.props.action.getIn(["content","trigger_id"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-right",role:"group","aria-label":"Trigger actions"},_react.default.createElement("button",{className:"btn btn-warning btn-sm",onClick:this.deleteField.bind(this)},"Delete"))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeActionIntentItem}(_react.Component);exports.default=_default},{"../NodeTriggerList":41,react:146}],48:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionQuickReplyPayload=_interopRequireDefault(require("../NodeTriggerActionQuickReplyPayload")),_NodeTriggerActionQuickReply=_interopRequireDefault(require("../NodeTriggerActionQuickReply")),_shortid=_interopRequireDefault(require("shortid"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeActionListItem,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeActionListItem);function NodeActionListItem(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeActionListItem),(_this=_super.call(this,props)).changeType=_this.changeType.bind(_assertThisInitialized(_this)),_this.onPayloadChange=_this.onPayloadChange.bind(_assertThisInitialized(_this)),_this.onChangeFieldType=_this.onChangeFieldType.bind(_assertThisInitialized(_this)),_this.onPayloadAttrChange=_this.onPayloadAttrChange.bind(_assertThisInitialized(_this)),_this.onChangeMainAttr=_this.onChangeMainAttr.bind(_assertThisInitialized(_this)),_this.onQuickReplyNameChange=_this.onQuickReplyNameChange.bind(_assertThisInitialized(_this)),_this.onDeleteQuickReply=_this.onDeleteQuickReply.bind(_assertThisInitialized(_this)),_this.onPayloadButtonAttrChange=_this.onPayloadButtonAttrChange.bind(_assertThisInitialized(_this)),_this.onQuickReplyPayloadChange=_this.onQuickReplyPayloadChange.bind(_assertThisInitialized(_this)),_this.onQuickReplyPayloadTypeChange=_this.onQuickReplyPayloadTypeChange.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeActionListItem,(protoProps=[{key:"changeType",value:function(e){this.props.onChangeType({id:this.props.id,type:e.target.value})}},{key:"onChangeMainAttr",value:function(attr,val){this.props.onChangeFieldAttr({id:this.props.id,path:["content",attr],value:val})}},{key:"onPayloadChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content","payload"],value:payload})}},{key:"onChangeFieldType",value:function(type){this.props.onChangeFieldAttr({id:this.props.id,path:["type"],value:type})}},{key:"onPayloadAttrChange",value:function(payload){this.props.onChangeFieldAttr({id:this.props.id,path:["content",e.payload.attr],value:e.payload.value})}},{key:"addElementButton",value:function(){this.props.addSubelement({path:[this.props.id,"buttons"],default:{_id:_shortid.default.generate(),type:"url",content:{name:"New button",payload:""}}})}},{key:"deleteField",value:function(){this.props.onDeleteField(this.props.id)}},{key:"upField",value:function(){this.props.onMoveUpField(this.props.id)}},{key:"downField",value:function(){this.props.onMoveDownField(this.props.id)}},{key:"onQuickReplyNameChange",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["buttons",e.id,"content","name"],value:e.value})}},{key:"onDeleteQuickReply",value:function(e){this.props.onDeleteSubField({path:[this.props.id,"buttons",e.id]})}},{key:"onPayloadButtonAttrChange",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["buttons",e.id,"content",e.payload.attr],value:e.payload.value})}},{key:"onQuickReplyPayloadChange",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["buttons",e.id,"content","payload"],value:e.value})}},{key:"onQuickReplyPayloadTypeChange",value:function(e){this.props.onChangeFieldAttr({id:this.props.id,path:["buttons",e.id,"type"],value:e.value})}},{key:"render",value:function(){var _this2=this,button_list=[];return this.props.item.hasIn(["buttons"])&&(button_list=this.props.item.getIn(["buttons"]).map((function(field,index){return _react.default.createElement(_NodeTriggerActionQuickReply.default,{id:index,key:field.get("_id"),onPayloadTypeChange:_this2.onQuickReplyPayloadTypeChange,onPayloadChange:_this2.onQuickReplyPayloadChange,onPayloadAttrChange:_this2.onPayloadButtonAttrChange,reply:field,deleteReply:_this2.onDeleteQuickReply,onNameChange:_this2.onQuickReplyNameChange})}))),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,this.props.id+1,". Title*"),_react.default.createElement("input",{className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("title",e.target.value)},type:"text",defaultValue:this.props.item.getIn(["content","title"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Subtitle*"),_react.default.createElement("input",{className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("subtitle",e.target.value)},type:"text",defaultValue:this.props.item.getIn(["content","subtitle"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Image URL"),_react.default.createElement("input",{className:"form-control form-control-sm",onChange:function(e){return _this2.onChangeMainAttr("img",e.target.value)},type:"text",defaultValue:this.props.item.getIn(["content","img"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement(_NodeTriggerActionQuickReplyPayload.default,{onPayloadAttrChange:this.onPayloadAttrChange,onPayloadTypeChange:this.onChangeFieldType,onPayloadChange:this.onPayloadChange,payloadType:this.props.item.get("type"),currentPayload:this.props.item.getIn(["content"])}))),_react.default.createElement("div",{className:"col-12"},button_list),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"btn-group float-left",role:"group","aria-label":"Trigger actions"},0==this.props.isFirst&&_react.default.createElement("a",{className:"btn btn-secondary btn-sm",onClick:this.upField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_up")),0==this.props.isLast&&_react.default.createElement("a",{className:"btn btn-secondary btn-sm",onClick:this.downField.bind(this)},_react.default.createElement("i",{className:"material-icons mr-0"},"keyboard_arrow_down"))),_react.default.createElement("div",{className:"btn-group float-right",role:"group","aria-label":"Trigger actions"},_react.default.createElement("a",{className:"btn btn-info btn-sm",onClick:this.addElementButton.bind(this)},"Add element button"),_react.default.createElement("a",{className:"btn btn-warning btn-sm",onClick:this.deleteField.bind(this)},"Delete"))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",null)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeActionListItem}(_react.Component);exports.default=_default},{"../NodeTriggerActionQuickReply":29,"../NodeTriggerActionQuickReplyPayload":30,react:146,shortid:158}],49:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerPayloadList=(obj=require("../builder/NodeTriggerPayloadList"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeGroupTriggerEvent,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeGroupTriggerEvent);function NodeGroupTriggerEvent(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeGroupTriggerEvent),(_this=_super.call(this,props)).typeChange=_this.typeChange.bind(_assertThisInitialized(_this)),_this.textChange=_this.textChange.bind(_assertThisInitialized(_this)),_this.textChangeExc=_this.textChangeExc.bind(_assertThisInitialized(_this)),_this.payloadChange=_this.payloadChange.bind(_assertThisInitialized(_this)),_this.deleteEvent=_this.deleteEvent.bind(_assertThisInitialized(_this)),_this.onchangeAttr=_this.onchangeAttr.bind(_assertThisInitialized(_this)),_this}return Constructor=NodeGroupTriggerEvent,(protoProps=[{key:"typeChange",value:function(e){this.props.updateEvent(this.props.event.set("type",e.target.value))}},{key:"textChange",value:function(e){this.props.updateEvent(this.props.event.set("pattern",e.target.value))}},{key:"payloadChange",value:function(payload){this.props.updateEvent(this.props.event.set("pattern",payload))}},{key:"textChangeExc",value:function(e){this.props.updateEvent(this.props.event.set("pattern_exc",e.target.value))}},{key:"deleteEvent",value:function(){this.props.deleteEvent(this.props.event)}},{key:"onchangeAttr",value:function(payload){this.props.updateEvent(this.props.event.setIn(payload.path,payload.value))}},{key:"render",value:function(){var typeRender,_this2=this;return typeRender=0==this.props.event.get("type")?_react.default.createElement("input",{onChange:this.textChange,placeholder:"Matching text phrase",type:"text",className:"form-control form-control-sm",value:this.props.event.get("pattern")}):2==this.props.event.get("type")?_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Should include any of these words"),_react.default.createElement("input",{type:"text",placeholder:"yes, thanks",className:"form-control form-control-sm",onChange:this.textChange,value:this.props.event.get("pattern")}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"But not any of these"),_react.default.createElement("input",{type:"text",placeholder:"no, nop",className:"form-control form-control-sm",onChange:this.textChangeExc,value:this.props.event.get("pattern_exc")}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Typos number (include words)"),_react.default.createElement("input",{type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["configuration_array","words_typo"],value:e.target.value})},defaultValue:this.props.event.getIn(["configuration_array","words_typo"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Typos number (exclude words)"),_react.default.createElement("input",{type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["configuration_array","exc_words_typo"],value:e.target.value})},defaultValue:this.props.event.getIn(["configuration_array","exc_words_typo"])}))),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("label",null,_react.default.createElement("input",{type:"checkbox",onChange:function(e){return _this2.onchangeAttr({path:["configuration_array","only_these"],value:e.target.checked})},defaultChecked:this.props.event.getIn(["configuration_array","only_these"])})," Should include only words from above, not any."))):_react.default.createElement(_NodeTriggerPayloadList.default,{showOptional:!0,onSetPayload:this.payloadChange,payload:this.props.event.get("pattern")}),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-12"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-10"},_react.default.createElement("label",null,"Type")),_react.default.createElement("div",{className:"col-2"},_react.default.createElement("a",{className:"float-right",onClick:this.deleteEvent},_react.default.createElement("i",{className:"material-icons mr-0"},"delete")))),_react.default.createElement("select",{className:"form-control form-control-sm",defaultValue:this.props.event.get("type"),onChange:this.typeChange},_react.default.createElement("option",{value:"0"},"Text"),_react.default.createElement("option",{value:"1"},"Click"),_react.default.createElement("option",{value:"2"},"Custom text matching"))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Chat start behaviour"),_react.default.createElement("select",{className:"form-control form-control-sm",defaultValue:this.props.event.get("on_start_type"),onChange:function(e){return _this2.onchangeAttr({path:["on_start_type"],value:e.target.value})}},_react.default.createElement("option",{value:"0"},"Do not check on chat start"),_react.default.createElement("option",{value:"1"},"Instant execution (Executes and continues workflow)"),_react.default.createElement("option",{value:"2"},"Instant execution and block (executes and blocks further triggers execution)"),_react.default.createElement("option",{value:"3"},"Instant execution and continue if stop is returned from this trigger"),_react.default.createElement("option",{value:"4"},"Schedule (schedules for further execution trigger)"))),_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Priority of start check"),_react.default.createElement("input",{title:"Lowest rank events will be checked first",type:"text",placeholder:"0",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["priority"],value:e.target.value})},defaultValue:this.props.event.getIn(["priority"])})),_react.default.createElement("div",{className:"row"},_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Available for these departments"),_react.default.createElement("input",{title:"Separated by commas E.g 1,2,3",type:"text",placeholder:"Separated by commas E.g 1,2,3",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["configuration_array","dep_inc"],value:e.target.value})},defaultValue:this.props.event.getIn(["configuration_array","dep_inc"])}))),_react.default.createElement("div",{className:"col-6"},_react.default.createElement("div",{className:"form-group"},_react.default.createElement("label",null,"Disabled for these departments"),_react.default.createElement("input",{title:"Separated by commas E.g 1,2,3",type:"text",placeholder:"Separated by commas E.g 1,2,3",className:"form-control form-control-sm",onChange:function(e){return _this2.onchangeAttr({path:["configuration_array","dep_exc"],value:e.target.value})},defaultValue:this.props.event.getIn(["configuration_array","dep_exc"])}))))),_react.default.createElement("div",{className:"col-12"},typeRender),_react.default.createElement("div",{className:"col-12"},_react.default.createElement("hr",null)))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeGroupTriggerEvent}(_react.Component);exports.default=_default},{"../builder/NodeTriggerPayloadList":42,react:146}],50:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionButtonsPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionButtonsPreview);function NodeTriggerActionButtonsPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionButtonsPreview),_super.call(this,props)}return Constructor=NodeTriggerActionButtonsPreview,(protoProps=[{key:"render",value:function(){return this.props.action.hasIn(["content","buttons"])?_react.default.createElement("div",null,_react.default.createElement("div",{className:"message-row message-admin operator-changes"},_react.default.createElement("div",{className:"msg-date"},"18:10:45"),_react.default.createElement("span",{className:"usr-tit op-tit"},_react.default.createElement("i",{className:"material-icons chat-operators mi-fs15 mr-0"},""),"Operator"),_react.default.createElement("div",{className:"msg-body"},this.props.action.getIn(["content","buttons_options","message"]))),_react.default.createElement("ul",{className:"bot-btn-list"},this.props.action.getIn(["content","buttons"]).map((function(item,index){return _react.default.createElement("li",{key:index},_react.default.createElement("a",{href:"#"},"url"==item.get("type")&&_react.default.createElement("i",{className:"material-icons"},"open_in_new"),item.getIn(["content","name"])))})))):null}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionButtonsPreview}(_react.Component);exports.default=_default},{react:146}],51:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));(obj=require("./NodeTriggerActionQuickReplyListPreview"))&&obj.__esModule;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionGenericPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionGenericPreview);function NodeTriggerActionGenericPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionGenericPreview),_super.call(this,props)}return Constructor=NodeTriggerActionGenericPreview,(protoProps=[{key:"render",value:function(){return this.props.action.hasIn(["content","list"])?_react.default.createElement("div",{className:"generic-carousel"},this.props.action.getIn(["content","list"]).map((function(item,index){return _react.default.createElement("div",{className:"generic-bubble-item",key:index},_react.default.createElement("div",{className:"generic-bubble-content"},""!=item.getIn(["content","img"])&&_react.default.createElement("img",{className:"img-fluid",src:item.getIn(["content","img"])}),_react.default.createElement("h4",null,item.getIn(["content","title"])),_react.default.createElement("p",null,item.getIn(["content","subtitle"])),item.hasIn(["buttons"])&&_react.default.createElement("ul",{className:"bot-btn-list"},item.getIn(["buttons"]).map((function(item,index){return _react.default.createElement("li",{key:index},_react.default.createElement("a",{href:"#"},"url"==item.get("type")&&_react.default.createElement("i",{className:"material-icons"},"open_in_new"),item.getIn(["content","name"])))})))))}))):null}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionGenericPreview}(_react.Component);exports.default=_default},{"./NodeTriggerActionQuickReplyListPreview":54,react:146}],52:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionQuickReplyListPreview=(obj=require("./NodeTriggerActionQuickReplyListPreview"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionListPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionListPreview);function NodeTriggerActionListPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionListPreview),_super.call(this,props)}return Constructor=NodeTriggerActionListPreview,(protoProps=[{key:"render",value:function(){if(this.props.action.hasIn(["content","list"])){var listClass="list-group-element",compactStyle=!1;return this.props.action.hasIn(["content","list_options","no_highlight"])&&1==this.props.action.getIn(["content","list_options","no_highlight"])?(listClass+=" compact",compactStyle=!0):listClass+=" large",_react.default.createElement("div",{className:"list-group"},this.props.action.getIn(["content","list"]).map((function(item,index){return _react.default.createElement("div",{className:listClass,key:index},0==compactStyle&&0==index&&""!=item.getIn(["content","img"])&&_react.default.createElement("div",{className:"element-background",style:{backgroundImage:"url(".concat(item.getIn(["content","img"]),")")}}),_react.default.createElement("div",{className:"row element-description-row"},_react.default.createElement("div",{className:"col-9"},_react.default.createElement("div",{className:"element-description"},_react.default.createElement("h4",null,item.getIn(["content","title"])),_react.default.createElement("div",null,item.getIn(["content","subtitle"])),item.hasIn(["buttons"])&&_react.default.createElement(_NodeTriggerActionQuickReplyListPreview.default,{items:item.getIn(["buttons"])}))),_react.default.createElement("div",{className:"col-3"},""!=item.getIn(["content","img"])&&(0!==index||1==compactStyle)&&_react.default.createElement("img",{className:"float-right img-fluid",src:item.getIn(["content","img"])}))))})),this.props.action.hasIn(["content","quick_replies"])&&this.props.action.getIn(["content","quick_replies"]).map((function(item,index){return _react.default.createElement("div",{className:listClass+" button-item",key:index},_react.default.createElement("a",{key:index},"url"==item.get("type")&&_react.default.createElement("i",{className:"material-icons"},"open_in_new"),item.getIn(["content","name"])))})))}return null}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionListPreview}(_react.Component);exports.default=_default},{"./NodeTriggerActionQuickReplyListPreview":54,react:146}],53:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionPredefinedPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionPredefinedPreview);function NodeTriggerActionPredefinedPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionPredefinedPreview),_super.call(this,props)}return Constructor=NodeTriggerActionPredefinedPreview,(protoProps=[{key:"render",value:function(){return _react.default.createElement("div",null,_react.default.createElement("button",{className:"btn btn-secondary"},_react.default.createElement("i",{className:"material-icons"},"play_arrow"),"Execute trigger - ",this.props.action.getIn(["content","payload"])))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionPredefinedPreview}(_react.Component);exports.default=_default},{react:146}],54:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionQuickReplyListPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionQuickReplyListPreview);function NodeTriggerActionQuickReplyListPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionQuickReplyListPreview),_super.call(this,props)}return Constructor=NodeTriggerActionQuickReplyListPreview,(protoProps=[{key:"render",value:function(){return this.props.items?_react.default.createElement("div",{className:"gen-btn-list"},this.props.items.map((function(item,index){return _react.default.createElement("a",{key:index,className:"btn btn-secondary btn-sm"},"url"==item.get("type")&&_react.default.createElement("i",{className:"material-icons"},"open_in_new"),item.getIn(["content","name"]))}))):null}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionQuickReplyListPreview}(_react.Component);exports.default=_default},{react:146}],55:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react")),_NodeTriggerActionQuickReplyListPreview=(obj=require("./NodeTriggerActionQuickReplyListPreview"))&&obj.__esModule?obj:{default:obj};function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionTextPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionTextPreview);function NodeTriggerActionTextPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionTextPreview),_super.call(this,props)}return Constructor=NodeTriggerActionTextPreview,(protoProps=[{key:"render",value:function(){return _react.default.createElement("div",null,_react.default.createElement("div",{className:"message-row message-admin operator-changes"},_react.default.createElement("div",{className:"msg-date"},"18:10:45"),_react.default.createElement("span",{className:"usr-tit op-tit"},_react.default.createElement("i",{className:"material-icons chat-operators mi-fs15 mr-0"},""),"Operator"),_react.default.createElement("div",{className:"msg-body"},this.props.action.getIn(["content","text"]))),_react.default.createElement(_NodeTriggerActionQuickReplyListPreview.default,{items:this.props.action.getIn(["content","quick_replies"])}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionTextPreview}(_react.Component);exports.default=_default},{"./NodeTriggerActionQuickReplyListPreview":54,react:146}],56:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionTypingPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionTypingPreview);function NodeTriggerActionTypingPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionTypingPreview),_super.call(this,props)}return Constructor=NodeTriggerActionTypingPreview,(protoProps=[{key:"render",value:function(){return _react.default.createElement("div",null,_react.default.createElement("div",{className:"message-row message-admin message-row-typing"},_react.default.createElement("div",{className:"msg-body"},""!=this.props.action.getIn(["content","text"])?this.props.action.getIn(["content","text"]):"Typing...",_react.default.createElement("br",null),_react.default.createElement("b",null,"for ",this.props.action.getIn(["content","duration"])," seconds."))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionTypingPreview}(_react.Component);exports.default=_default},{react:146}],57:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_react=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("react"));(obj=require("./NodeTriggerActionQuickReplyListPreview"))&&obj.__esModule;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var _default=function(_Component){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(NodeTriggerActionVideoPreview,_Component);var Constructor,protoProps,staticProps,_super=_createSuper(NodeTriggerActionVideoPreview);function NodeTriggerActionVideoPreview(props){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,NodeTriggerActionVideoPreview),_super.call(this,props)}return Constructor=NodeTriggerActionVideoPreview,(protoProps=[{key:"render",value:function(){return _react.default.createElement("div",null,_react.default.createElement("div",{className:"message-row message-admin operator-changes"},_react.default.createElement("div",{className:"msg-date"},"18:10:45"),_react.default.createElement("span",{className:"usr-tit op-tit"},_react.default.createElement("i",{className:"material-icons chat-operators mi-fs15 mr-0"},""),"Operator"),_react.default.createElement("div",{className:"msg-body"},_react.default.createElement("br",null),_react.default.createElement("div",{className:"embed-responsive embed-responsive-16by9"},_react.default.createElement("video",{className:"embed-responsive-item",autoPlay:this.props.action.getIn(["content","video_options","autoplay"]),controls:this.props.action.getIn(["content","video_options","controls"])},_react.default.createElement("source",{src:this.props.action.getIn(["content","payload"])}))))))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),NodeTriggerActionVideoPreview}(_react.Component);exports.default=_default},{"./NodeTriggerActionQuickReplyListPreview":54,react:146}],58:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UPDATE_TRIGGER_TYPE=exports.UPDATE_TRIGGER_NAME=exports.UPDATE_TRIGGER_EVENT=exports.UPDATE_PAYLOADS_FULFILLED=exports.UPDATE_GROUP_FULFILLED=exports.SET_IN_PROGRESS_TRIGGER=exports.SET_GROUP_TRIGGER_EVENT=exports.SET_DEFAULT_UNKNOWN_TRIGGER=exports.SET_DEFAULT_UNKNOWN_BTN_TRIGGER=exports.SET_DEFAULT_TRIGGER=exports.SET_DEFAULT_ALWAYS_TRIGGER=exports.SET_AS_ARGUMENT_TRIGGER=exports.SAVE_TRIGGER=exports.REMOVE_TRIGGER_RESPONSE=exports.REMOVE_TRIGGER=exports.REMOVE_SUBELEMENT=exports.MOVE_UP_SUBELEMENT=exports.MOVE_UP=exports.MOVE_DOWN_SUBELEMENT=exports.MOVE_DOWN=exports.LOAD_USE_CASES_TRIGGER_FULFILLED=exports.INIT_BOT_REST_API_METHODS=exports.INIT_BOT_FULFILLED=exports.INIT_BOT_ARGUMENTS_REJECTED=exports.INIT_BOT_ARGUMENTS_FULFILLED=exports.HANDLE_CONTENT_CHANGE=exports.HANDLE_ADD_QUICK_REPLY_REMOVE=exports.HANDLE_ADD_QUICK_REPLY=exports.FETCH_TRIGGER_RESPONSE_REJECTED=exports.FETCH_TRIGGER_RESPONSE_FULFILLED=exports.FETCH_TRIGGER_RESPONSE=exports.FETCH_NODE_GROUP_TRIGGERS_REJECTED=exports.FETCH_NODE_GROUP_TRIGGERS_FULFILLED=exports.FETCH_NODE_GROUP_TRIGGERS=exports.FETCH_NODE_GROUPS_REJECTED=exports.FETCH_NODE_GROUPS_FULFILLED=exports.FETCH_NODE_GROUPS=exports.DELETE_TRIGGER_GROUP=exports.DELETE_TRIGGER_EVENT=exports.CANCEL_TRIGGER=exports.ADD_TRIGGER_RESPONSE=exports.ADD_TRIGGER_FULFILLED=exports.ADD_TRIGGER_EVENT_FULFILLED=exports.ADD_SUBELEMENT=exports.ADD_PAYLOAD_TRIGGERS_FULFILLED=exports.ADD_GROUP_FULFILLED=void 0;exports.FETCH_NODE_GROUPS="FETCH_NODE_GROUPS";exports.FETCH_NODE_GROUPS_FULFILLED="FETCH_NODE_GROUPS_FULFILLED";exports.FETCH_NODE_GROUPS_REJECTED="FETCH_NODE_GROUPS_REJECTED";exports.ADD_GROUP_FULFILLED="ADD_GROUP_FULFILLED";exports.UPDATE_GROUP_FULFILLED="UPDATE_GROUP_FULFILLED";exports.DELETE_TRIGGER_GROUP="DELETE_TRIGGER_GROUP";exports.INIT_BOT_FULFILLED="INIT_BOT_FULFILLED";exports.FETCH_NODE_GROUP_TRIGGERS="FETCH_NODE_GROUP_TRIGGERS";exports.FETCH_NODE_GROUP_TRIGGERS_FULFILLED="FETCH_NODE_GROUP_TRIGGERS_FULFILLED";exports.FETCH_NODE_GROUP_TRIGGERS_REJECTED="FETCH_NODE_GROUP_TRIGGERS_REJECTED";exports.FETCH_TRIGGER_RESPONSE="FETCH_TRIGGER_RESPONSE";exports.FETCH_TRIGGER_RESPONSE_FULFILLED="FETCH_TRIGGER_RESPONSE_FULFILLED";exports.FETCH_TRIGGER_RESPONSE_REJECTED="FETCH_TRIGGER_RESPONSE_REJECTED";exports.UPDATE_TRIGGER_NAME="UPDATE_TRIGGER_NAME";exports.UPDATE_TRIGGER_TYPE="UPDATE_TRIGGER_TYPE";exports.ADD_TRIGGER_FULFILLED="ADD_TRIGGER_FULFILLED";exports.ADD_TRIGGER_RESPONSE="ADD_TRIGGER_RESPONSE";exports.HANDLE_CONTENT_CHANGE="HANDLE_CONTENT_CHANGE";exports.SAVE_TRIGGER="SAVE_TRIGGER";exports.REMOVE_TRIGGER="REMOVE_TRIGGER";exports.CANCEL_TRIGGER="CANCEL_TRIGGER";exports.UPDATE_TRIGGER_EVENT="UPDATE_TRIGGER_EVENT";exports.ADD_TRIGGER_EVENT_FULFILLED="ADD_TRIGGER_EVENT_FULFILLED";exports.DELETE_TRIGGER_EVENT="DELETE_TRIGGER_EVENT";exports.HANDLE_ADD_QUICK_REPLY="HANDLE_ADD_QUICK_REPLY";exports.HANDLE_ADD_QUICK_REPLY_REMOVE="HANDLE_ADD_QUICK_REPLY_REMOVE";exports.REMOVE_TRIGGER_RESPONSE="REMOVE_TRIGGER_RESPONSE";exports.ADD_PAYLOAD_TRIGGERS_FULFILLED="ADD_PAYLOAD_TRIGGERS_FULFILLED";exports.UPDATE_PAYLOADS_FULFILLED="UPDATE_PAYLOADS_FULFILLED";exports.SET_DEFAULT_TRIGGER="SET_DEFAULT_TRIGGER";exports.ADD_SUBELEMENT="ADD_SUBELEMENT";exports.REMOVE_SUBELEMENT="REMOVE_SUBELEMENT";exports.MOVE_UP_SUBELEMENT="MOVE_UP_SUBELEMENT";exports.MOVE_DOWN_SUBELEMENT="MOVE_DOWN_SUBELEMENT";exports.SET_DEFAULT_UNKNOWN_TRIGGER="SET_DEFAULT_UNKNOWN_TRIGGER";exports.SET_AS_ARGUMENT_TRIGGER="SET_AS_ARGUMENT_TRIGGER";exports.SET_DEFAULT_UNKNOWN_BTN_TRIGGER="SET_DEFAULT_UNKNOWN_BTN_TRIGGER";exports.SET_DEFAULT_ALWAYS_TRIGGER="SET_DEFAULT_ALWAYS_TRIGGER";exports.SET_IN_PROGRESS_TRIGGER="SET_IN_PROGRESS_TRIGGER";exports.INIT_BOT_ARGUMENTS_FULFILLED="INIT_BOT_ARGUMENTS_FULFILLED";exports.INIT_BOT_ARGUMENTS_REJECTED="INIT_BOT_ARGUMENTS_REJECTED";exports.LOAD_USE_CASES_TRIGGER_FULFILLED="LOAD_USE_CASES_TRIGGER_FULFILLED";exports.INIT_BOT_REST_API_METHODS="INIT_BOT_REST_API_METHODS";exports.SET_GROUP_TRIGGER_EVENT="SET_GROUP_TRIGGER_EVENT";exports.MOVE_UP="MOVE_UP";exports.MOVE_DOWN="MOVE_DOWN"},{}],59:[function(require,module,exports){"use strict";var _react=_interopRequireDefault(require("react")),_reactDom=_interopRequireDefault(require("react-dom")),_App=_interopRequireDefault(require("./App")),_reactRedux=require("react-redux"),_index=_interopRequireDefault(require("./store/index"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var root=document.getElementById("root");_reactDom.default.render(_react.default.createElement(_reactRedux.Provider,{store:_index.default},_react.default.createElement(_App.default,root.dataset)),root)},{"./App":1,"./store/index":64,react:146,"react-dom":112,"react-redux":131}],60:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_actionTypes=require("../constants/action-types"),_immutable=require("immutable"),_shortid=(obj=require("shortid"))&&obj.__esModule?obj:{default:obj};function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||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 _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}var initialState=(0,_immutable.fromJS)({currenttrigger:{},payloads:[],rest_api_calls:[],fetching:!1,fetched:!1,error:null}),_default=function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case _actionTypes.FETCH_TRIGGER_RESPONSE_FULFILLED:return state.set("currenttrigger",(0,_immutable.fromJS)(action.payload));case _actionTypes.FETCH_TRIGGER_RESPONSE_REJECTED:return state.set("fetching",!1).set("error",(0,_immutable.fromJS)(action.payload));case _actionTypes.UPDATE_TRIGGER_NAME:return state.setIn(["currenttrigger","name"],action.payload.get("name"));case _actionTypes.UPDATE_TRIGGER_TYPE:return state.setIn(["currenttrigger","actions",action.payload.id,"type"],action.payload.type);case _actionTypes.ADD_TRIGGER_RESPONSE:return state.updateIn(["currenttrigger","actions"],(function(actions){return actions.push((0,_immutable.fromJS)({_id:_shortid.default.generate(),type:"text",content:{text:""}}))}));case _actionTypes.REMOVE_TRIGGER_RESPONSE:return state.deleteIn(["currenttrigger","actions",action.payload.id]);case _actionTypes.HANDLE_CONTENT_CHANGE:return state.setIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path),action.payload.value);case _actionTypes.ADD_SUBELEMENT:return state.getIn(["currenttrigger","actions",action.payload.id]).hasIn(action.payload.path)?state.updateIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path),(function(elements){return elements.push((0,_immutable.fromJS)(action.payload.default))})):state.setIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path),(0,_immutable.fromJS)([action.payload.default]));case _actionTypes.REMOVE_SUBELEMENT:return state.deleteIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path));case _actionTypes.MOVE_UP_SUBELEMENT:var source=state.getIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path)).get(action.payload.index),destination=state.getIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path)).get(action.payload.index-1);return state.setIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path).concat([action.payload.index]),destination).setIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path).concat([action.payload.index-1]),source);case _actionTypes.MOVE_DOWN_SUBELEMENT:var _source=state.getIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path)).get(action.payload.index),_destination=state.getIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path)).get(action.payload.index+1);return state.setIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path).concat([action.payload.index]),_destination).setIn(["currenttrigger","actions",action.payload.id].concat(action.payload.path).concat([action.payload.index+1]),_source);case _actionTypes.MOVE_UP:var _source2=state.getIn(["currenttrigger","actions"]).get(action.payload.index),_destination2=state.getIn(["currenttrigger","actions"]).get(action.payload.index-1);return state.setIn(["currenttrigger","actions"].concat([action.payload.index]),_destination2).setIn(["currenttrigger","actions"].concat([action.payload.index-1]),_source2);case _actionTypes.MOVE_DOWN:var _source3=state.getIn(["currenttrigger","actions"]).get(action.payload.index),_destination3=state.getIn(["currenttrigger","actions"]).get(action.payload.index+1);return state.setIn(["currenttrigger","actions"].concat([action.payload.index]),_destination3).setIn(["currenttrigger","actions"].concat([action.payload.index+1]),_source3);case _actionTypes.LOAD_USE_CASES_TRIGGER_FULFILLED:return state.setIn(["currenttrigger","use_cases"],(0,_immutable.fromJS)(action.payload));case _actionTypes.HANDLE_ADD_QUICK_REPLY:return state.getIn(["currenttrigger","actions",action.payload.id,"content"]).has("quick_replies")?state.updateIn(["currenttrigger","actions",action.payload.id,"content","quick_replies"],(function(quick_replies){return quick_replies.push((0,_immutable.fromJS)({_id:_shortid.default.generate(),type:"button",content:{name:"",payload:""}}))})):state.setIn(["currenttrigger","actions",action.payload.id,"content","quick_replies"],(0,_immutable.fromJS)([{_id:_shortid.default.generate(),type:"button",content:{name:"",payload:""}}]));case _actionTypes.HANDLE_ADD_QUICK_REPLY_REMOVE:var actions=["currenttrigger","actions",action.payload.id];return state.deleteIn([].concat(actions,_toConsumableArray(action.payload.path)));case _actionTypes.REMOVE_TRIGGER:case _actionTypes.CANCEL_TRIGGER:return state.getIn(["currenttrigger","id"])==action.payload.get("id")?state.set("currenttrigger",(0,_immutable.fromJS)({})):state;case _actionTypes.UPDATE_TRIGGER_EVENT:var indexOfListingToUpdate=state.getIn(["currenttrigger","events"]).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["currenttrigger","events",indexOfListingToUpdate],action.payload);case _actionTypes.ADD_TRIGGER_EVENT_FULFILLED:return state.updateIn(["currenttrigger","events"],(function(events){return events.push((0,_immutable.fromJS)(action.payload))}));case _actionTypes.DELETE_TRIGGER_EVENT:var _indexOfListingToUpdate=state.getIn(["currenttrigger","events"]).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.deleteIn(["currenttrigger","events",_indexOfListingToUpdate]);case _actionTypes.INIT_BOT_FULFILLED:return state.set("payloads",(0,_immutable.fromJS)(action.payload.payloads)).set("rest_api_calls",(0,_immutable.fromJS)(action.payload.rest_api_calls));case _actionTypes.INIT_BOT_REST_API_METHODS:var _indexOfListingToUpdate2=state.getIn(["rest_api_calls"]).findIndex((function(listing){return listing.get("id")===action.payload.id}));return state.setIn(["rest_api_calls",_indexOfListingToUpdate2,"methods"],(0,_immutable.fromJS)(action.payload.methods));case _actionTypes.INIT_BOT_ARGUMENTS_FULFILLED:return state.set("arguments",(0,_immutable.fromJS)(action.payload.arguments));case _actionTypes.ADD_PAYLOAD_TRIGGERS_FULFILLED:case _actionTypes.UPDATE_PAYLOADS_FULFILLED:return state.set("payloads",(0,_immutable.fromJS)(action.payload.payloads));default:return state}};exports.default=_default},{"../constants/action-types":58,immutable:102,shortid:158}],61:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _redux=require("redux"),_nodeGroupReducer=_interopRequireDefault(require("./nodeGroupReducer")),_nodeGroupTriggerReducer=_interopRequireDefault(require("./nodeGroupTriggerReducer")),_currentTriggerReducer=_interopRequireDefault(require("./currentTriggerReducer"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _default=(0,_redux.combineReducers)({nodegroups:_nodeGroupReducer.default,nodegrouptriggers:_nodeGroupTriggerReducer.default,currenttrigger:_currentTriggerReducer.default});exports.default=_default},{"./currentTriggerReducer":60,"./nodeGroupReducer":62,"./nodeGroupTriggerReducer":63,redux:151}],62:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pipe=exports.default=void 0;var _actionTypes=require("../constants/action-types"),_immutable=require("immutable"),initialState=(0,_immutable.fromJS)({nodegroups:[],fetching:!1,fetched:!1,error:null}),applyFn=function(state,fn){return fn(state)};exports.pipe=function(fns,state){return state.withMutations((function(s){return fns.reduce(applyFn,s)}))};var _default=function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case _actionTypes.FETCH_NODE_GROUPS:return state.set("fetching",!0);case _actionTypes.FETCH_NODE_GROUPS_FULFILLED:return state.set("fetching",!1).set("fetched",!0).set("nodegroups",(0,_immutable.fromJS)(action.payload));case _actionTypes.ADD_GROUP_FULFILLED:return state.set("fetched",!0).set("fetching",!1).update("nodegroups",(function(nodegroups){return nodegroups.push((0,_immutable.fromJS)(action.payload))}));case _actionTypes.DELETE_TRIGGER_GROUP:var indexOfListingToUpdate=state.get("nodegroups").findIndex((function(listing){return listing.get("id")===action.payload.groupId.id}));return state.deleteIn(["nodegroups",indexOfListingToUpdate]);case _actionTypes.UPDATE_GROUP_FULFILLED:var _indexOfListingToUpdate=state.get("nodegroups").findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegroups",_indexOfListingToUpdate],action.payload);case _actionTypes.FETCH_NODE_GROUPS_REJECTED:return state.set("fetching",!1).set("error",action.payload);default:return state}};exports.default=_default},{"../constants/action-types":58,immutable:102}],63:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _actionTypes=require("../constants/action-types"),_immutable=require("immutable"),initialState=(0,_immutable.fromJS)({nodegrouptriggers:{},fetching:!1,fetched:!1,error:null}),_default=function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case _actionTypes.FETCH_NODE_GROUP_TRIGGERS:return state.set("fetching",!1);case _actionTypes.FETCH_NODE_GROUP_TRIGGERS_FULFILLED:return state.setIn(["nodegrouptriggers",action.group_id],(0,_immutable.fromJS)(action.payload));case _actionTypes.FETCH_NODE_GROUP_TRIGGERS_REJECTED:return state.set("fetching",!1).set("error",(0,_immutable.fromJS)(action.payload));case _actionTypes.SAVE_TRIGGER:var indexOfListingToUpdate=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),indexOfListingToUpdate,"name"],action.payload.get("name"));case _actionTypes.REMOVE_TRIGGER:var _indexOfListingToUpdate=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.deleteIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate]);case _actionTypes.SET_GROUP_TRIGGER_EVENT:var _indexOfListingToUpdate2=state.get("nodegrouptriggers").get(action.group_id).findIndex((function(listing){return listing.get("id")===action.payload.get("id")})),newTrigger=state.getIn(["nodegrouptriggers",action.group_id,_indexOfListingToUpdate2]).set("group_id",action.payload.get("group_id"));return state.deleteIn(["nodegrouptriggers",action.group_id,_indexOfListingToUpdate2]).updateIn(["nodegrouptriggers",action.payload.get("group_id")],(function(triggers){return triggers.push(newTrigger)}));case _actionTypes.SET_DEFAULT_TRIGGER:var _indexOfListingToUpdate3=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate3,"default"],action.payload.get("default"));case _actionTypes.SET_DEFAULT_UNKNOWN_TRIGGER:var _indexOfListingToUpdate4=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate4,"default_unknown"],action.payload.get("default_unknown"));case _actionTypes.SET_IN_PROGRESS_TRIGGER:var _indexOfListingToUpdate5=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate5,"in_progress"],action.payload.get("in_progress"));case _actionTypes.SET_AS_ARGUMENT_TRIGGER:var _indexOfListingToUpdate6=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate6,"as_argument"],action.payload.get("as_argument"));case _actionTypes.SET_DEFAULT_UNKNOWN_BTN_TRIGGER:var _indexOfListingToUpdate7=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate7,"default_unknown_btn"],action.payload.get("default_unknown_btn"));case _actionTypes.SET_DEFAULT_ALWAYS_TRIGGER:var _indexOfListingToUpdate8=state.get("nodegrouptriggers").get(action.payload.get("group_id")).findIndex((function(listing){return listing.get("id")===action.payload.get("id")}));return state.setIn(["nodegrouptriggers",action.payload.get("group_id"),_indexOfListingToUpdate8,"default_always"],action.payload.get("default_always"));case _actionTypes.ADD_TRIGGER_FULFILLED:return state.updateIn(["nodegrouptriggers",action.payload.group_id],(function(triggers){return triggers.push((0,_immutable.fromJS)(action.payload))}));default:return state}};exports.default=_default},{"../constants/action-types":58,immutable:102}],64:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _redux=require("redux"),_index=_interopRequireDefault(require("../reducers/index")),_reduxThunk=(require("redux-logger"),_interopRequireDefault(require("redux-thunk"))),_reduxPromiseMiddleware=_interopRequireDefault(require("redux-promise-middleware"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var middleware=(0,_redux.applyMiddleware)(_reduxPromiseMiddleware.default,_reduxThunk.default),_default=(0,_redux.createStore)(_index.default,middleware);exports.default=_default},{"../reducers/index":61,redux:151,"redux-logger":147,"redux-promise-middleware":148,"redux-thunk":150}],65:[function(require,module,exports){module.exports=function(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj},module.exports.default=module.exports,module.exports.__esModule=!0},{}],66:[function(require,module,exports){function _extends(){return module.exports=_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},module.exports.default=module.exports,module.exports.__esModule=!0,_extends.apply(this,arguments)}module.exports=_extends,module.exports.default=module.exports,module.exports.__esModule=!0},{}],67:[function(require,module,exports){module.exports=function(obj){return obj&&obj.__esModule?obj:{default:obj}},module.exports.default=module.exports,module.exports.__esModule=!0},{}],68:[function(require,module,exports){var _typeof=require("@babel/runtime/helpers/typeof").default;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}module.exports=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj},module.exports.default=module.exports,module.exports.__esModule=!0},{"@babel/runtime/helpers/typeof":71}],69:[function(require,module,exports){var defineProperty=require("./defineProperty.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}module.exports=function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target},module.exports.default=module.exports,module.exports.__esModule=!0},{"./defineProperty.js":65}],70:[function(require,module,exports){module.exports=function(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target},module.exports.default=module.exports,module.exports.__esModule=!0},{}],71:[function(require,module,exports){function _typeof(obj){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(module.exports=_typeof=function(obj){return typeof obj},module.exports.default=module.exports,module.exports.__esModule=!0):(module.exports=_typeof=function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},module.exports.default=module.exports,module.exports.__esModule=!0),_typeof(obj)}module.exports=_typeof,module.exports.default=module.exports,module.exports.__esModule=!0},{}],72:[function(require,module,exports){module.exports=require("./lib/axios")},{"./lib/axios":74}],73:[function(require,module,exports){"use strict";var utils=require("./../utils"),settle=require("./../core/settle"),cookies=require("./../helpers/cookies"),buildURL=require("./../helpers/buildURL"),buildFullPath=require("../core/buildFullPath"),parseHeaders=require("./../helpers/parseHeaders"),isURLSameOrigin=require("./../helpers/isURLSameOrigin"),createError=require("../core/createError");module.exports=function(config){return new Promise((function(resolve,reject){var requestData=config.data,requestHeaders=config.headers,responseType=config.responseType;utils.isFormData(requestData)&&delete requestHeaders["Content-Type"];var request=new XMLHttpRequest;if(config.auth){var username=config.auth.username||"",password=config.auth.password?unescape(encodeURIComponent(config.auth.password)):"";requestHeaders.Authorization="Basic "+btoa(username+":"+password)}var fullPath=buildFullPath(config.baseURL,config.url);function onloadend(){if(request){var responseHeaders="getAllResponseHeaders"in request?parseHeaders(request.getAllResponseHeaders()):null,response={data:responseType&&"text"!==responseType&&"json"!==responseType?request.response:request.responseText,status:request.status,statusText:request.statusText,headers:responseHeaders,config:config,request:request};settle(resolve,reject,response),request=null}}if(request.open(config.method.toUpperCase(),buildURL(fullPath,config.params,config.paramsSerializer),!0),request.timeout=config.timeout,"onloadend"in request?request.onloadend=onloadend:request.onreadystatechange=function(){request&&4===request.readyState&&(0!==request.status||request.responseURL&&0===request.responseURL.indexOf("file:"))&&setTimeout(onloadend)},request.onabort=function(){request&&(reject(createError("Request aborted",config,"ECONNABORTED",request)),request=null)},request.onerror=function(){reject(createError("Network Error",config,null,request)),request=null},request.ontimeout=function(){var timeoutErrorMessage="timeout of "+config.timeout+"ms exceeded";config.timeoutErrorMessage&&(timeoutErrorMessage=config.timeoutErrorMessage),reject(createError(timeoutErrorMessage,config,config.transitional&&config.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",request)),request=null},utils.isStandardBrowserEnv()){var xsrfValue=(config.withCredentials||isURLSameOrigin(fullPath))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):void 0;xsrfValue&&(requestHeaders[config.xsrfHeaderName]=xsrfValue)}"setRequestHeader"in request&&utils.forEach(requestHeaders,(function(val,key){void 0===requestData&&"content-type"===key.toLowerCase()?delete requestHeaders[key]:request.setRequestHeader(key,val)})),utils.isUndefined(config.withCredentials)||(request.withCredentials=!!config.withCredentials),responseType&&"json"!==responseType&&(request.responseType=config.responseType),"function"==typeof config.onDownloadProgress&&request.addEventListener("progress",config.onDownloadProgress),"function"==typeof config.onUploadProgress&&request.upload&&request.upload.addEventListener("progress",config.onUploadProgress),config.cancelToken&&config.cancelToken.promise.then((function(cancel){request&&(request.abort(),reject(cancel),request=null)})),requestData||(requestData=null),request.send(requestData)}))}},{"../core/buildFullPath":80,"../core/createError":81,"./../core/settle":85,"./../helpers/buildURL":89,"./../helpers/cookies":91,"./../helpers/isURLSameOrigin":94,"./../helpers/parseHeaders":96,"./../utils":99}],74:[function(require,module,exports){"use strict";var utils=require("./utils"),bind=require("./helpers/bind"),Axios=require("./core/Axios"),mergeConfig=require("./core/mergeConfig");function createInstance(defaultConfig){var context=new Axios(defaultConfig),instance=bind(Axios.prototype.request,context);return utils.extend(instance,Axios.prototype,context),utils.extend(instance,context),instance}var axios=createInstance(require("./defaults"));axios.Axios=Axios,axios.create=function(instanceConfig){return createInstance(mergeConfig(axios.defaults,instanceConfig))},axios.Cancel=require("./cancel/Cancel"),axios.CancelToken=require("./cancel/CancelToken"),axios.isCancel=require("./cancel/isCancel"),axios.all=function(promises){return Promise.all(promises)},axios.spread=require("./helpers/spread"),axios.isAxiosError=require("./helpers/isAxiosError"),module.exports=axios,module.exports.default=axios},{"./cancel/Cancel":75,"./cancel/CancelToken":76,"./cancel/isCancel":77,"./core/Axios":78,"./core/mergeConfig":84,"./defaults":87,"./helpers/bind":88,"./helpers/isAxiosError":93,"./helpers/spread":97,"./utils":99}],75:[function(require,module,exports){"use strict";function Cancel(message){this.message=message}Cancel.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,module.exports=Cancel},{}],76:[function(require,module,exports){"use strict";var Cancel=require("./Cancel");function CancelToken(executor){if("function"!=typeof executor)throw new TypeError("executor must be a function.");var resolvePromise;this.promise=new Promise((function(resolve){resolvePromise=resolve}));var token=this;executor((function(message){token.reason||(token.reason=new Cancel(message),resolvePromise(token.reason))}))}CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.source=function(){var cancel;return{token:new CancelToken((function(c){cancel=c})),cancel:cancel}},module.exports=CancelToken},{"./Cancel":75}],77:[function(require,module,exports){"use strict";module.exports=function(value){return!(!value||!value.__CANCEL__)}},{}],78:[function(require,module,exports){"use strict";var utils=require("./../utils"),buildURL=require("../helpers/buildURL"),InterceptorManager=require("./InterceptorManager"),dispatchRequest=require("./dispatchRequest"),mergeConfig=require("./mergeConfig"),validator=require("../helpers/validator"),validators=validator.validators;function Axios(instanceConfig){this.defaults=instanceConfig,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios.prototype.request=function(config){"string"==typeof config?(config=arguments[1]||{}).url=arguments[0]:config=config||{},(config=mergeConfig(this.defaults,config)).method?config.method=config.method.toLowerCase():this.defaults.method?config.method=this.defaults.method.toLowerCase():config.method="get";var transitional=config.transitional;void 0!==transitional&&validator.assertOptions(transitional,{silentJSONParsing:validators.transitional(validators.boolean,"1.0.0"),forcedJSONParsing:validators.transitional(validators.boolean,"1.0.0"),clarifyTimeoutError:validators.transitional(validators.boolean,"1.0.0")},!1);var requestInterceptorChain=[],synchronousRequestInterceptors=!0;this.interceptors.request.forEach((function(interceptor){"function"==typeof interceptor.runWhen&&!1===interceptor.runWhen(config)||(synchronousRequestInterceptors=synchronousRequestInterceptors&&interceptor.synchronous,requestInterceptorChain.unshift(interceptor.fulfilled,interceptor.rejected))}));var promise,responseInterceptorChain=[];if(this.interceptors.response.forEach((function(interceptor){responseInterceptorChain.push(interceptor.fulfilled,interceptor.rejected)})),!synchronousRequestInterceptors){var chain=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(chain,requestInterceptorChain),chain=chain.concat(responseInterceptorChain),promise=Promise.resolve(config);chain.length;)promise=promise.then(chain.shift(),chain.shift());return promise}for(var newConfig=config;requestInterceptorChain.length;){var onFulfilled=requestInterceptorChain.shift(),onRejected=requestInterceptorChain.shift();try{newConfig=onFulfilled(newConfig)}catch(error){onRejected(error);break}}try{promise=dispatchRequest(newConfig)}catch(error){return Promise.reject(error)}for(;responseInterceptorChain.length;)promise=promise.then(responseInterceptorChain.shift(),responseInterceptorChain.shift());return promise},Axios.prototype.getUri=function(config){return config=mergeConfig(this.defaults,config),buildURL(config.url,config.params,config.paramsSerializer).replace(/^\?/,"")},utils.forEach(["delete","get","head","options"],(function(method){Axios.prototype[method]=function(url,config){return this.request(mergeConfig(config||{},{method:method,url:url,data:(config||{}).data}))}})),utils.forEach(["post","put","patch"],(function(method){Axios.prototype[method]=function(url,data,config){return this.request(mergeConfig(config||{},{method:method,url:url,data:data}))}})),module.exports=Axios},{"../helpers/buildURL":89,"../helpers/validator":98,"./../utils":99,"./InterceptorManager":79,"./dispatchRequest":82,"./mergeConfig":84}],79:[function(require,module,exports){"use strict";var utils=require("./../utils");function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function(fulfilled,rejected,options){return this.handlers.push({fulfilled:fulfilled,rejected:rejected,synchronous:!!options&&options.synchronous,runWhen:options?options.runWhen:null}),this.handlers.length-1},InterceptorManager.prototype.eject=function(id){this.handlers[id]&&(this.handlers[id]=null)},InterceptorManager.prototype.forEach=function(fn){utils.forEach(this.handlers,(function(h){null!==h&&fn(h)}))},module.exports=InterceptorManager},{"./../utils":99}],80:[function(require,module,exports){"use strict";var isAbsoluteURL=require("../helpers/isAbsoluteURL"),combineURLs=require("../helpers/combineURLs");module.exports=function(baseURL,requestedURL){return baseURL&&!isAbsoluteURL(requestedURL)?combineURLs(baseURL,requestedURL):requestedURL}},{"../helpers/combineURLs":90,"../helpers/isAbsoluteURL":92}],81:[function(require,module,exports){"use strict";var enhanceError=require("./enhanceError");module.exports=function(message,config,code,request,response){var error=new Error(message);return enhanceError(error,config,code,request,response)}},{"./enhanceError":83}],82:[function(require,module,exports){"use strict";var utils=require("./../utils"),transformData=require("./transformData"),isCancel=require("../cancel/isCancel"),defaults=require("../defaults");function throwIfCancellationRequested(config){config.cancelToken&&config.cancelToken.throwIfRequested()}module.exports=function(config){return throwIfCancellationRequested(config),config.headers=config.headers||{},config.data=transformData.call(config,config.data,config.headers,config.transformRequest),config.headers=utils.merge(config.headers.common||{},config.headers[config.method]||{},config.headers),utils.forEach(["delete","get","head","post","put","patch","common"],(function(method){delete config.headers[method]})),(config.adapter||defaults.adapter)(config).then((function(response){return throwIfCancellationRequested(config),response.data=transformData.call(config,response.data,response.headers,config.transformResponse),response}),(function(reason){return isCancel(reason)||(throwIfCancellationRequested(config),reason&&reason.response&&(reason.response.data=transformData.call(config,reason.response.data,reason.response.headers,config.transformResponse))),Promise.reject(reason)}))}},{"../cancel/isCancel":77,"../defaults":87,"./../utils":99,"./transformData":86}],83:[function(require,module,exports){"use strict";module.exports=function(error,config,code,request,response){return error.config=config,code&&(error.code=code),error.request=request,error.response=response,error.isAxiosError=!0,error.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},error}},{}],84:[function(require,module,exports){"use strict";var utils=require("../utils");module.exports=function(config1,config2){config2=config2||{};var config={},valueFromConfig2Keys=["url","method","data"],mergeDeepPropertiesKeys=["headers","auth","proxy","params"],defaultToConfig2Keys=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],directMergeKeys=["validateStatus"];function getMergedValue(target,source){return utils.isPlainObject(target)&&utils.isPlainObject(source)?utils.merge(target,source):utils.isPlainObject(source)?utils.merge({},source):utils.isArray(source)?source.slice():source}function mergeDeepProperties(prop){utils.isUndefined(config2[prop])?utils.isUndefined(config1[prop])||(config[prop]=getMergedValue(void 0,config1[prop])):config[prop]=getMergedValue(config1[prop],config2[prop])}utils.forEach(valueFromConfig2Keys,(function(prop){utils.isUndefined(config2[prop])||(config[prop]=getMergedValue(void 0,config2[prop]))})),utils.forEach(mergeDeepPropertiesKeys,mergeDeepProperties),utils.forEach(defaultToConfig2Keys,(function(prop){utils.isUndefined(config2[prop])?utils.isUndefined(config1[prop])||(config[prop]=getMergedValue(void 0,config1[prop])):config[prop]=getMergedValue(void 0,config2[prop])})),utils.forEach(directMergeKeys,(function(prop){prop in config2?config[prop]=getMergedValue(config1[prop],config2[prop]):prop in config1&&(config[prop]=getMergedValue(void 0,config1[prop]))}));var axiosKeys=valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys),otherKeys=Object.keys(config1).concat(Object.keys(config2)).filter((function(key){return-1===axiosKeys.indexOf(key)}));return utils.forEach(otherKeys,mergeDeepProperties),config}},{"../utils":99}],85:[function(require,module,exports){"use strict";var createError=require("./createError");module.exports=function(resolve,reject,response){var validateStatus=response.config.validateStatus;response.status&&validateStatus&&!validateStatus(response.status)?reject(createError("Request failed with status code "+response.status,response.config,null,response.request,response)):resolve(response)}},{"./createError":81}],86:[function(require,module,exports){"use strict";var utils=require("./../utils"),defaults=require("./../defaults");module.exports=function(data,headers,fns){var context=this||defaults;return utils.forEach(fns,(function(fn){data=fn.call(context,data,headers)})),data}},{"./../defaults":87,"./../utils":99}],87:[function(require,module,exports){(function(process){(function(){"use strict";var utils=require("./utils"),normalizeHeaderName=require("./helpers/normalizeHeaderName"),enhanceError=require("./core/enhanceError"),DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(headers,value){!utils.isUndefined(headers)&&utils.isUndefined(headers["Content-Type"])&&(headers["Content-Type"]=value)}var adapter,defaults={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?adapter=require("./adapters/xhr"):void 0!==process&&"[object process]"===Object.prototype.toString.call(process)&&(adapter=require("./adapters/http")),adapter),transformRequest:[function(data,headers){return normalizeHeaderName(headers,"Accept"),normalizeHeaderName(headers,"Content-Type"),utils.isFormData(data)||utils.isArrayBuffer(data)||utils.isBuffer(data)||utils.isStream(data)||utils.isFile(data)||utils.isBlob(data)?data:utils.isArrayBufferView(data)?data.buffer:utils.isURLSearchParams(data)?(setContentTypeIfUnset(headers,"application/x-www-form-urlencoded;charset=utf-8"),data.toString()):utils.isObject(data)||headers&&"application/json"===headers["Content-Type"]?(setContentTypeIfUnset(headers,"application/json"),function(rawValue,parser,encoder){if(utils.isString(rawValue))try{return(parser||JSON.parse)(rawValue),utils.trim(rawValue)}catch(e){if("SyntaxError"!==e.name)throw e}return(encoder||JSON.stringify)(rawValue)}(data)):data}],transformResponse:[function(data){var transitional=this.transitional,silentJSONParsing=transitional&&transitional.silentJSONParsing,forcedJSONParsing=transitional&&transitional.forcedJSONParsing,strictJSONParsing=!silentJSONParsing&&"json"===this.responseType;if(strictJSONParsing||forcedJSONParsing&&utils.isString(data)&&data.length)try{return JSON.parse(data)}catch(e){if(strictJSONParsing){if("SyntaxError"===e.name)throw enhanceError(e,this,"E_JSON_PARSE");throw e}}return data}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(status){return status>=200&&status<300}};defaults.headers={common:{Accept:"application/json, text/plain, */*"}},utils.forEach(["delete","get","head"],(function(method){defaults.headers[method]={}})),utils.forEach(["post","put","patch"],(function(method){defaults.headers[method]=utils.merge(DEFAULT_CONTENT_TYPE)})),module.exports=defaults}).call(this)}).call(this,require("_process"))},{"./adapters/http":73,"./adapters/xhr":73,"./core/enhanceError":83,"./helpers/normalizeHeaderName":95,"./utils":99,_process:104}],88:[function(require,module,exports){"use strict";module.exports=function(fn,thisArg){return function(){for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];return fn.apply(thisArg,args)}}},{}],89:[function(require,module,exports){"use strict";var utils=require("./../utils");function encode(val){return encodeURIComponent(val).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}module.exports=function(url,params,paramsSerializer){if(!params)return url;var serializedParams;if(paramsSerializer)serializedParams=paramsSerializer(params);else if(utils.isURLSearchParams(params))serializedParams=params.toString();else{var parts=[];utils.forEach(params,(function(val,key){null!=val&&(utils.isArray(val)?key+="[]":val=[val],utils.forEach(val,(function(v){utils.isDate(v)?v=v.toISOString():utils.isObject(v)&&(v=JSON.stringify(v)),parts.push(encode(key)+"="+encode(v))})))})),serializedParams=parts.join("&")}if(serializedParams){var hashmarkIndex=url.indexOf("#");-1!==hashmarkIndex&&(url=url.slice(0,hashmarkIndex)),url+=(-1===url.indexOf("?")?"?":"&")+serializedParams}return url}},{"./../utils":99}],90:[function(require,module,exports){"use strict";module.exports=function(baseURL,relativeURL){return relativeURL?baseURL.replace(/\/+$/,"")+"/"+relativeURL.replace(/^\/+/,""):baseURL}},{}],91:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?{write:function(name,value,expires,path,domain,secure){var cookie=[];cookie.push(name+"="+encodeURIComponent(value)),utils.isNumber(expires)&&cookie.push("expires="+new Date(expires).toGMTString()),utils.isString(path)&&cookie.push("path="+path),utils.isString(domain)&&cookie.push("domain="+domain),!0===secure&&cookie.push("secure"),document.cookie=cookie.join("; ")},read:function(name){var match=document.cookie.match(new RegExp("(^|;\\s*)("+name+")=([^;]*)"));return match?decodeURIComponent(match[3]):null},remove:function(name){this.write(name,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},{"./../utils":99}],92:[function(require,module,exports){"use strict";module.exports=function(url){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url)}},{}],93:[function(require,module,exports){"use strict";module.exports=function(payload){return"object"==typeof payload&&!0===payload.isAxiosError}},{}],94:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?function(){var originURL,msie=/(msie|trident)/i.test(navigator.userAgent),urlParsingNode=document.createElement("a");function resolveURL(url){var href=url;return msie&&(urlParsingNode.setAttribute("href",href),href=urlParsingNode.href),urlParsingNode.setAttribute("href",href),{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}return originURL=resolveURL(window.location.href),function(requestURL){var parsed=utils.isString(requestURL)?resolveURL(requestURL):requestURL;return parsed.protocol===originURL.protocol&&parsed.host===originURL.host}}():function(){return!0}},{"./../utils":99}],95:[function(require,module,exports){"use strict";var utils=require("../utils");module.exports=function(headers,normalizedName){utils.forEach(headers,(function(value,name){name!==normalizedName&&name.toUpperCase()===normalizedName.toUpperCase()&&(headers[normalizedName]=value,delete headers[name])}))}},{"../utils":99}],96:[function(require,module,exports){"use strict";var utils=require("./../utils"),ignoreDuplicateOf=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];module.exports=function(headers){var key,val,i,parsed={};return headers?(utils.forEach(headers.split("\n"),(function(line){if(i=line.indexOf(":"),key=utils.trim(line.substr(0,i)).toLowerCase(),val=utils.trim(line.substr(i+1)),key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0)return;parsed[key]="set-cookie"===key?(parsed[key]?parsed[key]:[]).concat([val]):parsed[key]?parsed[key]+", "+val:val}})),parsed):parsed}},{"./../utils":99}],97:[function(require,module,exports){"use strict";module.exports=function(callback){return function(arr){return callback.apply(null,arr)}}},{}],98:[function(require,module,exports){"use strict";var pkg=require("./../../package.json"),validators={};["object","boolean","number","function","string","symbol"].forEach((function(type,i){validators[type]=function(thing){return typeof thing===type||"a"+(i<1?"n ":" ")+type}}));var deprecatedWarnings={},currentVerArr=pkg.version.split(".");function isOlderVersion(version,thanVersion){for(var pkgVersionArr=thanVersion?thanVersion.split("."):currentVerArr,destVer=version.split("."),i=0;i<3;i++){if(pkgVersionArr[i]>destVer[i])return!0;if(pkgVersionArr[i]<destVer[i])return!1}return!1}validators.transitional=function(validator,version,message){var isDeprecated=version&&isOlderVersion(version);function formatMessage(opt,desc){return"[Axios v"+pkg.version+"] Transitional option '"+opt+"'"+desc+(message?". "+message:"")}return function(value,opt,opts){if(!1===validator)throw new Error(formatMessage(opt," has been removed in "+version));return isDeprecated&&!deprecatedWarnings[opt]&&(deprecatedWarnings[opt]=!0,console.warn(formatMessage(opt," has been deprecated since v"+version+" and will be removed in the near future"))),!validator||validator(value,opt,opts)}},module.exports={isOlderVersion:isOlderVersion,assertOptions:function(options,schema,allowUnknown){if("object"!=typeof options)throw new TypeError("options must be an object");for(var keys=Object.keys(options),i=keys.length;i-- >0;){var opt=keys[i],validator=schema[opt];if(validator){var value=options[opt],result=void 0===value||validator(value,opt,options);if(!0!==result)throw new TypeError("option "+opt+" must be "+result)}else if(!0!==allowUnknown)throw Error("Unknown option "+opt)}},validators:validators}},{"./../../package.json":100}],99:[function(require,module,exports){"use strict";var bind=require("./helpers/bind"),toString=Object.prototype.toString;function isArray(val){return"[object Array]"===toString.call(val)}function isUndefined(val){return void 0===val}function isObject(val){return null!==val&&"object"==typeof val}function isPlainObject(val){if("[object Object]"!==toString.call(val))return!1;var prototype=Object.getPrototypeOf(val);return null===prototype||prototype===Object.prototype}function isFunction(val){return"[object Function]"===toString.call(val)}function forEach(obj,fn){if(null!=obj)if("object"!=typeof obj&&(obj=[obj]),isArray(obj))for(var i=0,l=obj.length;i<l;i++)fn.call(null,obj[i],i,obj);else for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&fn.call(null,obj[key],key,obj)}module.exports={isArray:isArray,isArrayBuffer:function(val){return"[object ArrayBuffer]"===toString.call(val)},isBuffer:function(val){return null!==val&&!isUndefined(val)&&null!==val.constructor&&!isUndefined(val.constructor)&&"function"==typeof val.constructor.isBuffer&&val.constructor.isBuffer(val)},isFormData:function(val){return"undefined"!=typeof FormData&&val instanceof FormData},isArrayBufferView:function(val){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(val):val&&val.buffer&&val.buffer instanceof ArrayBuffer},isString:function(val){return"string"==typeof val},isNumber:function(val){return"number"==typeof val},isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:function(val){return"[object Date]"===toString.call(val)},isFile:function(val){return"[object File]"===toString.call(val)},isBlob:function(val){return"[object Blob]"===toString.call(val)},isFunction:isFunction,isStream:function(val){return isObject(val)&&isFunction(val.pipe)},isURLSearchParams:function(val){return"undefined"!=typeof URLSearchParams&&val instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:forEach,merge:function merge(){var result={};function assignValue(val,key){isPlainObject(result[key])&&isPlainObject(val)?result[key]=merge(result[key],val):isPlainObject(val)?result[key]=merge({},val):isArray(val)?result[key]=val.slice():result[key]=val}for(var i=0,l=arguments.length;i<l;i++)forEach(arguments[i],assignValue);return result},extend:function(a,b,thisArg){return forEach(b,(function(val,key){a[key]=thisArg&&"function"==typeof val?bind(val,thisArg):val})),a},trim:function(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")},stripBOM:function(content){return 65279===content.charCodeAt(0)&&(content=content.slice(1)),content}}},{"./helpers/bind":88}],100:[function(require,module,exports){module.exports={_from:"axios@^0.21.1",_id:"axios@0.21.4",_inBundle:!1,_integrity:"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",_location:"/axios",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"axios@^0.21.1",name:"axios",escapedName:"axios",rawSpec:"^0.21.1",saveSpec:null,fetchSpec:"^0.21.1"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",_shasum:"c67b90dc0568e5c1cf2b0b858c43ba28e2eda575",_spec:"axios@^0.21.1",_where:"/intel/git/livehelperchat_mysql/lhc_web",author:{name:"Matt Zabriskie"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs:{url:"https://github.com/axios/axios/issues"},bundleDependencies:!1,bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies:{"follow-redirects":"^1.14.0"},deprecated:!1,description:"Promise based HTTP client for the browser and node.js",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},homepage:"https://axios-http.com",jsdelivr:"dist/axios.min.js",keywords:["xhr","http","ajax","promise","node"],license:"MIT",main:"index.js",name:"axios",repository:{type:"git",url:"git+https://github.com/axios/axios.git"},scripts:{build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings:"./index.d.ts",unpkg:"dist/axios.min.js",version:"0.21.4"}},{}],101:[function(require,module,exports){"use strict";var reactIs=require("react-is"),REACT_STATICS={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};function getStatics(component){return reactIs.isMemo(component)?MEMO_STATICS:TYPE_STATICS[component.$$typeof]||REACT_STATICS}TYPE_STATICS[reactIs.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;var defineProperty=Object.defineProperty,getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,getPrototypeOf=Object.getPrototypeOf,objectPrototype=Object.prototype;module.exports=function hoistNonReactStatics(targetComponent,sourceComponent,blacklist){if("string"!=typeof sourceComponent){if(objectPrototype){var inheritedComponent=getPrototypeOf(sourceComponent);inheritedComponent&&inheritedComponent!==objectPrototype&&hoistNonReactStatics(targetComponent,inheritedComponent,blacklist)}var keys=getOwnPropertyNames(sourceComponent);getOwnPropertySymbols&&(keys=keys.concat(getOwnPropertySymbols(sourceComponent)));for(var targetStatics=getStatics(targetComponent),sourceStatics=getStatics(sourceComponent),i=0;i<keys.length;++i){var key=keys[i];if(!(KNOWN_STATICS[key]||blacklist&&blacklist[key]||sourceStatics&&sourceStatics[key]||targetStatics&&targetStatics[key])){var descriptor=getOwnPropertyDescriptor(sourceComponent,key);try{defineProperty(targetComponent,key,descriptor)}catch(e){}}}}return targetComponent}},{"react-is":115}],102:[function(require,module,exports){!function(global,factory){"object"==typeof exports&&void 0!==module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):global.Immutable=factory()}(this,(function(){"use strict";var SLICE$0=Array.prototype.slice;function createClass(ctor,superClass){superClass&&(ctor.prototype=Object.create(superClass.prototype)),ctor.prototype.constructor=ctor}function Iterable(value){return isIterable(value)?value:Seq(value)}function KeyedIterable(value){return isKeyed(value)?value:KeyedSeq(value)}function IndexedIterable(value){return isIndexed(value)?value:IndexedSeq(value)}function SetIterable(value){return isIterable(value)&&!isAssociative(value)?value:SetSeq(value)}function isIterable(maybeIterable){return!(!maybeIterable||!maybeIterable[IS_ITERABLE_SENTINEL])}function isKeyed(maybeKeyed){return!(!maybeKeyed||!maybeKeyed[IS_KEYED_SENTINEL])}function isIndexed(maybeIndexed){return!(!maybeIndexed||!maybeIndexed[IS_INDEXED_SENTINEL])}function isAssociative(maybeAssociative){return isKeyed(maybeAssociative)||isIndexed(maybeAssociative)}function isOrdered(maybeOrdered){return!(!maybeOrdered||!maybeOrdered[IS_ORDERED_SENTINEL])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var IS_ITERABLE_SENTINEL="@@__IMMUTABLE_ITERABLE__@@",IS_KEYED_SENTINEL="@@__IMMUTABLE_KEYED__@@",IS_INDEXED_SENTINEL="@@__IMMUTABLE_INDEXED__@@",IS_ORDERED_SENTINEL="@@__IMMUTABLE_ORDERED__@@",NOT_SET={},CHANGE_LENGTH={value:!1},DID_ALTER={value:!1};function MakeRef(ref){return ref.value=!1,ref}function SetRef(ref){ref&&(ref.value=!0)}function OwnerID(){}function arrCopy(arr,offset){offset=offset||0;for(var len=Math.max(0,arr.length-offset),newArr=new Array(len),ii=0;ii<len;ii++)newArr[ii]=arr[ii+offset];return newArr}function ensureSize(iter){return void 0===iter.size&&(iter.size=iter.__iterate(returnTrue)),iter.size}function wrapIndex(iter,index){if("number"!=typeof index){var uint32Index=index>>>0;if(""+uint32Index!==index||4294967295===uint32Index)return NaN;index=uint32Index}return index<0?ensureSize(iter)+index:index}function returnTrue(){return!0}function wholeSlice(begin,end,size){return(0===begin||void 0!==size&&begin<=-size)&&(void 0===end||void 0!==size&&end>=size)}function resolveBegin(begin,size){return resolveIndex(begin,size,0)}function resolveEnd(end,size){return resolveIndex(end,size,size)}function resolveIndex(index,size,defaultIndex){return void 0===index?defaultIndex:index<0?Math.max(0,size+index):void 0===size?index:Math.min(size,index)}var REAL_ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator,ITERATOR_SYMBOL=REAL_ITERATOR_SYMBOL||"@@iterator";function Iterator(next){this.next=next}function iteratorValue(type,k,v,iteratorResult){var value=0===type?k:1===type?v:[k,v];return iteratorResult?iteratorResult.value=value:iteratorResult={value:value,done:!1},iteratorResult}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(maybeIterable){return!!getIteratorFn(maybeIterable)}function isIterator(maybeIterator){return maybeIterator&&"function"==typeof maybeIterator.next}function getIterator(iterable){var iteratorFn=getIteratorFn(iterable);return iteratorFn&&iteratorFn.call(iterable)}function getIteratorFn(iterable){var iteratorFn=iterable&&(REAL_ITERATOR_SYMBOL&&iterable[REAL_ITERATOR_SYMBOL]||iterable["@@iterator"]);if("function"==typeof iteratorFn)return iteratorFn}function isArrayLike(value){return value&&"number"==typeof value.length}function Seq(value){return null==value?emptySequence():isIterable(value)?value.toSeq():function(value){var seq=maybeIndexedSeqFromValue(value)||"object"==typeof value&&new ObjectSeq(value);if(!seq)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+value);return seq}(value)}function KeyedSeq(value){return null==value?emptySequence().toKeyedSeq():isIterable(value)?isKeyed(value)?value.toSeq():value.fromEntrySeq():keyedSeqFromValue(value)}function IndexedSeq(value){return null==value?emptySequence():isIterable(value)?isKeyed(value)?value.entrySeq():value.toIndexedSeq():indexedSeqFromValue(value)}function SetSeq(value){return(null==value?emptySequence():isIterable(value)?isKeyed(value)?value.entrySeq():value:indexedSeqFromValue(value)).toSetSeq()}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=0,Iterator.VALUES=1,Iterator.ENTRIES=2,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[ITERATOR_SYMBOL]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(fn,reverse){return seqIterate(this,fn,reverse,!0)},Seq.prototype.__iterator=function(type,reverse){return seqIterator(this,type,reverse,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq.prototype.__iterate=function(fn,reverse){return seqIterate(this,fn,reverse,!1)},IndexedSeq.prototype.__iterator=function(type,reverse){return seqIterator(this,type,reverse,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var EMPTY_SEQ,EMPTY_REPEAT,EMPTY_RANGE;function ArraySeq(array){this._array=array,this.size=array.length}function ObjectSeq(object){var keys=Object.keys(object);this._object=object,this._keys=keys,this.size=keys.length}function IterableSeq(iterable){this._iterable=iterable,this.size=iterable.length||iterable.size}function IteratorSeq(iterator){this._iterator=iterator,this._iteratorCache=[]}function isSeq(maybeSeq){return!(!maybeSeq||!maybeSeq["@@__IMMUTABLE_SEQ__@@"])}function emptySequence(){return EMPTY_SEQ||(EMPTY_SEQ=new ArraySeq([]))}function keyedSeqFromValue(value){var seq=Array.isArray(value)?new ArraySeq(value).fromEntrySeq():isIterator(value)?new IteratorSeq(value).fromEntrySeq():hasIterator(value)?new IterableSeq(value).fromEntrySeq():"object"==typeof value?new ObjectSeq(value):void 0;if(!seq)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+value);return seq}function indexedSeqFromValue(value){var seq=maybeIndexedSeqFromValue(value);if(!seq)throw new TypeError("Expected Array or iterable object of values: "+value);return seq}function maybeIndexedSeqFromValue(value){return isArrayLike(value)?new ArraySeq(value):isIterator(value)?new IteratorSeq(value):hasIterator(value)?new IterableSeq(value):void 0}function seqIterate(seq,fn,reverse,useKeys){var cache=seq._cache;if(cache){for(var maxIndex=cache.length-1,ii=0;ii<=maxIndex;ii++){var entry=cache[reverse?maxIndex-ii:ii];if(!1===fn(entry[1],useKeys?entry[0]:ii,seq))return ii+1}return ii}return seq.__iterateUncached(fn,reverse)}function seqIterator(seq,type,reverse,useKeys){var cache=seq._cache;if(cache){var maxIndex=cache.length-1,ii=0;return new Iterator((function(){var entry=cache[reverse?maxIndex-ii:ii];return ii++>maxIndex?{value:void 0,done:!0}:iteratorValue(type,useKeys?entry[0]:ii-1,entry[1])}))}return seq.__iteratorUncached(type,reverse)}function fromJS(json,converter){return converter?function fromJSWith(converter,json,key,parentJSON){if(Array.isArray(json))return converter.call(parentJSON,key,IndexedSeq(json).map((function(v,k){return fromJSWith(converter,v,k,json)})));if(isPlainObj(json))return converter.call(parentJSON,key,KeyedSeq(json).map((function(v,k){return fromJSWith(converter,v,k,json)})));return json}(converter,json,"",{"":json}):fromJSDefault(json)}function fromJSDefault(json){return Array.isArray(json)?IndexedSeq(json).map(fromJSDefault).toList():isPlainObj(json)?KeyedSeq(json).map(fromJSDefault).toMap():json}function isPlainObj(value){return value&&(value.constructor===Object||void 0===value.constructor)}function is(valueA,valueB){if(valueA===valueB||valueA!=valueA&&valueB!=valueB)return!0;if(!valueA||!valueB)return!1;if("function"==typeof valueA.valueOf&&"function"==typeof valueB.valueOf){if((valueA=valueA.valueOf())===(valueB=valueB.valueOf())||valueA!=valueA&&valueB!=valueB)return!0;if(!valueA||!valueB)return!1}return!("function"!=typeof valueA.equals||"function"!=typeof valueB.equals||!valueA.equals(valueB))}function deepEqual(a,b){if(a===b)return!0;if(!isIterable(b)||void 0!==a.size&&void 0!==b.size&&a.size!==b.size||void 0!==a.__hash&&void 0!==b.__hash&&a.__hash!==b.__hash||isKeyed(a)!==isKeyed(b)||isIndexed(a)!==isIndexed(b)||isOrdered(a)!==isOrdered(b))return!1;if(0===a.size&&0===b.size)return!0;var notAssociative=!isAssociative(a);if(isOrdered(a)){var entries=a.entries();return b.every((function(v,k){var entry=entries.next().value;return entry&&is(entry[1],v)&&(notAssociative||is(entry[0],k))}))&&entries.next().done}var flipped=!1;if(void 0===a.size)if(void 0===b.size)"function"==typeof a.cacheResult&&a.cacheResult();else{flipped=!0;var _=a;a=b,b=_}var allEqual=!0,bSize=b.__iterate((function(v,k){if(notAssociative?!a.has(v):flipped?!is(v,a.get(k,NOT_SET)):!is(a.get(k,NOT_SET),v))return allEqual=!1,!1}));return allEqual&&a.size===bSize}function Repeat(value,times){if(!(this instanceof Repeat))return new Repeat(value,times);if(this._value=value,this.size=void 0===times?1/0:Math.max(0,times),0===this.size){if(EMPTY_REPEAT)return EMPTY_REPEAT;EMPTY_REPEAT=this}}function invariant(condition,error){if(!condition)throw new Error(error)}function Range(start,end,step){if(!(this instanceof Range))return new Range(start,end,step);if(invariant(0!==step,"Cannot step a Range by 0"),start=start||0,void 0===end&&(end=1/0),step=void 0===step?1:Math.abs(step),end<start&&(step=-step),this._start=start,this._end=end,this._step=step,this.size=Math.max(0,Math.ceil((end-start)/step-1)+1),0===this.size){if(EMPTY_RANGE)return EMPTY_RANGE;EMPTY_RANGE=this}}function Collection(){throw TypeError("Abstract")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(index,notSetValue){return this.has(index)?this._array[wrapIndex(this,index)]:notSetValue},ArraySeq.prototype.__iterate=function(fn,reverse){for(var array=this._array,maxIndex=array.length-1,ii=0;ii<=maxIndex;ii++)if(!1===fn(array[reverse?maxIndex-ii:ii],ii,this))return ii+1;return ii},ArraySeq.prototype.__iterator=function(type,reverse){var array=this._array,maxIndex=array.length-1,ii=0;return new Iterator((function(){return ii>maxIndex?{value:void 0,done:!0}:iteratorValue(type,ii,array[reverse?maxIndex-ii++:ii++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(key,notSetValue){return void 0===notSetValue||this.has(key)?this._object[key]:notSetValue},ObjectSeq.prototype.has=function(key){return this._object.hasOwnProperty(key)},ObjectSeq.prototype.__iterate=function(fn,reverse){for(var object=this._object,keys=this._keys,maxIndex=keys.length-1,ii=0;ii<=maxIndex;ii++){var key=keys[reverse?maxIndex-ii:ii];if(!1===fn(object[key],key,this))return ii+1}return ii},ObjectSeq.prototype.__iterator=function(type,reverse){var object=this._object,keys=this._keys,maxIndex=keys.length-1,ii=0;return new Iterator((function(){var key=keys[reverse?maxIndex-ii:ii];return ii++>maxIndex?{value:void 0,done:!0}:iteratorValue(type,key,object[key])}))},ObjectSeq.prototype[IS_ORDERED_SENTINEL]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(fn,reverse){if(reverse)return this.cacheResult().__iterate(fn,reverse);var iterator=getIterator(this._iterable),iterations=0;if(isIterator(iterator))for(var step;!(step=iterator.next()).done&&!1!==fn(step.value,iterations++,this););return iterations},IterableSeq.prototype.__iteratorUncached=function(type,reverse){if(reverse)return this.cacheResult().__iterator(type,reverse);var iterator=getIterator(this._iterable);if(!isIterator(iterator))return new Iterator(iteratorDone);var iterations=0;return new Iterator((function(){var step=iterator.next();return step.done?step:iteratorValue(type,iterations++,step.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(fn,reverse){if(reverse)return this.cacheResult().__iterate(fn,reverse);for(var step,iterator=this._iterator,cache=this._iteratorCache,iterations=0;iterations<cache.length;)if(!1===fn(cache[iterations],iterations++,this))return iterations;for(;!(step=iterator.next()).done;){var val=step.value;if(cache[iterations]=val,!1===fn(val,iterations++,this))break}return iterations},IteratorSeq.prototype.__iteratorUncached=function(type,reverse){if(reverse)return this.cacheResult().__iterator(type,reverse);var iterator=this._iterator,cache=this._iteratorCache,iterations=0;return new Iterator((function(){if(iterations>=cache.length){var step=iterator.next();if(step.done)return step;cache[iterations]=step.value}return iteratorValue(type,iterations,cache[iterations++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Repeat.prototype.get=function(index,notSetValue){return this.has(index)?this._value:notSetValue},Repeat.prototype.includes=function(searchValue){return is(this._value,searchValue)},Repeat.prototype.slice=function(begin,end){var size=this.size;return wholeSlice(begin,end,size)?this:new Repeat(this._value,resolveEnd(end,size)-resolveBegin(begin,size))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(searchValue){return is(this._value,searchValue)?0:-1},Repeat.prototype.lastIndexOf=function(searchValue){return is(this._value,searchValue)?this.size:-1},Repeat.prototype.__iterate=function(fn,reverse){for(var ii=0;ii<this.size;ii++)if(!1===fn(this._value,ii,this))return ii+1;return ii},Repeat.prototype.__iterator=function(type,reverse){var this$0=this,ii=0;return new Iterator((function(){return ii<this$0.size?iteratorValue(type,ii++,this$0._value):{value:void 0,done:!0}}))},Repeat.prototype.equals=function(other){return other instanceof Repeat?is(this._value,other._value):deepEqual(other)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Range.prototype.get=function(index,notSetValue){return this.has(index)?this._start+wrapIndex(this,index)*this._step:notSetValue},Range.prototype.includes=function(searchValue){var possibleIndex=(searchValue-this._start)/this._step;return possibleIndex>=0&&possibleIndex<this.size&&possibleIndex===Math.floor(possibleIndex)},Range.prototype.slice=function(begin,end){return wholeSlice(begin,end,this.size)?this:(begin=resolveBegin(begin,this.size),(end=resolveEnd(end,this.size))<=begin?new Range(0,0):new Range(this.get(begin,this._end),this.get(end,this._end),this._step))},Range.prototype.indexOf=function(searchValue){var offsetValue=searchValue-this._start;if(offsetValue%this._step==0){var index=offsetValue/this._step;if(index>=0&&index<this.size)return index}return-1},Range.prototype.lastIndexOf=function(searchValue){return this.indexOf(searchValue)},Range.prototype.__iterate=function(fn,reverse){for(var maxIndex=this.size-1,step=this._step,value=reverse?this._start+maxIndex*step:this._start,ii=0;ii<=maxIndex;ii++){if(!1===fn(value,ii,this))return ii+1;value+=reverse?-step:step}return ii},Range.prototype.__iterator=function(type,reverse){var maxIndex=this.size-1,step=this._step,value=reverse?this._start+maxIndex*step:this._start,ii=0;return new Iterator((function(){var v=value;return value+=reverse?-step:step,ii>maxIndex?{value:void 0,done:!0}:iteratorValue(type,ii++,v)}))},Range.prototype.equals=function(other){return other instanceof Range?this._start===other._start&&this._end===other._end&&this._step===other._step:deepEqual(this,other)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var imul="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(a,b){var c=65535&(a|=0),d=65535&(b|=0);return c*d+((a>>>16)*d+c*(b>>>16)<<16>>>0)|0};function smi(i32){return i32>>>1&1073741824|3221225471&i32}function hash(o){if(!1===o||null==o)return 0;if("function"==typeof o.valueOf&&(!1===(o=o.valueOf())||null==o))return 0;if(!0===o)return 1;var type=typeof o;if("number"===type){if(o!=o||o===1/0)return 0;var h=0|o;for(h!==o&&(h^=4294967295*o);o>4294967295;)h^=o/=4294967295;return smi(h)}if("string"===type)return o.length>STRING_HASH_CACHE_MIN_STRLEN?function(string){var hash=stringHashCache[string];void 0===hash&&(hash=hashString(string),STRING_HASH_CACHE_SIZE===STRING_HASH_CACHE_MAX_SIZE&&(STRING_HASH_CACHE_SIZE=0,stringHashCache={}),STRING_HASH_CACHE_SIZE++,stringHashCache[string]=hash);return hash}(o):hashString(o);if("function"==typeof o.hashCode)return o.hashCode();if("object"===type)return function(obj){var hash;if(usingWeakMap&&void 0!==(hash=weakMap.get(obj)))return hash;if(void 0!==(hash=obj[UID_HASH_KEY]))return hash;if(!canDefineProperty){if(void 0!==(hash=obj.propertyIsEnumerable&&obj.propertyIsEnumerable[UID_HASH_KEY]))return hash;if(void 0!==(hash=function(node){if(node&&node.nodeType>0)switch(node.nodeType){case 1:return node.uniqueID;case 9:return node.documentElement&&node.documentElement.uniqueID}}(obj)))return hash}hash=++objHashUID,1073741824&objHashUID&&(objHashUID=0);if(usingWeakMap)weakMap.set(obj,hash);else{if(void 0!==isExtensible&&!1===isExtensible(obj))throw new Error("Non-extensible objects are not allowed as keys.");if(canDefineProperty)Object.defineProperty(obj,UID_HASH_KEY,{enumerable:!1,configurable:!1,writable:!1,value:hash});else if(void 0!==obj.propertyIsEnumerable&&obj.propertyIsEnumerable===obj.constructor.prototype.propertyIsEnumerable)obj.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},obj.propertyIsEnumerable[UID_HASH_KEY]=hash;else{if(void 0===obj.nodeType)throw new Error("Unable to set a non-enumerable property on object.");obj[UID_HASH_KEY]=hash}}return hash}(o);if("function"==typeof o.toString)return hashString(o.toString());throw new Error("Value type "+type+" cannot be hashed.")}function hashString(string){for(var hash=0,ii=0;ii<string.length;ii++)hash=31*hash+string.charCodeAt(ii)|0;return smi(hash)}var isExtensible=Object.isExtensible,canDefineProperty=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var weakMap,usingWeakMap="function"==typeof WeakMap;usingWeakMap&&(weakMap=new WeakMap);var objHashUID=0,UID_HASH_KEY="__immutablehash__";"function"==typeof Symbol&&(UID_HASH_KEY=Symbol(UID_HASH_KEY));var STRING_HASH_CACHE_MIN_STRLEN=16,STRING_HASH_CACHE_MAX_SIZE=255,STRING_HASH_CACHE_SIZE=0,stringHashCache={};function assertNotInfinite(size){invariant(size!==1/0,"Cannot perform this action with an infinite size.")}function Map(value){return null==value?emptyMap():isMap(value)&&!isOrdered(value)?value:emptyMap().withMutations((function(map){var iter=KeyedIterable(value);assertNotInfinite(iter.size),iter.forEach((function(v,k){return map.set(k,v)}))}))}function isMap(maybeMap){return!(!maybeMap||!maybeMap[IS_MAP_SENTINEL])}createClass(Map,KeyedCollection),Map.of=function(){var keyValues=SLICE$0.call(arguments,0);return emptyMap().withMutations((function(map){for(var i=0;i<keyValues.length;i+=2){if(i+1>=keyValues.length)throw new Error("Missing value for key: "+keyValues[i]);map.set(keyValues[i],keyValues[i+1])}}))},Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(k,notSetValue){return this._root?this._root.get(0,void 0,k,notSetValue):notSetValue},Map.prototype.set=function(k,v){return updateMap(this,k,v)},Map.prototype.setIn=function(keyPath,v){return this.updateIn(keyPath,NOT_SET,(function(){return v}))},Map.prototype.remove=function(k){return updateMap(this,k,NOT_SET)},Map.prototype.deleteIn=function(keyPath){return this.updateIn(keyPath,(function(){return NOT_SET}))},Map.prototype.update=function(k,notSetValue,updater){return 1===arguments.length?k(this):this.updateIn([k],notSetValue,updater)},Map.prototype.updateIn=function(keyPath,notSetValue,updater){updater||(updater=notSetValue,notSetValue=void 0);var updatedValue=function updateInDeepMap(existing,keyPathIter,notSetValue,updater){var isNotSet=existing===NOT_SET,step=keyPathIter.next();if(step.done){var existingValue=isNotSet?notSetValue:existing,newValue=updater(existingValue);return newValue===existingValue?existing:newValue}invariant(isNotSet||existing&&existing.set,"invalid keyPath");var key=step.value,nextExisting=isNotSet?NOT_SET:existing.get(key,NOT_SET),nextUpdated=updateInDeepMap(nextExisting,keyPathIter,notSetValue,updater);return nextUpdated===nextExisting?existing:nextUpdated===NOT_SET?existing.remove(key):(isNotSet?emptyMap():existing).set(key,nextUpdated)}(this,forceIterator(keyPath),notSetValue,updater);return updatedValue===NOT_SET?void 0:updatedValue},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoMapWith(this,merger,iters)},Map.prototype.mergeIn=function(keyPath){var iters=SLICE$0.call(arguments,1);return this.updateIn(keyPath,emptyMap(),(function(m){return"function"==typeof m.merge?m.merge.apply(m,iters):iters[iters.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(merger),iters)},Map.prototype.mergeDeepIn=function(keyPath){var iters=SLICE$0.call(arguments,1);return this.updateIn(keyPath,emptyMap(),(function(m){return"function"==typeof m.mergeDeep?m.mergeDeep.apply(m,iters):iters[iters.length-1]}))},Map.prototype.sort=function(comparator){return OrderedMap(sortFactory(this,comparator))},Map.prototype.sortBy=function(mapper,comparator){return OrderedMap(sortFactory(this,comparator,mapper))},Map.prototype.withMutations=function(fn){var mutable=this.asMutable();return fn(mutable),mutable.wasAltered()?mutable.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(type,reverse){return new MapIterator(this,type,reverse)},Map.prototype.__iterate=function(fn,reverse){var this$0=this,iterations=0;return this._root&&this._root.iterate((function(entry){return iterations++,fn(entry[1],entry[0],this$0)}),reverse),iterations},Map.prototype.__ensureOwner=function(ownerID){return ownerID===this.__ownerID?this:ownerID?makeMap(this.size,this._root,ownerID,this.__hash):(this.__ownerID=ownerID,this.__altered=!1,this)},Map.isMap=isMap;var EMPTY_MAP,IS_MAP_SENTINEL="@@__IMMUTABLE_MAP__@@",MapPrototype=Map.prototype;function ArrayMapNode(ownerID,entries){this.ownerID=ownerID,this.entries=entries}function BitmapIndexedNode(ownerID,bitmap,nodes){this.ownerID=ownerID,this.bitmap=bitmap,this.nodes=nodes}function HashArrayMapNode(ownerID,count,nodes){this.ownerID=ownerID,this.count=count,this.nodes=nodes}function HashCollisionNode(ownerID,keyHash,entries){this.ownerID=ownerID,this.keyHash=keyHash,this.entries=entries}function ValueNode(ownerID,keyHash,entry){this.ownerID=ownerID,this.keyHash=keyHash,this.entry=entry}function MapIterator(map,type,reverse){this._type=type,this._reverse=reverse,this._stack=map._root&&mapIteratorFrame(map._root)}function mapIteratorValue(type,entry){return iteratorValue(type,entry[0],entry[1])}function mapIteratorFrame(node,prev){return{node:node,index:0,__prev:prev}}function makeMap(size,root,ownerID,hash){var map=Object.create(MapPrototype);return map.size=size,map._root=root,map.__ownerID=ownerID,map.__hash=hash,map.__altered=!1,map}function emptyMap(){return EMPTY_MAP||(EMPTY_MAP=makeMap(0))}function updateMap(map,k,v){var newRoot,newSize;if(map._root){var didChangeSize=MakeRef(CHANGE_LENGTH),didAlter=MakeRef(DID_ALTER);if(newRoot=updateNode(map._root,map.__ownerID,0,void 0,k,v,didChangeSize,didAlter),!didAlter.value)return map;newSize=map.size+(didChangeSize.value?v===NOT_SET?-1:1:0)}else{if(v===NOT_SET)return map;newSize=1,newRoot=new ArrayMapNode(map.__ownerID,[[k,v]])}return map.__ownerID?(map.size=newSize,map._root=newRoot,map.__hash=void 0,map.__altered=!0,map):newRoot?makeMap(newSize,newRoot):emptyMap()}function updateNode(node,ownerID,shift,keyHash,key,value,didChangeSize,didAlter){return node?node.update(ownerID,shift,keyHash,key,value,didChangeSize,didAlter):value===NOT_SET?node:(SetRef(didAlter),SetRef(didChangeSize),new ValueNode(ownerID,keyHash,[key,value]))}function isLeafNode(node){return node.constructor===ValueNode||node.constructor===HashCollisionNode}function mergeIntoNode(node,ownerID,shift,keyHash,entry){if(node.keyHash===keyHash)return new HashCollisionNode(ownerID,keyHash,[node.entry,entry]);var newNode,idx1=31&(0===shift?node.keyHash:node.keyHash>>>shift),idx2=31&(0===shift?keyHash:keyHash>>>shift);return new BitmapIndexedNode(ownerID,1<<idx1|1<<idx2,idx1===idx2?[mergeIntoNode(node,ownerID,shift+5,keyHash,entry)]:(newNode=new ValueNode(ownerID,keyHash,entry),idx1<idx2?[node,newNode]:[newNode,node]))}function mergeIntoMapWith(map,merger,iterables){for(var iters=[],ii=0;ii<iterables.length;ii++){var value=iterables[ii],iter=KeyedIterable(value);isIterable(value)||(iter=iter.map((function(v){return fromJS(v)}))),iters.push(iter)}return mergeIntoCollectionWith(map,merger,iters)}function deepMerger(existing,value,key){return existing&&existing.mergeDeep&&isIterable(value)?existing.mergeDeep(value):is(existing,value)?existing:value}function deepMergerWith(merger){return function(existing,value,key){if(existing&&existing.mergeDeepWith&&isIterable(value))return existing.mergeDeepWith(merger,value);var nextValue=merger(existing,value,key);return is(existing,nextValue)?existing:nextValue}}function mergeIntoCollectionWith(collection,merger,iters){return 0===(iters=iters.filter((function(x){return 0!==x.size}))).length?collection:0!==collection.size||collection.__ownerID||1!==iters.length?collection.withMutations((function(collection){for(var mergeIntoMap=merger?function(value,key){collection.update(key,NOT_SET,(function(existing){return existing===NOT_SET?value:merger(existing,value,key)}))}:function(value,key){collection.set(key,value)},ii=0;ii<iters.length;ii++)iters[ii].forEach(mergeIntoMap)})):collection.constructor(iters[0])}function popCount(x){return x=(x=(858993459&(x-=x>>1&1431655765))+(x>>2&858993459))+(x>>4)&252645135,x+=x>>8,127&(x+=x>>16)}function setIn(array,idx,val,canEdit){var newArray=canEdit?array:arrCopy(array);return newArray[idx]=val,newArray}MapPrototype[IS_MAP_SENTINEL]=!0,MapPrototype.delete=MapPrototype.remove,MapPrototype.removeIn=MapPrototype.deleteIn,ArrayMapNode.prototype.get=function(shift,keyHash,key,notSetValue){for(var entries=this.entries,ii=0,len=entries.length;ii<len;ii++)if(is(key,entries[ii][0]))return entries[ii][1];return notSetValue},ArrayMapNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){for(var removed=value===NOT_SET,entries=this.entries,idx=0,len=entries.length;idx<len&&!is(key,entries[idx][0]);idx++);var exists=idx<len;if(exists?entries[idx][1]===value:removed)return this;if(SetRef(didAlter),(removed||!exists)&&SetRef(didChangeSize),!removed||1!==entries.length){if(!exists&&!removed&&entries.length>=MAX_ARRAY_MAP_SIZE)return function(ownerID,entries,key,value){ownerID||(ownerID=new OwnerID);for(var node=new ValueNode(ownerID,hash(key),[key,value]),ii=0;ii<entries.length;ii++){var entry=entries[ii];node=node.update(ownerID,0,void 0,entry[0],entry[1])}return node}(ownerID,entries,key,value);var isEditable=ownerID&&ownerID===this.ownerID,newEntries=isEditable?entries:arrCopy(entries);return exists?removed?idx===len-1?newEntries.pop():newEntries[idx]=newEntries.pop():newEntries[idx]=[key,value]:newEntries.push([key,value]),isEditable?(this.entries=newEntries,this):new ArrayMapNode(ownerID,newEntries)}},BitmapIndexedNode.prototype.get=function(shift,keyHash,key,notSetValue){void 0===keyHash&&(keyHash=hash(key));var bit=1<<(31&(0===shift?keyHash:keyHash>>>shift)),bitmap=this.bitmap;return 0==(bitmap&bit)?notSetValue:this.nodes[popCount(bitmap&bit-1)].get(shift+5,keyHash,key,notSetValue)},BitmapIndexedNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){void 0===keyHash&&(keyHash=hash(key));var keyHashFrag=31&(0===shift?keyHash:keyHash>>>shift),bit=1<<keyHashFrag,bitmap=this.bitmap,exists=0!=(bitmap&bit);if(!exists&&value===NOT_SET)return this;var idx=popCount(bitmap&bit-1),nodes=this.nodes,node=exists?nodes[idx]:void 0,newNode=updateNode(node,ownerID,shift+5,keyHash,key,value,didChangeSize,didAlter);if(newNode===node)return this;if(!exists&&newNode&&nodes.length>=MAX_BITMAP_INDEXED_SIZE)return function(ownerID,nodes,bitmap,including,node){for(var count=0,expandedNodes=new Array(32),ii=0;0!==bitmap;ii++,bitmap>>>=1)expandedNodes[ii]=1&bitmap?nodes[count++]:void 0;return expandedNodes[including]=node,new HashArrayMapNode(ownerID,count+1,expandedNodes)}(ownerID,nodes,bitmap,keyHashFrag,newNode);if(exists&&!newNode&&2===nodes.length&&isLeafNode(nodes[1^idx]))return nodes[1^idx];if(exists&&newNode&&1===nodes.length&&isLeafNode(newNode))return newNode;var isEditable=ownerID&&ownerID===this.ownerID,newBitmap=exists?newNode?bitmap:bitmap^bit:bitmap|bit,newNodes=exists?newNode?setIn(nodes,idx,newNode,isEditable):function(array,idx,canEdit){var newLen=array.length-1;if(canEdit&&idx===newLen)return array.pop(),array;for(var newArray=new Array(newLen),after=0,ii=0;ii<newLen;ii++)ii===idx&&(after=1),newArray[ii]=array[ii+after];return newArray}(nodes,idx,isEditable):function(array,idx,val,canEdit){var newLen=array.length+1;if(canEdit&&idx+1===newLen)return array[idx]=val,array;for(var newArray=new Array(newLen),after=0,ii=0;ii<newLen;ii++)ii===idx?(newArray[ii]=val,after=-1):newArray[ii]=array[ii+after];return newArray}(nodes,idx,newNode,isEditable);return isEditable?(this.bitmap=newBitmap,this.nodes=newNodes,this):new BitmapIndexedNode(ownerID,newBitmap,newNodes)},HashArrayMapNode.prototype.get=function(shift,keyHash,key,notSetValue){void 0===keyHash&&(keyHash=hash(key));var idx=31&(0===shift?keyHash:keyHash>>>shift),node=this.nodes[idx];return node?node.get(shift+5,keyHash,key,notSetValue):notSetValue},HashArrayMapNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){void 0===keyHash&&(keyHash=hash(key));var idx=31&(0===shift?keyHash:keyHash>>>shift),removed=value===NOT_SET,nodes=this.nodes,node=nodes[idx];if(removed&&!node)return this;var newNode=updateNode(node,ownerID,shift+5,keyHash,key,value,didChangeSize,didAlter);if(newNode===node)return this;var newCount=this.count;if(node){if(!newNode&&--newCount<MIN_HASH_ARRAY_MAP_SIZE)return function(ownerID,nodes,count,excluding){for(var bitmap=0,packedII=0,packedNodes=new Array(count),ii=0,bit=1,len=nodes.length;ii<len;ii++,bit<<=1){var node=nodes[ii];void 0!==node&&ii!==excluding&&(bitmap|=bit,packedNodes[packedII++]=node)}return new BitmapIndexedNode(ownerID,bitmap,packedNodes)}(ownerID,nodes,newCount,idx)}else newCount++;var isEditable=ownerID&&ownerID===this.ownerID,newNodes=setIn(nodes,idx,newNode,isEditable);return isEditable?(this.count=newCount,this.nodes=newNodes,this):new HashArrayMapNode(ownerID,newCount,newNodes)},HashCollisionNode.prototype.get=function(shift,keyHash,key,notSetValue){for(var entries=this.entries,ii=0,len=entries.length;ii<len;ii++)if(is(key,entries[ii][0]))return entries[ii][1];return notSetValue},HashCollisionNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){void 0===keyHash&&(keyHash=hash(key));var removed=value===NOT_SET;if(keyHash!==this.keyHash)return removed?this:(SetRef(didAlter),SetRef(didChangeSize),mergeIntoNode(this,ownerID,shift,keyHash,[key,value]));for(var entries=this.entries,idx=0,len=entries.length;idx<len&&!is(key,entries[idx][0]);idx++);var exists=idx<len;if(exists?entries[idx][1]===value:removed)return this;if(SetRef(didAlter),(removed||!exists)&&SetRef(didChangeSize),removed&&2===len)return new ValueNode(ownerID,this.keyHash,entries[1^idx]);var isEditable=ownerID&&ownerID===this.ownerID,newEntries=isEditable?entries:arrCopy(entries);return exists?removed?idx===len-1?newEntries.pop():newEntries[idx]=newEntries.pop():newEntries[idx]=[key,value]:newEntries.push([key,value]),isEditable?(this.entries=newEntries,this):new HashCollisionNode(ownerID,this.keyHash,newEntries)},ValueNode.prototype.get=function(shift,keyHash,key,notSetValue){return is(key,this.entry[0])?this.entry[1]:notSetValue},ValueNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){var removed=value===NOT_SET,keyMatch=is(key,this.entry[0]);return(keyMatch?value===this.entry[1]:removed)?this:(SetRef(didAlter),removed?void SetRef(didChangeSize):keyMatch?ownerID&&ownerID===this.ownerID?(this.entry[1]=value,this):new ValueNode(ownerID,this.keyHash,[key,value]):(SetRef(didChangeSize),mergeIntoNode(this,ownerID,shift,hash(key),[key,value])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(fn,reverse){for(var entries=this.entries,ii=0,maxIndex=entries.length-1;ii<=maxIndex;ii++)if(!1===fn(entries[reverse?maxIndex-ii:ii]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(fn,reverse){for(var nodes=this.nodes,ii=0,maxIndex=nodes.length-1;ii<=maxIndex;ii++){var node=nodes[reverse?maxIndex-ii:ii];if(node&&!1===node.iterate(fn,reverse))return!1}},ValueNode.prototype.iterate=function(fn,reverse){return fn(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var type=this._type,stack=this._stack;stack;){var maxIndex,node=stack.node,index=stack.index++;if(node.entry){if(0===index)return mapIteratorValue(type,node.entry)}else if(node.entries){if(index<=(maxIndex=node.entries.length-1))return mapIteratorValue(type,node.entries[this._reverse?maxIndex-index:index])}else if(index<=(maxIndex=node.nodes.length-1)){var subNode=node.nodes[this._reverse?maxIndex-index:index];if(subNode){if(subNode.entry)return mapIteratorValue(type,subNode.entry);stack=this._stack=mapIteratorFrame(subNode,stack)}continue}stack=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var MAX_ARRAY_MAP_SIZE=8,MAX_BITMAP_INDEXED_SIZE=16,MIN_HASH_ARRAY_MAP_SIZE=8;function List(value){var empty=emptyList();if(null==value)return empty;if(isList(value))return value;var iter=IndexedIterable(value),size=iter.size;return 0===size?empty:(assertNotInfinite(size),size>0&&size<32?makeList(0,size,5,null,new VNode(iter.toArray())):empty.withMutations((function(list){list.setSize(size),iter.forEach((function(v,i){return list.set(i,v)}))})))}function isList(maybeList){return!(!maybeList||!maybeList[IS_LIST_SENTINEL])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString("List [","]")},List.prototype.get=function(index,notSetValue){if((index=wrapIndex(this,index))>=0&&index<this.size){var node=listNodeFor(this,index+=this._origin);return node&&node.array[31&index]}return notSetValue},List.prototype.set=function(index,value){return function(list,index,value){if((index=wrapIndex(list,index))!=index)return list;if(index>=list.size||index<0)return list.withMutations((function(list){index<0?setListBounds(list,index).set(0,value):setListBounds(list,0,index+1).set(index,value)}));index+=list._origin;var newTail=list._tail,newRoot=list._root,didAlter=MakeRef(DID_ALTER);index>=getTailOffset(list._capacity)?newTail=updateVNode(newTail,list.__ownerID,0,index,value,didAlter):newRoot=updateVNode(newRoot,list.__ownerID,list._level,index,value,didAlter);if(!didAlter.value)return list;if(list.__ownerID)return list._root=newRoot,list._tail=newTail,list.__hash=void 0,list.__altered=!0,list;return makeList(list._origin,list._capacity,list._level,newRoot,newTail)}(this,index,value)},List.prototype.remove=function(index){return this.has(index)?0===index?this.shift():index===this.size-1?this.pop():this.splice(index,1):this},List.prototype.insert=function(index,value){return this.splice(index,0,value)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var values=arguments,oldSize=this.size;return this.withMutations((function(list){setListBounds(list,0,oldSize+values.length);for(var ii=0;ii<values.length;ii++)list.set(oldSize+ii,values[ii])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var values=arguments;return this.withMutations((function(list){setListBounds(list,-values.length);for(var ii=0;ii<values.length;ii++)list.set(ii,values[ii])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoListWith(this,merger,iters)},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(merger),iters)},List.prototype.setSize=function(size){return setListBounds(this,0,size)},List.prototype.slice=function(begin,end){var size=this.size;return wholeSlice(begin,end,size)?this:setListBounds(this,resolveBegin(begin,size),resolveEnd(end,size))},List.prototype.__iterator=function(type,reverse){var index=0,values=iterateList(this,reverse);return new Iterator((function(){var value=values();return value===DONE?{value:void 0,done:!0}:iteratorValue(type,index++,value)}))},List.prototype.__iterate=function(fn,reverse){for(var value,index=0,values=iterateList(this,reverse);(value=values())!==DONE&&!1!==fn(value,index++,this););return index},List.prototype.__ensureOwner=function(ownerID){return ownerID===this.__ownerID?this:ownerID?makeList(this._origin,this._capacity,this._level,this._root,this._tail,ownerID,this.__hash):(this.__ownerID=ownerID,this)},List.isList=isList;var IS_LIST_SENTINEL="@@__IMMUTABLE_LIST__@@",ListPrototype=List.prototype;function VNode(array,ownerID){this.array=array,this.ownerID=ownerID}ListPrototype[IS_LIST_SENTINEL]=!0,ListPrototype.delete=ListPrototype.remove,ListPrototype.setIn=MapPrototype.setIn,ListPrototype.deleteIn=ListPrototype.removeIn=MapPrototype.removeIn,ListPrototype.update=MapPrototype.update,ListPrototype.updateIn=MapPrototype.updateIn,ListPrototype.mergeIn=MapPrototype.mergeIn,ListPrototype.mergeDeepIn=MapPrototype.mergeDeepIn,ListPrototype.withMutations=MapPrototype.withMutations,ListPrototype.asMutable=MapPrototype.asMutable,ListPrototype.asImmutable=MapPrototype.asImmutable,ListPrototype.wasAltered=MapPrototype.wasAltered,VNode.prototype.removeBefore=function(ownerID,level,index){if(index===level?1<<level:0===this.array.length)return this;var originIndex=index>>>level&31;if(originIndex>=this.array.length)return new VNode([],ownerID);var newChild,removingFirst=0===originIndex;if(level>0){var oldChild=this.array[originIndex];if((newChild=oldChild&&oldChild.removeBefore(ownerID,level-5,index))===oldChild&&removingFirst)return this}if(removingFirst&&!newChild)return this;var editable=editableVNode(this,ownerID);if(!removingFirst)for(var ii=0;ii<originIndex;ii++)editable.array[ii]=void 0;return newChild&&(editable.array[originIndex]=newChild),editable},VNode.prototype.removeAfter=function(ownerID,level,index){if(index===(level?1<<level:0)||0===this.array.length)return this;var newChild,sizeIndex=index-1>>>level&31;if(sizeIndex>=this.array.length)return this;if(level>0){var oldChild=this.array[sizeIndex];if((newChild=oldChild&&oldChild.removeAfter(ownerID,level-5,index))===oldChild&&sizeIndex===this.array.length-1)return this}var editable=editableVNode(this,ownerID);return editable.array.splice(sizeIndex+1),newChild&&(editable.array[sizeIndex]=newChild),editable};var EMPTY_LIST,EMPTY_ORDERED_MAP,DONE={};function iterateList(list,reverse){var left=list._origin,right=list._capacity,tailPos=getTailOffset(right),tail=list._tail;return iterateNodeOrLeaf(list._root,list._level,0);function iterateNodeOrLeaf(node,level,offset){return 0===level?function(node,offset){var array=offset===tailPos?tail&&tail.array:node&&node.array,from=offset>left?0:left-offset,to=right-offset;to>32&&(to=32);return function(){if(from===to)return DONE;var idx=reverse?--to:from++;return array&&array[idx]}}(node,offset):function(node,level,offset){var values,array=node&&node.array,from=offset>left?0:left-offset>>level,to=1+(right-offset>>level);to>32&&(to=32);return function(){for(;;){if(values){var value=values();if(value!==DONE)return value;values=null}if(from===to)return DONE;var idx=reverse?--to:from++;values=iterateNodeOrLeaf(array&&array[idx],level-5,offset+(idx<<level))}}}(node,level,offset)}}function makeList(origin,capacity,level,root,tail,ownerID,hash){var list=Object.create(ListPrototype);return list.size=capacity-origin,list._origin=origin,list._capacity=capacity,list._level=level,list._root=root,list._tail=tail,list.__ownerID=ownerID,list.__hash=hash,list.__altered=!1,list}function emptyList(){return EMPTY_LIST||(EMPTY_LIST=makeList(0,0,5))}function updateVNode(node,ownerID,level,index,value,didAlter){var newNode,idx=index>>>level&31,nodeHas=node&&idx<node.array.length;if(!nodeHas&&void 0===value)return node;if(level>0){var lowerNode=node&&node.array[idx],newLowerNode=updateVNode(lowerNode,ownerID,level-5,index,value,didAlter);return newLowerNode===lowerNode?node:((newNode=editableVNode(node,ownerID)).array[idx]=newLowerNode,newNode)}return nodeHas&&node.array[idx]===value?node:(SetRef(didAlter),newNode=editableVNode(node,ownerID),void 0===value&&idx===newNode.array.length-1?newNode.array.pop():newNode.array[idx]=value,newNode)}function editableVNode(node,ownerID){return ownerID&&node&&ownerID===node.ownerID?node:new VNode(node?node.array.slice():[],ownerID)}function listNodeFor(list,rawIndex){if(rawIndex>=getTailOffset(list._capacity))return list._tail;if(rawIndex<1<<list._level+5){for(var node=list._root,level=list._level;node&&level>0;)node=node.array[rawIndex>>>level&31],level-=5;return node}}function setListBounds(list,begin,end){void 0!==begin&&(begin|=0),void 0!==end&&(end|=0);var owner=list.__ownerID||new OwnerID,oldOrigin=list._origin,oldCapacity=list._capacity,newOrigin=oldOrigin+begin,newCapacity=void 0===end?oldCapacity:end<0?oldCapacity+end:oldOrigin+end;if(newOrigin===oldOrigin&&newCapacity===oldCapacity)return list;if(newOrigin>=newCapacity)return list.clear();for(var newLevel=list._level,newRoot=list._root,offsetShift=0;newOrigin+offsetShift<0;)newRoot=new VNode(newRoot&&newRoot.array.length?[void 0,newRoot]:[],owner),offsetShift+=1<<(newLevel+=5);offsetShift&&(newOrigin+=offsetShift,oldOrigin+=offsetShift,newCapacity+=offsetShift,oldCapacity+=offsetShift);for(var oldTailOffset=getTailOffset(oldCapacity),newTailOffset=getTailOffset(newCapacity);newTailOffset>=1<<newLevel+5;)newRoot=new VNode(newRoot&&newRoot.array.length?[newRoot]:[],owner),newLevel+=5;var oldTail=list._tail,newTail=newTailOffset<oldTailOffset?listNodeFor(list,newCapacity-1):newTailOffset>oldTailOffset?new VNode([],owner):oldTail;if(oldTail&&newTailOffset>oldTailOffset&&newOrigin<oldCapacity&&oldTail.array.length){for(var node=newRoot=editableVNode(newRoot,owner),level=newLevel;level>5;level-=5){var idx=oldTailOffset>>>level&31;node=node.array[idx]=editableVNode(node.array[idx],owner)}node.array[oldTailOffset>>>5&31]=oldTail}if(newCapacity<oldCapacity&&(newTail=newTail&&newTail.removeAfter(owner,0,newCapacity)),newOrigin>=newTailOffset)newOrigin-=newTailOffset,newCapacity-=newTailOffset,newLevel=5,newRoot=null,newTail=newTail&&newTail.removeBefore(owner,0,newOrigin);else if(newOrigin>oldOrigin||newTailOffset<oldTailOffset){for(offsetShift=0;newRoot;){var beginIndex=newOrigin>>>newLevel&31;if(beginIndex!==newTailOffset>>>newLevel&31)break;beginIndex&&(offsetShift+=(1<<newLevel)*beginIndex),newLevel-=5,newRoot=newRoot.array[beginIndex]}newRoot&&newOrigin>oldOrigin&&(newRoot=newRoot.removeBefore(owner,newLevel,newOrigin-offsetShift)),newRoot&&newTailOffset<oldTailOffset&&(newRoot=newRoot.removeAfter(owner,newLevel,newTailOffset-offsetShift)),offsetShift&&(newOrigin-=offsetShift,newCapacity-=offsetShift)}return list.__ownerID?(list.size=newCapacity-newOrigin,list._origin=newOrigin,list._capacity=newCapacity,list._level=newLevel,list._root=newRoot,list._tail=newTail,list.__hash=void 0,list.__altered=!0,list):makeList(newOrigin,newCapacity,newLevel,newRoot,newTail)}function mergeIntoListWith(list,merger,iterables){for(var iters=[],maxSize=0,ii=0;ii<iterables.length;ii++){var value=iterables[ii],iter=IndexedIterable(value);iter.size>maxSize&&(maxSize=iter.size),isIterable(value)||(iter=iter.map((function(v){return fromJS(v)}))),iters.push(iter)}return maxSize>list.size&&(list=list.setSize(maxSize)),mergeIntoCollectionWith(list,merger,iters)}function getTailOffset(size){return size<32?0:size-1>>>5<<5}function OrderedMap(value){return null==value?emptyOrderedMap():isOrderedMap(value)?value:emptyOrderedMap().withMutations((function(map){var iter=KeyedIterable(value);assertNotInfinite(iter.size),iter.forEach((function(v,k){return map.set(k,v)}))}))}function isOrderedMap(maybeOrderedMap){return isMap(maybeOrderedMap)&&isOrdered(maybeOrderedMap)}function makeOrderedMap(map,list,ownerID,hash){var omap=Object.create(OrderedMap.prototype);return omap.size=map?map.size:0,omap._map=map,omap._list=list,omap.__ownerID=ownerID,omap.__hash=hash,omap}function emptyOrderedMap(){return EMPTY_ORDERED_MAP||(EMPTY_ORDERED_MAP=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(omap,k,v){var newMap,newList,map=omap._map,list=omap._list,i=map.get(k),has=void 0!==i;if(v===NOT_SET){if(!has)return omap;list.size>=32&&list.size>=2*map.size?(newMap=(newList=list.filter((function(entry,idx){return void 0!==entry&&i!==idx}))).toKeyedSeq().map((function(entry){return entry[0]})).flip().toMap(),omap.__ownerID&&(newMap.__ownerID=newList.__ownerID=omap.__ownerID)):(newMap=map.remove(k),newList=i===list.size-1?list.pop():list.set(i,void 0))}else if(has){if(v===list.get(i)[1])return omap;newMap=map,newList=list.set(i,[k,v])}else newMap=map.set(k,list.size),newList=list.set(list.size,[k,v]);return omap.__ownerID?(omap.size=newMap.size,omap._map=newMap,omap._list=newList,omap.__hash=void 0,omap):makeOrderedMap(newMap,newList)}function ToKeyedSequence(indexed,useKeys){this._iter=indexed,this._useKeys=useKeys,this.size=indexed.size}function ToIndexedSequence(iter){this._iter=iter,this.size=iter.size}function ToSetSequence(iter){this._iter=iter,this.size=iter.size}function FromEntriesSequence(entries){this._iter=entries,this.size=entries.size}function flipFactory(iterable){var flipSequence=makeSequence(iterable);return flipSequence._iter=iterable,flipSequence.size=iterable.size,flipSequence.flip=function(){return iterable},flipSequence.reverse=function(){var reversedSequence=iterable.reverse.apply(this);return reversedSequence.flip=function(){return iterable.reverse()},reversedSequence},flipSequence.has=function(key){return iterable.includes(key)},flipSequence.includes=function(key){return iterable.has(key)},flipSequence.cacheResult=cacheResultThrough,flipSequence.__iterateUncached=function(fn,reverse){var this$0=this;return iterable.__iterate((function(v,k){return!1!==fn(k,v,this$0)}),reverse)},flipSequence.__iteratorUncached=function(type,reverse){if(2===type){var iterator=iterable.__iterator(type,reverse);return new Iterator((function(){var step=iterator.next();if(!step.done){var k=step.value[0];step.value[0]=step.value[1],step.value[1]=k}return step}))}return iterable.__iterator(1===type?0:1,reverse)},flipSequence}function mapFactory(iterable,mapper,context){var mappedSequence=makeSequence(iterable);return mappedSequence.size=iterable.size,mappedSequence.has=function(key){return iterable.has(key)},mappedSequence.get=function(key,notSetValue){var v=iterable.get(key,NOT_SET);return v===NOT_SET?notSetValue:mapper.call(context,v,key,iterable)},mappedSequence.__iterateUncached=function(fn,reverse){var this$0=this;return iterable.__iterate((function(v,k,c){return!1!==fn(mapper.call(context,v,k,c),k,this$0)}),reverse)},mappedSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(2,reverse);return new Iterator((function(){var step=iterator.next();if(step.done)return step;var entry=step.value,key=entry[0];return iteratorValue(type,key,mapper.call(context,entry[1],key,iterable),step)}))},mappedSequence}function reverseFactory(iterable,useKeys){var reversedSequence=makeSequence(iterable);return reversedSequence._iter=iterable,reversedSequence.size=iterable.size,reversedSequence.reverse=function(){return iterable},iterable.flip&&(reversedSequence.flip=function(){var flipSequence=flipFactory(iterable);return flipSequence.reverse=function(){return iterable.flip()},flipSequence}),reversedSequence.get=function(key,notSetValue){return iterable.get(useKeys?key:-1-key,notSetValue)},reversedSequence.has=function(key){return iterable.has(useKeys?key:-1-key)},reversedSequence.includes=function(value){return iterable.includes(value)},reversedSequence.cacheResult=cacheResultThrough,reversedSequence.__iterate=function(fn,reverse){var this$0=this;return iterable.__iterate((function(v,k){return fn(v,k,this$0)}),!reverse)},reversedSequence.__iterator=function(type,reverse){return iterable.__iterator(type,!reverse)},reversedSequence}function filterFactory(iterable,predicate,context,useKeys){var filterSequence=makeSequence(iterable);return useKeys&&(filterSequence.has=function(key){var v=iterable.get(key,NOT_SET);return v!==NOT_SET&&!!predicate.call(context,v,key,iterable)},filterSequence.get=function(key,notSetValue){var v=iterable.get(key,NOT_SET);return v!==NOT_SET&&predicate.call(context,v,key,iterable)?v:notSetValue}),filterSequence.__iterateUncached=function(fn,reverse){var this$0=this,iterations=0;return iterable.__iterate((function(v,k,c){if(predicate.call(context,v,k,c))return iterations++,fn(v,useKeys?k:iterations-1,this$0)}),reverse),iterations},filterSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(2,reverse),iterations=0;return new Iterator((function(){for(;;){var step=iterator.next();if(step.done)return step;var entry=step.value,key=entry[0],value=entry[1];if(predicate.call(context,value,key,iterable))return iteratorValue(type,useKeys?key:iterations++,value,step)}}))},filterSequence}function sliceFactory(iterable,begin,end,useKeys){var originalSize=iterable.size;if(void 0!==begin&&(begin|=0),void 0!==end&&(end===1/0?end=originalSize:end|=0),wholeSlice(begin,end,originalSize))return iterable;var resolvedBegin=resolveBegin(begin,originalSize),resolvedEnd=resolveEnd(end,originalSize);if(resolvedBegin!=resolvedBegin||resolvedEnd!=resolvedEnd)return sliceFactory(iterable.toSeq().cacheResult(),begin,end,useKeys);var sliceSize,resolvedSize=resolvedEnd-resolvedBegin;resolvedSize==resolvedSize&&(sliceSize=resolvedSize<0?0:resolvedSize);var sliceSeq=makeSequence(iterable);return sliceSeq.size=0===sliceSize?sliceSize:iterable.size&&sliceSize||void 0,!useKeys&&isSeq(iterable)&&sliceSize>=0&&(sliceSeq.get=function(index,notSetValue){return(index=wrapIndex(this,index))>=0&&index<sliceSize?iterable.get(index+resolvedBegin,notSetValue):notSetValue}),sliceSeq.__iterateUncached=function(fn,reverse){var this$0=this;if(0===sliceSize)return 0;if(reverse)return this.cacheResult().__iterate(fn,reverse);var skipped=0,isSkipping=!0,iterations=0;return iterable.__iterate((function(v,k){if(!isSkipping||!(isSkipping=skipped++<resolvedBegin))return iterations++,!1!==fn(v,useKeys?k:iterations-1,this$0)&&iterations!==sliceSize})),iterations},sliceSeq.__iteratorUncached=function(type,reverse){if(0!==sliceSize&&reverse)return this.cacheResult().__iterator(type,reverse);var iterator=0!==sliceSize&&iterable.__iterator(type,reverse),skipped=0,iterations=0;return new Iterator((function(){for(;skipped++<resolvedBegin;)iterator.next();if(++iterations>sliceSize)return{value:void 0,done:!0};var step=iterator.next();return useKeys||1===type?step:iteratorValue(type,iterations-1,0===type?void 0:step.value[1],step)}))},sliceSeq}function skipWhileFactory(iterable,predicate,context,useKeys){var skipSequence=makeSequence(iterable);return skipSequence.__iterateUncached=function(fn,reverse){var this$0=this;if(reverse)return this.cacheResult().__iterate(fn,reverse);var isSkipping=!0,iterations=0;return iterable.__iterate((function(v,k,c){if(!isSkipping||!(isSkipping=predicate.call(context,v,k,c)))return iterations++,fn(v,useKeys?k:iterations-1,this$0)})),iterations},skipSequence.__iteratorUncached=function(type,reverse){var this$0=this;if(reverse)return this.cacheResult().__iterator(type,reverse);var iterator=iterable.__iterator(2,reverse),skipping=!0,iterations=0;return new Iterator((function(){var step,k,v;do{if((step=iterator.next()).done)return useKeys||1===type?step:iteratorValue(type,iterations++,0===type?void 0:step.value[1],step);var entry=step.value;k=entry[0],v=entry[1],skipping&&(skipping=predicate.call(context,v,k,this$0))}while(skipping);return 2===type?step:iteratorValue(type,k,v,step)}))},skipSequence}function concatFactory(iterable,values){var isKeyedIterable=isKeyed(iterable),iters=[iterable].concat(values).map((function(v){return isIterable(v)?isKeyedIterable&&(v=KeyedIterable(v)):v=isKeyedIterable?keyedSeqFromValue(v):indexedSeqFromValue(Array.isArray(v)?v:[v]),v})).filter((function(v){return 0!==v.size}));if(0===iters.length)return iterable;if(1===iters.length){var singleton=iters[0];if(singleton===iterable||isKeyedIterable&&isKeyed(singleton)||isIndexed(iterable)&&isIndexed(singleton))return singleton}var concatSeq=new ArraySeq(iters);return isKeyedIterable?concatSeq=concatSeq.toKeyedSeq():isIndexed(iterable)||(concatSeq=concatSeq.toSetSeq()),(concatSeq=concatSeq.flatten(!0)).size=iters.reduce((function(sum,seq){if(void 0!==sum){var size=seq.size;if(void 0!==size)return sum+size}}),0),concatSeq}function flattenFactory(iterable,depth,useKeys){var flatSequence=makeSequence(iterable);return flatSequence.__iterateUncached=function(fn,reverse){var iterations=0,stopped=!1;return function flatDeep(iter,currentDepth){var this$0=this;iter.__iterate((function(v,k){return(!depth||currentDepth<depth)&&isIterable(v)?flatDeep(v,currentDepth+1):!1===fn(v,useKeys?k:iterations++,this$0)&&(stopped=!0),!stopped}),reverse)}(iterable,0),iterations},flatSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(type,reverse),stack=[],iterations=0;return new Iterator((function(){for(;iterator;){var step=iterator.next();if(!1===step.done){var v=step.value;if(2===type&&(v=v[1]),depth&&!(stack.length<depth)||!isIterable(v))return useKeys?step:iteratorValue(type,iterations++,v,step);stack.push(iterator),iterator=v.__iterator(type,reverse)}else iterator=stack.pop()}return{value:void 0,done:!0}}))},flatSequence}function sortFactory(iterable,comparator,mapper){comparator||(comparator=defaultComparator);var isKeyedIterable=isKeyed(iterable),index=0,entries=iterable.toSeq().map((function(v,k){return[k,v,index++,mapper?mapper(v,k,iterable):v]})).toArray();return entries.sort((function(a,b){return comparator(a[3],b[3])||a[2]-b[2]})).forEach(isKeyedIterable?function(v,i){entries[i].length=2}:function(v,i){entries[i]=v[1]}),isKeyedIterable?KeyedSeq(entries):isIndexed(iterable)?IndexedSeq(entries):SetSeq(entries)}function maxFactory(iterable,comparator,mapper){if(comparator||(comparator=defaultComparator),mapper){var entry=iterable.toSeq().map((function(v,k){return[v,mapper(v,k,iterable)]})).reduce((function(a,b){return maxCompare(comparator,a[1],b[1])?b:a}));return entry&&entry[0]}return iterable.reduce((function(a,b){return maxCompare(comparator,a,b)?b:a}))}function maxCompare(comparator,a,b){var comp=comparator(b,a);return 0===comp&&b!==a&&(null==b||b!=b)||comp>0}function zipWithFactory(keyIter,zipper,iters){var zipSequence=makeSequence(keyIter);return zipSequence.size=new ArraySeq(iters).map((function(i){return i.size})).min(),zipSequence.__iterate=function(fn,reverse){for(var step,iterator=this.__iterator(1,reverse),iterations=0;!(step=iterator.next()).done&&!1!==fn(step.value,iterations++,this););return iterations},zipSequence.__iteratorUncached=function(type,reverse){var iterators=iters.map((function(i){return i=Iterable(i),getIterator(reverse?i.reverse():i)})),iterations=0,isDone=!1;return new Iterator((function(){var steps;return isDone||(steps=iterators.map((function(i){return i.next()})),isDone=steps.some((function(s){return s.done}))),isDone?{value:void 0,done:!0}:iteratorValue(type,iterations++,zipper.apply(null,steps.map((function(s){return s.value}))))}))},zipSequence}function reify(iter,seq){return isSeq(iter)?seq:iter.constructor(seq)}function validateEntry(entry){if(entry!==Object(entry))throw new TypeError("Expected [K, V] tuple: "+entry)}function resolveSize(iter){return assertNotInfinite(iter.size),ensureSize(iter)}function iterableClass(iterable){return isKeyed(iterable)?KeyedIterable:isIndexed(iterable)?IndexedIterable:SetIterable}function makeSequence(iterable){return Object.create((isKeyed(iterable)?KeyedSeq:isIndexed(iterable)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(a,b){return a>b?1:a<b?-1:0}function forceIterator(keyPath){var iter=getIterator(keyPath);if(!iter){if(!isArrayLike(keyPath))throw new TypeError("Expected iterable or array-like: "+keyPath);iter=getIterator(Iterable(keyPath))}return iter}function Record(defaultValues,name){var hasInitialized,RecordType=function(values){if(values instanceof RecordType)return values;if(!(this instanceof RecordType))return new RecordType(values);if(!hasInitialized){hasInitialized=!0;var keys=Object.keys(defaultValues);!function(prototype,names){try{names.forEach(setProp.bind(void 0,prototype))}catch(error){}}(RecordTypePrototype,keys),RecordTypePrototype.size=keys.length,RecordTypePrototype._name=name,RecordTypePrototype._keys=keys,RecordTypePrototype._defaultValues=defaultValues}this._map=Map(values)},RecordTypePrototype=RecordType.prototype=Object.create(RecordPrototype);return RecordTypePrototype.constructor=RecordType,RecordType}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString("OrderedMap {","}")},OrderedMap.prototype.get=function(k,notSetValue){var index=this._map.get(k);return void 0!==index?this._list.get(index)[1]:notSetValue},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(k,v){return updateOrderedMap(this,k,v)},OrderedMap.prototype.remove=function(k){return updateOrderedMap(this,k,NOT_SET)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(fn,reverse){var this$0=this;return this._list.__iterate((function(entry){return entry&&fn(entry[1],entry[0],this$0)}),reverse)},OrderedMap.prototype.__iterator=function(type,reverse){return this._list.fromEntrySeq().__iterator(type,reverse)},OrderedMap.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID)return this;var newMap=this._map.__ensureOwner(ownerID),newList=this._list.__ensureOwner(ownerID);return ownerID?makeOrderedMap(newMap,newList,ownerID,this.__hash):(this.__ownerID=ownerID,this._map=newMap,this._list=newList,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[IS_ORDERED_SENTINEL]=!0,OrderedMap.prototype.delete=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(key,notSetValue){return this._iter.get(key,notSetValue)},ToKeyedSequence.prototype.has=function(key){return this._iter.has(key)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var this$0=this,reversedSequence=reverseFactory(this,!0);return this._useKeys||(reversedSequence.valueSeq=function(){return this$0._iter.toSeq().reverse()}),reversedSequence},ToKeyedSequence.prototype.map=function(mapper,context){var this$0=this,mappedSequence=mapFactory(this,mapper,context);return this._useKeys||(mappedSequence.valueSeq=function(){return this$0._iter.toSeq().map(mapper,context)}),mappedSequence},ToKeyedSequence.prototype.__iterate=function(fn,reverse){var ii,this$0=this;return this._iter.__iterate(this._useKeys?function(v,k){return fn(v,k,this$0)}:(ii=reverse?resolveSize(this):0,function(v){return fn(v,reverse?--ii:ii++,this$0)}),reverse)},ToKeyedSequence.prototype.__iterator=function(type,reverse){if(this._useKeys)return this._iter.__iterator(type,reverse);var iterator=this._iter.__iterator(1,reverse),ii=reverse?resolveSize(this):0;return new Iterator((function(){var step=iterator.next();return step.done?step:iteratorValue(type,reverse?--ii:ii++,step.value,step)}))},ToKeyedSequence.prototype[IS_ORDERED_SENTINEL]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(value){return this._iter.includes(value)},ToIndexedSequence.prototype.__iterate=function(fn,reverse){var this$0=this,iterations=0;return this._iter.__iterate((function(v){return fn(v,iterations++,this$0)}),reverse)},ToIndexedSequence.prototype.__iterator=function(type,reverse){var iterator=this._iter.__iterator(1,reverse),iterations=0;return new Iterator((function(){var step=iterator.next();return step.done?step:iteratorValue(type,iterations++,step.value,step)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(key){return this._iter.includes(key)},ToSetSequence.prototype.__iterate=function(fn,reverse){var this$0=this;return this._iter.__iterate((function(v){return fn(v,v,this$0)}),reverse)},ToSetSequence.prototype.__iterator=function(type,reverse){var iterator=this._iter.__iterator(1,reverse);return new Iterator((function(){var step=iterator.next();return step.done?step:iteratorValue(type,step.value,step.value,step)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(fn,reverse){var this$0=this;return this._iter.__iterate((function(entry){if(entry){validateEntry(entry);var indexedIterable=isIterable(entry);return fn(indexedIterable?entry.get(1):entry[1],indexedIterable?entry.get(0):entry[0],this$0)}}),reverse)},FromEntriesSequence.prototype.__iterator=function(type,reverse){var iterator=this._iter.__iterator(1,reverse);return new Iterator((function(){for(;;){var step=iterator.next();if(step.done)return step;var entry=step.value;if(entry){validateEntry(entry);var indexedIterable=isIterable(entry);return iteratorValue(type,indexedIterable?entry.get(0):entry[0],indexedIterable?entry.get(1):entry[1],step)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+" {","}")},Record.prototype.has=function(k){return this._defaultValues.hasOwnProperty(k)},Record.prototype.get=function(k,notSetValue){if(!this.has(k))return notSetValue;var defaultVal=this._defaultValues[k];return this._map?this._map.get(k,defaultVal):defaultVal},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var RecordType=this.constructor;return RecordType._empty||(RecordType._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(k,v){if(!this.has(k))throw new Error('Cannot set unknown key "'+k+'" on '+recordName(this));if(this._map&&!this._map.has(k)&&v===this._defaultValues[k])return this;var newMap=this._map&&this._map.set(k,v);return this.__ownerID||newMap===this._map?this:makeRecord(this,newMap)},Record.prototype.remove=function(k){if(!this.has(k))return this;var newMap=this._map&&this._map.remove(k);return this.__ownerID||newMap===this._map?this:makeRecord(this,newMap)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(type,reverse){var this$0=this;return KeyedIterable(this._defaultValues).map((function(_,k){return this$0.get(k)})).__iterator(type,reverse)},Record.prototype.__iterate=function(fn,reverse){var this$0=this;return KeyedIterable(this._defaultValues).map((function(_,k){return this$0.get(k)})).__iterate(fn,reverse)},Record.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID)return this;var newMap=this._map&&this._map.__ensureOwner(ownerID);return ownerID?makeRecord(this,newMap,ownerID):(this.__ownerID=ownerID,this._map=newMap,this)};var RecordPrototype=Record.prototype;function makeRecord(likeRecord,map,ownerID){var record=Object.create(Object.getPrototypeOf(likeRecord));return record._map=map,record.__ownerID=ownerID,record}function recordName(record){return record._name||record.constructor.name||"Record"}function setProp(prototype,name){Object.defineProperty(prototype,name,{get:function(){return this.get(name)},set:function(value){invariant(this.__ownerID,"Cannot set on an immutable record."),this.set(name,value)}})}function Set(value){return null==value?emptySet():isSet(value)&&!isOrdered(value)?value:emptySet().withMutations((function(set){var iter=SetIterable(value);assertNotInfinite(iter.size),iter.forEach((function(v){return set.add(v)}))}))}function isSet(maybeSet){return!(!maybeSet||!maybeSet[IS_SET_SENTINEL])}RecordPrototype.delete=RecordPrototype.remove,RecordPrototype.deleteIn=RecordPrototype.removeIn=MapPrototype.removeIn,RecordPrototype.merge=MapPrototype.merge,RecordPrototype.mergeWith=MapPrototype.mergeWith,RecordPrototype.mergeIn=MapPrototype.mergeIn,RecordPrototype.mergeDeep=MapPrototype.mergeDeep,RecordPrototype.mergeDeepWith=MapPrototype.mergeDeepWith,RecordPrototype.mergeDeepIn=MapPrototype.mergeDeepIn,RecordPrototype.setIn=MapPrototype.setIn,RecordPrototype.update=MapPrototype.update,RecordPrototype.updateIn=MapPrototype.updateIn,RecordPrototype.withMutations=MapPrototype.withMutations,RecordPrototype.asMutable=MapPrototype.asMutable,RecordPrototype.asImmutable=MapPrototype.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(value){return this(KeyedIterable(value).keySeq())},Set.prototype.toString=function(){return this.__toString("Set {","}")},Set.prototype.has=function(value){return this._map.has(value)},Set.prototype.add=function(value){return updateSet(this,this._map.set(value,!0))},Set.prototype.remove=function(value){return updateSet(this,this._map.remove(value))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var iters=SLICE$0.call(arguments,0);return 0===(iters=iters.filter((function(x){return 0!==x.size}))).length?this:0!==this.size||this.__ownerID||1!==iters.length?this.withMutations((function(set){for(var ii=0;ii<iters.length;ii++)SetIterable(iters[ii]).forEach((function(value){return set.add(value)}))})):this.constructor(iters[0])},Set.prototype.intersect=function(){var iters=SLICE$0.call(arguments,0);if(0===iters.length)return this;iters=iters.map((function(iter){return SetIterable(iter)}));var originalSet=this;return this.withMutations((function(set){originalSet.forEach((function(value){iters.every((function(iter){return iter.includes(value)}))||set.remove(value)}))}))},Set.prototype.subtract=function(){var iters=SLICE$0.call(arguments,0);if(0===iters.length)return this;iters=iters.map((function(iter){return SetIterable(iter)}));var originalSet=this;return this.withMutations((function(set){originalSet.forEach((function(value){iters.some((function(iter){return iter.includes(value)}))&&set.remove(value)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1);return this.union.apply(this,iters)},Set.prototype.sort=function(comparator){return OrderedSet(sortFactory(this,comparator))},Set.prototype.sortBy=function(mapper,comparator){return OrderedSet(sortFactory(this,comparator,mapper))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(fn,reverse){var this$0=this;return this._map.__iterate((function(_,k){return fn(k,k,this$0)}),reverse)},Set.prototype.__iterator=function(type,reverse){return this._map.map((function(_,k){return k})).__iterator(type,reverse)},Set.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID)return this;var newMap=this._map.__ensureOwner(ownerID);return ownerID?this.__make(newMap,ownerID):(this.__ownerID=ownerID,this._map=newMap,this)},Set.isSet=isSet;var EMPTY_SET,IS_SET_SENTINEL="@@__IMMUTABLE_SET__@@",SetPrototype=Set.prototype;function updateSet(set,newMap){return set.__ownerID?(set.size=newMap.size,set._map=newMap,set):newMap===set._map?set:0===newMap.size?set.__empty():set.__make(newMap)}function makeSet(map,ownerID){var set=Object.create(SetPrototype);return set.size=map?map.size:0,set._map=map,set.__ownerID=ownerID,set}function emptySet(){return EMPTY_SET||(EMPTY_SET=makeSet(emptyMap()))}function OrderedSet(value){return null==value?emptyOrderedSet():isOrderedSet(value)?value:emptyOrderedSet().withMutations((function(set){var iter=SetIterable(value);assertNotInfinite(iter.size),iter.forEach((function(v){return set.add(v)}))}))}function isOrderedSet(maybeOrderedSet){return isSet(maybeOrderedSet)&&isOrdered(maybeOrderedSet)}SetPrototype[IS_SET_SENTINEL]=!0,SetPrototype.delete=SetPrototype.remove,SetPrototype.mergeDeep=SetPrototype.merge,SetPrototype.mergeDeepWith=SetPrototype.mergeWith,SetPrototype.withMutations=MapPrototype.withMutations,SetPrototype.asMutable=MapPrototype.asMutable,SetPrototype.asImmutable=MapPrototype.asImmutable,SetPrototype.__empty=emptySet,SetPrototype.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(value){return this(KeyedIterable(value).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString("OrderedSet {","}")},OrderedSet.isOrderedSet=isOrderedSet;var EMPTY_ORDERED_SET,OrderedSetPrototype=OrderedSet.prototype;function makeOrderedSet(map,ownerID){var set=Object.create(OrderedSetPrototype);return set.size=map?map.size:0,set._map=map,set.__ownerID=ownerID,set}function emptyOrderedSet(){return EMPTY_ORDERED_SET||(EMPTY_ORDERED_SET=makeOrderedSet(emptyOrderedMap()))}function Stack(value){return null==value?emptyStack():isStack(value)?value:emptyStack().unshiftAll(value)}function isStack(maybeStack){return!(!maybeStack||!maybeStack[IS_STACK_SENTINEL])}OrderedSetPrototype[IS_ORDERED_SENTINEL]=!0,OrderedSetPrototype.__empty=emptyOrderedSet,OrderedSetPrototype.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString("Stack [","]")},Stack.prototype.get=function(index,notSetValue){var head=this._head;for(index=wrapIndex(this,index);head&&index--;)head=head.next;return head?head.value:notSetValue},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var newSize=this.size+arguments.length,head=this._head,ii=arguments.length-1;ii>=0;ii--)head={value:arguments[ii],next:head};return this.__ownerID?(this.size=newSize,this._head=head,this.__hash=void 0,this.__altered=!0,this):makeStack(newSize,head)},Stack.prototype.pushAll=function(iter){if(0===(iter=IndexedIterable(iter)).size)return this;assertNotInfinite(iter.size);var newSize=this.size,head=this._head;return iter.reverse().forEach((function(value){newSize++,head={value:value,next:head}})),this.__ownerID?(this.size=newSize,this._head=head,this.__hash=void 0,this.__altered=!0,this):makeStack(newSize,head)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(iter){return this.pushAll(iter)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(begin,end){if(wholeSlice(begin,end,this.size))return this;var resolvedBegin=resolveBegin(begin,this.size);if(resolveEnd(end,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,begin,end);for(var newSize=this.size-resolvedBegin,head=this._head;resolvedBegin--;)head=head.next;return this.__ownerID?(this.size=newSize,this._head=head,this.__hash=void 0,this.__altered=!0,this):makeStack(newSize,head)},Stack.prototype.__ensureOwner=function(ownerID){return ownerID===this.__ownerID?this:ownerID?makeStack(this.size,this._head,ownerID,this.__hash):(this.__ownerID=ownerID,this.__altered=!1,this)},Stack.prototype.__iterate=function(fn,reverse){if(reverse)return this.reverse().__iterate(fn);for(var iterations=0,node=this._head;node&&!1!==fn(node.value,iterations++,this);)node=node.next;return iterations},Stack.prototype.__iterator=function(type,reverse){if(reverse)return this.reverse().__iterator(type);var iterations=0,node=this._head;return new Iterator((function(){if(node){var value=node.value;return node=node.next,iteratorValue(type,iterations++,value)}return{value:void 0,done:!0}}))},Stack.isStack=isStack;var EMPTY_STACK,IS_STACK_SENTINEL="@@__IMMUTABLE_STACK__@@",StackPrototype=Stack.prototype;function makeStack(size,head,ownerID,hash){var map=Object.create(StackPrototype);return map.size=size,map._head=head,map.__ownerID=ownerID,map.__hash=hash,map.__altered=!1,map}function emptyStack(){return EMPTY_STACK||(EMPTY_STACK=makeStack(0))}function mixin(ctor,methods){var keyCopier=function(key){ctor.prototype[key]=methods[key]};return Object.keys(methods).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(methods).forEach(keyCopier),ctor}StackPrototype[IS_STACK_SENTINEL]=!0,StackPrototype.withMutations=MapPrototype.withMutations,StackPrototype.asMutable=MapPrototype.asMutable,StackPrototype.asImmutable=MapPrototype.asImmutable,StackPrototype.wasAltered=MapPrototype.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var array=new Array(this.size||0);return this.valueSeq().__iterate((function(v,i){array[i]=v})),array},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(value){return value&&"function"==typeof value.toJS?value.toJS():value})).__toJS()},toJSON:function(){return this.toSeq().map((function(value){return value&&"function"==typeof value.toJSON?value.toJSON():value})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var object={};return this.__iterate((function(v,k){object[k]=v})),object},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(head,tail){return 0===this.size?head+tail:head+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+tail},concat:function(){var values=SLICE$0.call(arguments,0);return reify(this,concatFactory(this,values))},includes:function(searchValue){return this.some((function(value){return is(value,searchValue)}))},entries:function(){return this.__iterator(2)},every:function(predicate,context){assertNotInfinite(this.size);var returnValue=!0;return this.__iterate((function(v,k,c){if(!predicate.call(context,v,k,c))return returnValue=!1,!1})),returnValue},filter:function(predicate,context){return reify(this,filterFactory(this,predicate,context,!0))},find:function(predicate,context,notSetValue){var entry=this.findEntry(predicate,context);return entry?entry[1]:notSetValue},forEach:function(sideEffect,context){return assertNotInfinite(this.size),this.__iterate(context?sideEffect.bind(context):sideEffect)},join:function(separator){assertNotInfinite(this.size),separator=void 0!==separator?""+separator:",";var joined="",isFirst=!0;return this.__iterate((function(v){isFirst?isFirst=!1:joined+=separator,joined+=null!=v?v.toString():""})),joined},keys:function(){return this.__iterator(0)},map:function(mapper,context){return reify(this,mapFactory(this,mapper,context))},reduce:function(reducer,initialReduction,context){var reduction,useFirst;return assertNotInfinite(this.size),arguments.length<2?useFirst=!0:reduction=initialReduction,this.__iterate((function(v,k,c){useFirst?(useFirst=!1,reduction=v):reduction=reducer.call(context,reduction,v,k,c)})),reduction},reduceRight:function(reducer,initialReduction,context){var reversed=this.toKeyedSeq().reverse();return reversed.reduce.apply(reversed,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(begin,end){return reify(this,sliceFactory(this,begin,end,!0))},some:function(predicate,context){return!this.every(not(predicate),context)},sort:function(comparator){return reify(this,sortFactory(this,comparator))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(predicate,context){return ensureSize(predicate?this.toSeq().filter(predicate,context):this)},countBy:function(grouper,context){return function(iterable,grouper,context){var groups=Map().asMutable();return iterable.__iterate((function(v,k){groups.update(grouper.call(context,v,k,iterable),0,(function(a){return a+1}))})),groups.asImmutable()}(this,grouper,context)},equals:function(other){return deepEqual(this,other)},entrySeq:function(){var iterable=this;if(iterable._cache)return new ArraySeq(iterable._cache);var entriesSequence=iterable.toSeq().map(entryMapper).toIndexedSeq();return entriesSequence.fromEntrySeq=function(){return iterable.toSeq()},entriesSequence},filterNot:function(predicate,context){return this.filter(not(predicate),context)},findEntry:function(predicate,context,notSetValue){var found=notSetValue;return this.__iterate((function(v,k,c){if(predicate.call(context,v,k,c))return found=[k,v],!1})),found},findKey:function(predicate,context){var entry=this.findEntry(predicate,context);return entry&&entry[0]},findLast:function(predicate,context,notSetValue){return this.toKeyedSeq().reverse().find(predicate,context,notSetValue)},findLastEntry:function(predicate,context,notSetValue){return this.toKeyedSeq().reverse().findEntry(predicate,context,notSetValue)},findLastKey:function(predicate,context){return this.toKeyedSeq().reverse().findKey(predicate,context)},first:function(){return this.find(returnTrue)},flatMap:function(mapper,context){return reify(this,function(iterable,mapper,context){var coerce=iterableClass(iterable);return iterable.toSeq().map((function(v,k){return coerce(mapper.call(context,v,k,iterable))})).flatten(!0)}(this,mapper,context))},flatten:function(depth){return reify(this,flattenFactory(this,depth,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(searchKey,notSetValue){return this.find((function(_,key){return is(key,searchKey)}),void 0,notSetValue)},getIn:function(searchKeyPath,notSetValue){for(var step,nested=this,iter=forceIterator(searchKeyPath);!(step=iter.next()).done;){var key=step.value;if((nested=nested&&nested.get?nested.get(key,NOT_SET):NOT_SET)===NOT_SET)return notSetValue}return nested},groupBy:function(grouper,context){return function(iterable,grouper,context){var isKeyedIter=isKeyed(iterable),groups=(isOrdered(iterable)?OrderedMap():Map()).asMutable();iterable.__iterate((function(v,k){groups.update(grouper.call(context,v,k,iterable),(function(a){return(a=a||[]).push(isKeyedIter?[k,v]:v),a}))}));var coerce=iterableClass(iterable);return groups.map((function(arr){return reify(iterable,coerce(arr))}))}(this,grouper,context)},has:function(searchKey){return this.get(searchKey,NOT_SET)!==NOT_SET},hasIn:function(searchKeyPath){return this.getIn(searchKeyPath,NOT_SET)!==NOT_SET},isSubset:function(iter){return iter="function"==typeof iter.includes?iter:Iterable(iter),this.every((function(value){return iter.includes(value)}))},isSuperset:function(iter){return(iter="function"==typeof iter.isSubset?iter:Iterable(iter)).isSubset(this)},keyOf:function(searchValue){return this.findKey((function(value){return is(value,searchValue)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(searchValue){return this.toKeyedSeq().reverse().keyOf(searchValue)},max:function(comparator){return maxFactory(this,comparator)},maxBy:function(mapper,comparator){return maxFactory(this,comparator,mapper)},min:function(comparator){return maxFactory(this,comparator?neg(comparator):defaultNegComparator)},minBy:function(mapper,comparator){return maxFactory(this,comparator?neg(comparator):defaultNegComparator,mapper)},rest:function(){return this.slice(1)},skip:function(amount){return this.slice(Math.max(0,amount))},skipLast:function(amount){return reify(this,this.toSeq().reverse().skip(amount).reverse())},skipWhile:function(predicate,context){return reify(this,skipWhileFactory(this,predicate,context,!0))},skipUntil:function(predicate,context){return this.skipWhile(not(predicate),context)},sortBy:function(mapper,comparator){return reify(this,sortFactory(this,comparator,mapper))},take:function(amount){return this.slice(0,Math.max(0,amount))},takeLast:function(amount){return reify(this,this.toSeq().reverse().take(amount).reverse())},takeWhile:function(predicate,context){return reify(this,function(iterable,predicate,context){var takeSequence=makeSequence(iterable);return takeSequence.__iterateUncached=function(fn,reverse){var this$0=this;if(reverse)return this.cacheResult().__iterate(fn,reverse);var iterations=0;return iterable.__iterate((function(v,k,c){return predicate.call(context,v,k,c)&&++iterations&&fn(v,k,this$0)})),iterations},takeSequence.__iteratorUncached=function(type,reverse){var this$0=this;if(reverse)return this.cacheResult().__iterator(type,reverse);var iterator=iterable.__iterator(2,reverse),iterating=!0;return new Iterator((function(){if(!iterating)return{value:void 0,done:!0};var step=iterator.next();if(step.done)return step;var entry=step.value,k=entry[0],v=entry[1];return predicate.call(context,v,k,this$0)?2===type?step:iteratorValue(type,k,v,step):(iterating=!1,{value:void 0,done:!0})}))},takeSequence}(this,predicate,context))},takeUntil:function(predicate,context){return this.takeWhile(not(predicate),context)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(iterable){if(iterable.size===1/0)return 0;var ordered=isOrdered(iterable),keyed=isKeyed(iterable),h=ordered?1:0;return function(size,h){return h=imul(h,3432918353),h=imul(h<<15|h>>>-15,461845907),h=imul(h<<13|h>>>-13,5),h=imul((h=(h+3864292196|0)^size)^h>>>16,2246822507),h=smi((h=imul(h^h>>>13,3266489909))^h>>>16)}(iterable.__iterate(keyed?ordered?function(v,k){h=31*h+hashMerge(hash(v),hash(k))|0}:function(v,k){h=h+hashMerge(hash(v),hash(k))|0}:ordered?function(v){h=31*h+hash(v)|0}:function(v){h=h+hash(v)|0}),h)}(this))}});var IterablePrototype=Iterable.prototype;IterablePrototype[IS_ITERABLE_SENTINEL]=!0,IterablePrototype[ITERATOR_SYMBOL]=IterablePrototype.values,IterablePrototype.__toJS=IterablePrototype.toArray,IterablePrototype.__toStringMapper=quoteString,IterablePrototype.inspect=IterablePrototype.toSource=function(){return this.toString()},IterablePrototype.chain=IterablePrototype.flatMap,IterablePrototype.contains=IterablePrototype.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(mapper,context){var this$0=this,iterations=0;return reify(this,this.toSeq().map((function(v,k){return mapper.call(context,[k,v],iterations++,this$0)})).fromEntrySeq())},mapKeys:function(mapper,context){var this$0=this;return reify(this,this.toSeq().flip().map((function(k,v){return mapper.call(context,k,v,this$0)})).flip())}});var KeyedIterablePrototype=KeyedIterable.prototype;function keyMapper(v,k){return k}function entryMapper(v,k){return[k,v]}function not(predicate){return function(){return!predicate.apply(this,arguments)}}function neg(predicate){return function(){return-predicate.apply(this,arguments)}}function quoteString(value){return"string"==typeof value?JSON.stringify(value):String(value)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(a,b){return a<b?1:a>b?-1:0}function hashMerge(a,b){return a^b+2654435769+(a<<6)+(a>>2)|0}return KeyedIterablePrototype[IS_KEYED_SENTINEL]=!0,KeyedIterablePrototype[ITERATOR_SYMBOL]=IterablePrototype.entries,KeyedIterablePrototype.__toJS=IterablePrototype.toObject,KeyedIterablePrototype.__toStringMapper=function(v,k){return JSON.stringify(k)+": "+quoteString(v)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(predicate,context){return reify(this,filterFactory(this,predicate,context,!1))},findIndex:function(predicate,context){var entry=this.findEntry(predicate,context);return entry?entry[0]:-1},indexOf:function(searchValue){var key=this.keyOf(searchValue);return void 0===key?-1:key},lastIndexOf:function(searchValue){var key=this.lastKeyOf(searchValue);return void 0===key?-1:key},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(begin,end){return reify(this,sliceFactory(this,begin,end,!1))},splice:function(index,removeNum){var numArgs=arguments.length;if(removeNum=Math.max(0|removeNum,0),0===numArgs||2===numArgs&&!removeNum)return this;index=resolveBegin(index,index<0?this.count():this.size);var spliced=this.slice(0,index);return reify(this,1===numArgs?spliced:spliced.concat(arrCopy(arguments,2),this.slice(index+removeNum)))},findLastIndex:function(predicate,context){var entry=this.findLastEntry(predicate,context);return entry?entry[0]:-1},first:function(){return this.get(0)},flatten:function(depth){return reify(this,flattenFactory(this,depth,!1))},get:function(index,notSetValue){return(index=wrapIndex(this,index))<0||this.size===1/0||void 0!==this.size&&index>this.size?notSetValue:this.find((function(_,key){return key===index}),void 0,notSetValue)},has:function(index){return(index=wrapIndex(this,index))>=0&&(void 0!==this.size?this.size===1/0||index<this.size:-1!==this.indexOf(index))},interpose:function(separator){return reify(this,function(iterable,separator){var interposedSequence=makeSequence(iterable);return interposedSequence.size=iterable.size&&2*iterable.size-1,interposedSequence.__iterateUncached=function(fn,reverse){var this$0=this,iterations=0;return iterable.__iterate((function(v,k){return(!iterations||!1!==fn(separator,iterations++,this$0))&&!1!==fn(v,iterations++,this$0)}),reverse),iterations},interposedSequence.__iteratorUncached=function(type,reverse){var step,iterator=iterable.__iterator(1,reverse),iterations=0;return new Iterator((function(){return(!step||iterations%2)&&(step=iterator.next()).done?step:iterations%2?iteratorValue(type,iterations++,separator):iteratorValue(type,iterations++,step.value,step)}))},interposedSequence}(this,separator))},interleave:function(){var iterables=[this].concat(arrCopy(arguments)),zipped=zipWithFactory(this.toSeq(),IndexedSeq.of,iterables),interleaved=zipped.flatten(!0);return zipped.size&&(interleaved.size=zipped.size*iterables.length),reify(this,interleaved)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(predicate,context){return reify(this,skipWhileFactory(this,predicate,context,!1))},zip:function(){var iterables=[this].concat(arrCopy(arguments));return reify(this,zipWithFactory(this,defaultZipper,iterables))},zipWith:function(zipper){var iterables=arrCopy(arguments);return iterables[0]=this,reify(this,zipWithFactory(this,zipper,iterables))}}),IndexedIterable.prototype[IS_INDEXED_SENTINEL]=!0,IndexedIterable.prototype[IS_ORDERED_SENTINEL]=!0,mixin(SetIterable,{get:function(value,notSetValue){return this.has(value)?value:notSetValue},includes:function(value){return this.has(value)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=IterablePrototype.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable:Iterable,Seq:Seq,Collection:Collection,Map:Map,OrderedMap:OrderedMap,List:List,Stack:Stack,Set:Set,OrderedSet:OrderedSet,Record:Record,Range:Range,Repeat:Repeat,is:is,fromJS:fromJS}}))},{}],103:[function(require,module,exports){