File: /disk001/machen/public_html/WC/static/js/main.7c030ecc.chunk.js
/*!
=========================================================
* Material Dashboard PRO React - v1.8.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-pro-react
* Copyright 2019 Creative Tim (http://www.creative-tim.com)
* Coded by Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
/*! For license information please see main.7c030ecc.chunk.js.LICENSE.txt */
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[0],{1:function(e,t,r){"use strict";r.d(t,"a",(function(){return $})),r.d(t,"b",(function(){return C})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return _})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return k})),r.d(t,"g",(function(){return F})),r.d(t,"h",(function(){return E})),r.d(t,"i",(function(){return P})),r.d(t,"j",(function(){return T})),r.d(t,"k",(function(){return A})),r.d(t,"l",(function(){return x})),r.d(t,"m",(function(){return S})),r.d(t,"n",(function(){return I})),r.d(t,"o",(function(){return y})),r.d(t,"p",(function(){return L})),r.d(t,"q",(function(){return D})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return O}));var n=r(8),a=r(7),o=r(2),i=r(0),c=r.n(i),l=r(137),s=r(106),u=r.n(s),d=r(10),p=r.n(d),f=r(3),h=r(19),m=r(29);function g(){g=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(k([])));v&&v!==t&&r.call(v,o)&&(m=v);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var b=window.location.hostname.indexOf("localhost")>-1&&"true"===String("true"),v=function(e,t){if(e){var r=f.a.getState().languages||{},n=f.a.getState().session,a=n&&n.language?n.language:"pt-BR",o=e;if(!(e&&e.indexOf("$__")>-1))return e;e.split(" ").map((function(e,t){if(e&&e.indexOf("$__")>-1){var n=e.replace("$__","").trim().toLowerCase();if(b&&!r[n]){console.log("add",n);try{m.a.post("language/add",{name:n})}catch(i){console.log(i)}}r[n]&&r[n].locales.filter((function(e){return e.locale===a})).length>0&&r[n].locales.filter((function(e){return e.locale===a}))[0].name&&(o=o.replace("".concat(e),"".concat(t>0?" ":"").concat(r[n].locales.filter((function(e){return e.locale===a}))[0].name)))}}));var i=o;if(!i)return"";if(!t)return i;if("*"===t)return i.toUpperCase();if(1===t)return i.substring(0,1).toUpperCase().concat(i.substring(1))}};function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"<br/>",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"<br>";if("undefined"===typeof e||null===e)return"";var a=t||"undefined"===typeof t?r:n;return(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+a+"$2")}function x(e,t){if(/^#([0-9a-f]{3}|[0-9a-f]{6})$/gi.test(e)){var r=e.substr(1);r=3==r.length?r.replace(/(.)/g,"$1$1"):r;var n=parseInt(r,16);return"rgba(".concat([n>>16&255,n>>8&255,255&n],", ").concat(t||1,")")}return t&&e&&e.indexOf("rgb")>-1&&-1===e.indexOf("rgba")?e.replace(")",", ".concat(t,")")).replace("rgb(","rgba("):e}function _(e,t){if(f.a)return x(f.a.getState().session.custom[e],t)||e}function O(e){return!!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(e)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u()(JSON.stringify(e)).toString(),r=e.content?e.content:e.message;e.confirm&&(r=c.a.createElement("div",{style:{minWidth:"300px"}},r,c.a.createElement("div",{style:{display:"flex",width:"100%",marginTop:15,justifyContent:"center"}},c.a.createElement(h.a,{shadow:!0,title:v("$__confirm"),text:v("$__confirm"),color:"green",icon:"check",size:"25px",onClick:function(){e.confirm(),l.b.dismiss(t)}}),c.a.createElement(h.a,{shadow:!0,title:v("$__cancel"),text:v("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){l.b.dismiss(t)},style:{marginLeft:15}})))),e.buttons&&e.buttons.length>0&&(r=c.a.createElement("div",{style:{minWidth:"300px"}},r,c.a.createElement("div",{style:{width:"100%",marginTop:15,justifyContent:"center"}},e.buttons.map((function(r,n){return c.a.createElement(h.a,Object.assign({key:n},r,{style:Object(o.a)(Object(o.a)({},e&&e.style?e.style:{}),{},{marginBottom:10}),onClick:function(){r.onClick&&r.onClick(),l.b.dismiss(t)}}))})))));var n=Object(o.a)(Object(o.a)(Object(o.a)({toastId:t,position:l.b.POSITION.BOTTOM_RIGHT},e.options?e.options:{}),e.persist?{}:{autoClose:e.autoClose?e.autoClose:2e3}),{},{style:{minWidth:"300px"}});return"left"===e.horizontal&&(n=Object(o.a)(Object(o.a)({},n),{},{position:l.b.POSITION.BOTTOM_LEFT})),"right"===e.horizontal&&(n=Object(o.a)(Object(o.a)({},n),{},{position:l.b.POSITION.BOTTOM_RIGHT})),"center"===e.horizontal&&(n=Object(o.a)(Object(o.a)({},n),{},{position:l.b.POSITION.BOTTOM_CENTER})),l.b.isActive(t)||("info"!==e.variant&&e.variant||l.b.info(r,n),"success"===e.variant&&l.b.success(r,n),"warning"===e.variant&&l.b.warn(r,n),"error"===e.variant&&l.b.error(r,n)),!0}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!e)return"";var r=e.replace(/\D/g,"");if((r.match(/./g)||[]).length>1){var n=(r=e.replace(",",".")).split(".");if(1===n.length)return parseFloat(r);r=r.replaceAll(".".concat(n[n.length-1]),""),r=String(r).replaceAll(".","");var a=n[n.length-1].substring(0,t);r="".concat(r,".").concat(a)}return r},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decimal",r=arguments.length>2?arguments[2]:void 0;if(!e)return"";var n=f.a.getState(),a=n.session,o=String(e).replace(",","."),i=t;if("number"===i||"time"===i||"decimal"===i)i="decimal";else{if("percent"===i)return"".concat(o,"%");if("currency"!==i)return String(e)}var c=new Intl.NumberFormat(a.custom.locale,{style:i,currency:r||(a.custom.currency?a.custom.currency:"BRL")});return c.setMaximumFractionDigits="number"===t?0:2,c.format(o)},S=function(e,t){var r=f.a.getState().languages[t.alias]&&f.a.getState().languages[t.alias].locales?Array.from(f.a.getState().languages[t.alias].locales):[];r.flatMap((function(e){if(e.locale===t.locale)return[e.name=t.text]})),0===r.filter((function(e){return e.locale===t.locale})).length&&r.push({_id:t._id,locale:t.locale,name:t.text}),e.reduxFunction("ASYNC","SET_LANGUAGE",Object(o.a)(Object(o.a)({},f.a.getState().languages),{},Object(a.a)({},t.alias,Object(o.a)(Object(o.a)({},f.a.getState().languages[t.alias]&&f.a.getState().languages[t.alias]),{},{locales:r}))))},k=function(){var e=Object(n.a)(g().mark((function e(t,r,n){var i,c,l,s=arguments;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.length>3&&void 0!==s[3]&&s[3],i=f.a.getState(),c=i.db,l="cards",c.cards[r._id]?l="cards":c.users[r._id]&&(l="users"),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},f.a.getState().db),{},Object(a.a)({},l,Object(o.a)(Object(o.a)({},f.a.getState().db[l]),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},f.a.getState().db[l][r._id]),{},{deleted:!0}))))));case 5:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),L=function(e){for(var t="\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\u0154\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff\u0155",r="",n=0;n<e.length;n++){for(var a=!1,o=0;o<t.length;o++)if(e.substr(n,1)==t.substr(o,1)){r+="AAAAAAACEEEEIIIIDNOOOOOOUUUUYRsBaaaaaaaceeeeiiiionoooooouuuuybyr".substr(o,1),a=!0;break}0==a&&(r+=e.substr(n,1))}return r},C=function(e,t,r){if(!t||t&&!t.trim())return c.a.createElement("span",{style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:y(e)}});var n=y(e).split(new RegExp("(".concat(t.replace("*.","."),")"),"gi"));return c.a.createElement("span",null," ",n.map((function(e,n){return c.a.createElement("span",{key:n,style:e.toLowerCase()===t.toLowerCase()?{fontWeight:"bold",paddingTop:"3px",paddingBottom:"3px",backgroundColor:"#ffff00b3",color:r?"#000000 !important":""}:{},dangerouslySetInnerHTML:{__html:y(e)}})}))," ")},I=function(e){var t=y(e).split("\n"),r="";return t.map((function(e){e.split(" ").map((function(e){var t=e.split("\n");if(t.length>0)t.map((function(e){if(e.indexOf(".youtube.com/watch?")>-1){var t=e.split("?")[1].split("v=")[1].split("&")[0];t&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(t,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else if(e.indexOf("//youtu.be/")>-1){var n=e.split(".be/")[1];n&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else e.indexOf("http://")>-1||e.indexOf("https://")>-1?r+='<a style="word-break:break-all" href="'.concat(e.replace("<br/>",""),'" target="_blank">').concat(e,"</a>"):r+=e})),r+=" ";else if(t[0].indexOf(".youtube.com/watch?")>-1&&t[0].split("?").length>1&&t[0].split("?")[1].split("v=").length>1){var n=t[0].split("?")[1].split("v=")[1].split("&")[0];n&&(r+='<iframe width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else t[0].indexOf("http://")>-1||t[0].indexOf("https://")>-1?r+='<a href="'.concat(t[0].replace("<br/>",""),'" target="_blank">').concat(t[0]," </a>"):r+="".concat(e," ")})),r+=""})),r},T=function(){var e=f.a.getState().session,t={};return e&&e._access&&(t=e._access),t},F=function(){var e=Object(n.a)(g().mark((function e(t,r){var n,a,o=arguments;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>2&&void 0!==o[2]&&o[2],a=f.a.getState(),a.db,n){e.next=14;break}return e.prev=3,e.next=6,m.a.put("/node/favorite",{_id:r});case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.log(e.t0);case 12:e.next=23;break;case 14:return e.prev=14,e.next=17,m.a.delete("/node/favorite/".concat(r));case 17:e.sent,e.next=23;break;case 20:e.prev=20,e.t1=e.catch(14),console.log(e.t1);case 23:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})));return function(t,r){return e.apply(this,arguments)}}(),N=function(e){for(var t=e;1===t.length;)t="0"+t;return t},D=function(e,t){var r,n,a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FFFFFF",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#000000",c=e;if(c.indexOf("rgba")>-1){var l=(c=c.replace("rgba(","")).split(",");r=l[0],n=l[1],a=l[2]}else{if(0===c.indexOf("#")&&(c=c.slice(1)),3===c.length&&(c=c[0]+c[0]+c[1]+c[1]+c[2]+c[2]),6!==c.length)throw new Error("Invalid HEX color.");r=parseInt(c.slice(0,2),16),n=parseInt(c.slice(2,4),16),a=parseInt(c.slice(4,6),16)}return t?.299*r+.587*n+.114*a>186?i:o:(r=(255-r).toString(16),n=(255-n).toString(16),a=(255-a).toString(16),"#"+N(r)+N(n)+N(a))},A=function(e){var t=0;return t=(null===e||void 0===e?void 0:e.low)?parseInt(e.low):parseInt(e),p()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===p()(1e3*t).tz("America/Sao_Paulo").format("DD/MM/YYYY")?p()(1e3*t).tz("America/Sao_Paulo").format("H:mm"):p()(new Date).tz("America/Sao_Paulo").format("YYYY")===p()(1e3*t).tz("America/Sao_Paulo").format("YYYY")?p()(1e3*t).tz("America/Sao_Paulo").format("DD/MM H:mm"):p()(1e3*t).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")};function P(e){return e>=1073741824?e=(e/1073741824).toFixed(2)+" GB":e>=1048576?e=(e/1048576).toFixed(2)+" MB":e>=1024?e=(e/1024).toFixed(2)+" KB":e>1?e+=" bytes":1==e?e+=" byte":e="0 bytes",e}function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var r=1024,n=t<0?0:t,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(n))+" "+a[o]}},1016:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},1017:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},1023:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAG2YAABzjgAA+swAAIT6AAB5gQAA/RMAADBtAAASKQ0eJk4AAAMAUExURevr7Jydn5manJucnuPj5JiZm9vb3PT09MvLzMLCw5GSlPr6+qeoqdXV1tHR0rW1trW2uKusrbi4urO0tLq6vKiqq7e4uLW2tqGipLm6ury8vr6+vr+/wLu8vM7OztDQ0cjJytjY2dTU1aipqqqrrMXGxqanqKmqq6Wmp9LT062usKSlprS0ta2trra2t6ytrqWmqK2ur66vsK6ur7CwsbOztK+vsK+wsbKys7GxsqOkpqOkpZ6foampq6qqrJ2eoKenqaysraKjpZqbnbi4uaKjpKSlp5eYmqioqqurrKChory8vKGio6amqKCho7Gys7CxsrGysrKzs5+gop+gobS1tbq6u7e3uLCxsbKztLi4uJWWmJaXmba3t7i5ub29vZWXmZSWmLq6upOVl5SVl7m5up6foLq7u7u7vJqcnZOUlpeZm5aYmpKUlry8vZKTlpGTlZCRlJCRk6ytr9bX197e3q+vsb2+v8DAweDh4bOztebm5ujp6e/v756eoP///4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zMzM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///zfARREAAAeqSURBVHja7N3xVxJZFMBxQAQVilzPSTslBxcDdwdtBQRBDQUFBYNMDTcoNLAMM7QD23JozvvX94cJZBhQZ+bdO2/26F/Q59wv8K48JwP5n/wY7iH3kHvIPYT6D89bLBazfiF8Y+T09PT09MOHzc3Nd+8yeoTwb99+/PjkSbfj8eN83qYPSCOTOTs7O3veEP69UkcegEIdMpPJCI6zz5/f9p9HPp9//97KMsTwLZO5o2Nh4RmrkHrpmxzHwsICzyLEWSq1IXd1TE6aWYNYSqVSqSRzHpOTDsdDliC2ksBQ4HA4zOxA6iURRJ7DccizAbE9fVpyNXhlXTkcjsNDHxMQKyGEWBV35Tg89Pl8rKTVUtHVoc/n89mYgPBK3686Dt8EIcQwMzOjKUTF+1XHMbG0tLT095s3y8vL77WCqHq/Ehy+Lsdybm9aC4irRKGrLkcut7cXiUTQIS1588jfPo/cXiQSibxGhtTpdyU4kCElyq/zXMdx9AwT0qI+j1zbEQwiQmyUX+fXXR0Fg0EXGsQK1dXRUTAYDIbRIJBdBYNhNIgFsqtgOBx2IkFguwqHQyEcSAu2q3AICwLcVSjEh1oYEPCuQgbix4A4obsK+QmPAwHtKhTy+3+gvEacsF2F/H5/wIAIAevK7/cHAhgQgPNuzzwCgcAiFgSoK3/bgQWhuUdJuwosYkGgu1pcnDdgQCju5wPmMY8CAeyqPY/5+To8BKErPAjY50fb8QIHAnIu6Z7HCxwI0Lmk24ECge8KB4LQ1YuNDYS3X4SuNjbGESAIXW2M40DAuxofH0c4ayF0hQNB6AoJAt8VDgShq/GdHQwIYFfteezMIkCgzrsiBwZkhPp+LulqFgXyB/X9XDoPFEgTviscCE99P+/+/PjlwIAQ6vu5dB4vX2JAALvaaTu8OBCoc0m7q5deHAjYuaQzD68fAwJ3Luk4vC4MyAh4V17vAwxIE7orr9fLY0AIdFde7xpBg8B09cuBCAHtyrvmxoLAdrXm/h0DUgfvas3tdvPQEBdCV2632+3eHgWFwL9ftR12+yYg5CfIfi7pyu3ettvtdkAI2B4lnYfdbndBQiD28wGO9XUwiAFmP5e8zu0CxGOFgrgQu1pf93hcUJA84HlX/DoXIDkoCNB+3r8rj8fjgYIA7ef9u4KGoHXl8XheAUKAzyXdXXlezcFBwM8lXV29moODoHY1BwfB7QoSgtoVIARuj+rXFTAEtCvxPJKPoCBm1K6SyZ9gx3jorrodc0kObh/B7CrJzQJCELviZA1EJsQAtp9LuwKFENA9SjwPbhoSYgbbzwVGl0PeQGT/gg5sP+/tipuFhRCkruQORD5kFPa8qzAsJb/Ehj3v/uqKM8NDSANmPxd11cD5fgS8K5Q/3yOE2L7l9vYWALpKPuI4jsP7M3DhB+JcovyBbmoeJ0K/K45oASG0u0py09pAND7v0oM0qe7nSU4zCKG7R2kJofw5yGsFcVLcz1UOROXztah2pSWE6vkqatUO0qS2n3McFyXaQYiP2h6l0qH6qYCU9nMuGmUBon6P4qLRh9pCrJS6UjsQ9Q+cXKKwR3HRaPQfrSGESlfRFaI5pK7284OKg8aDiyl0tcIEpKV4j6LooPIoaYParlZ4NiBE2X5+7fiXMAIh6rpaIcxAeDVdUXHQem78A/n7ecfRYAlCphXsURTnQfG/JJC/RwkO9iCy9yjBEWcNoqyrlTiTEPldxZmEKOgqHt9iDyL782MlHo9vsQeRtZ9fO5iDyNyjOg72IIq62tqaYg0ib4+6drAJkd3VFJMQBV1NTe2yC5HTFZOQO+9R3fPYZQ4iu6spwcEq5PY9StTV7m6WLYjtVFlXu9nsCDMQi9+ruKtsNptOp9N/WTWHmJ/I2s8l88im0+n0/v7+Qc6mHcSiZI8a4Dg4OFhdVXGnRjHks9I9StpVx7G6uvrpU8yJCHmudD+/cR6CIxaLxR5gQJT/3ufOjljMaDQ6ASHN18q+P5fRVcdhNBqNQ9tWAEhL+ffnCuZhNBqNQ0NDQ0N+qpCmyu85lTu+fEkkEnYLDcio6u/PFXbVcSQSiYTJ5FQFeU7le0518xAcJpPJNKMMUqL0/Tk1h2l4eHh4RB6kPkHlHvKA827HsS/bMXx+nvqtdUcItfvt9OcxfH6eSqVSqa8/boU06d2/AnR8LRaLN0Pq9O6339aVckfqa7FYLB7fBKF0DxlhHsXj42PjQEgIqqspCEehUBgA8dG5347S1fFxoVAo2PpCWrrqqlAoFE5OWn0gBr11VTg5Oan0gdC63w45j1Svo2KVQujdQ8bq6qRSqVQkkAlq95DxuqpUKmUJhNb9dsyuKpVyeVQC0WNX5XK52gOx6LKrcrlabYghE5Tut+N2VS5Xq3YxhNo9ZNyuqtXqhQhipXS/HburavVCDKkzvUcN7qp60QPZ1GtXFxc1EYTV/fwaMmgetV4Iu/v5jV3VarW6CML2fj64q1qt9mc3hPX9fPA8ape9ED3sUX3mcXl5KYboY4/q5xgTQdjfz/t31QvRb1djYz0QvXYlhbC/n/ftqgeinz1KMo8eiG72KKlDBNHPHtXbVT+ILrsaG7vqgei0q6ur770QfXZ19V2A/DcAHpmC7NcZ4/wAAAAASUVORK5CYII="},1026:function(e,t,r){"use strict";(function(e){var n,a=r(2),o=r(63),i=r(0),c=r.n(i),l=r(10),s=r.n(l),u=r(48),d=r(14),p=r(3),f=r(12),h=r(13),m=r(69),g=r(152),b=r(544),v=r(121),y=r(11),x=r(1069),_=r(1737),O=r(746),w=r(23),j=r(546),E=r(91),S=r.n(E),k=r(1),L=u.default.div(n||(n=Object(o.a)(["\n","\n","\n","\n","\n","\n","\n width:calc(100%) !important;\n margin-top:7px;\n margin-right:7px;\n padding:15px;\n"])),(function(e){return e.selectable&&e.selected?"\n opacity:1;":e.selectable?"\n opacity:0.5;":""}),(function(e){return e.locked?"cursor:no-drop !important;":"cursor:pointer;"}),(function(e){return e.priority?"border-left:5px solid ".concat(e.priority,";"):""}),(function(e){return!e.selectable&&e.selected?"border-bottom:solid 5px ".concat(Object(k.d)("color"),";"):""}),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88;\n max-width:320px;":""}),(function(e){return e.inLine?"position:relative;\n float:left;\n margin:1px;\n width:calc(20% - 7px);\n // maxWidth:320px;\n ":"\n width:calc(100%) !important;\n margin:1px 0px 1px 0px;\n "}));t.a=Object(h.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(f.b)(d,e)}))(Object(w.a)(j.a)((function(t){var r,n,o=t.classes,i=p.a.getState().db,l=t.data&&t.data._id?p.a.getState().db.cards[t.data._id]:{},u=Object.keys(p.a.getState().db.cards).filter((function(e){return p.a.getState().db.cards[e]&&l&&l._parent&&p.a.getState().db.cards[l._parent]&&p.a.getState().db.cards[e]._parent===p.a.getState().db.cards[l._parent]._parent&&"step"===p.a.getState().db.cards[e].type&&!p.a.getState().db.cards[e].deleted})).sort((function(e,t){var r=parseInt(p.a.getState().db.cards[e].step),n=parseInt(p.a.getState().db.cards[t].step);return r<n?-1:r>n?1:0})).map((function(e){return p.a.getState().db.cards[e]}));return c.a.createElement(L,Object.assign({},(null===t||void 0===t||null===(r=t.provided)||void 0===r?void 0:r.draggableProps)||{},{ref:(null===t||void 0===t?void 0:t.provided)&&(null===(n=t.provided)||void 0===n?void 0:n.innerRef)||null,isDragging:t.snapshot&&t.snapshot.isDragging||!1,isDragDisable:l.isDragDisable||t.isDragDisable||!1,inLine:t.inLine||null,className:o.container,selectable:t.showSelected||!1,selected:l._selected||!1,priority:l.priority?i.priority.filter((function(e){return String(e.value)===String(l.priority)}))[0].color:null,locked:t.locked||!1,onClick:function(){t.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},p.a.getState().sideModule),{},{db:"cards",id:l._id,module:"cardEdit",activeModule:p.a.getState().db.dataType.filter((function(e){return e.name===l.type}))[0].iniModule||e,data:l}))}}),c.a.createElement("div",t.provided&&t.provided.dragHandleProps||{},c.a.createElement("div",{style:{position:"relative",alignItems:"center"}},c.a.createElement("div",{style:{width:"100%",padding:"7px",display:"flex",justifyContent:"space-between"}},l.name?l.name:Object(k.r)("$__new",1),c.a.createElement(b.a,{nodeId:l._id})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},c.a.createElement("div",null,Object(k.r)("$__step","*")," ",u.findIndex((function(e){return e._id===l._parent}))+1," ",Object(k.r)("$__of")," ",u.length),c.a.createElement("div",{style:{position:"relative",width:"100%",border:"solid 1px rgba(0,0,0,0.1)",justifyContent:"space-between",display:"flex",alignItems:"center",borderRadius:7}},u.map((function(e,t){return c.a.createElement(v.a,{arrow:!0,key:e._id,title:c.a.createElement("div",null,e.name," (",u.findIndex((function(e){return e._id===l._parent}))>t?Object(k.r)("$__completed"):u.findIndex((function(e){return e._id===l._parent}))===t?Object(k.r)("$__".concat(l.status)):Object(k.r)("$__waitingForPreviousStep"),")")},c.a.createElement("div",{key:e._id,style:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({height:7},u.findIndex((function(e){return e._id===l._parent}))>t?{backgroundColor:"#02b915"}:{}),u.findIndex((function(e){return e._id===l._parent}))===t?{backgroundColor:"#00a2e9"}:{}),u.findIndex((function(e){return e._id===l._parent}))<t?{backgroundColor:"#e9e9e9"}:{}),{},{width:"-webkit-fill-available",border:"solid 1px #FFFFFF"})}))})),c.a.createElement(v.a,{arrow:!0,title:c.a.createElement("div",null,Object(k.r)("$__".concat(l.status),"*"))},c.a.createElement("div",null,c.a.createElement(y.a,{color:p.a.getState().db.status.filter((function(e){return e.value===l.status}))[0].color},p.a.getState().db.status.filter((function(e){return e.value===l.status}))[0].icon))))),c.a.createElement("div",{style:{width:"100%",padding:"7px",clear:"both"}},(l.startDate||l.endDate||l.startDate||l.endDate)&&c.a.createElement("div",{className:o.dates},l.startDate&&c.a.createElement("div",{className:o.dateInfo},c.a.createElement(m.a,{overlap:"rectangular",className:o.dateIco,icon:"insert_invitation",title:"startDate",size:"14px",disabled:!0}),new Date(1e3*l.startDate)instanceof Date&&!isNaN(new Date(1e3*l.startDate))?s()(new Date(1e3*l.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(l.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),l.endDate&&c.a.createElement("div",{className:o.dateInfo},c.a.createElement(m.a,{overlap:"rectangular",className:o.dateIco,icon:"event_available",title:"endDate",size:"14px",disabled:!0}),new Date(1e3*l.endDate)instanceof Date&&!isNaN(new Date(1e3*l.endDate))?s()(new Date(1e3*l.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(l.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))),l&&l._users&&Object.keys(l._users).length>1&&c.a.createElement("div",{className:o.usersContent},c.a.createElement("div",{className:o.users},c.a.createElement(_.a,{max:4},Object.keys(l._users).map((function(e,t){if(l._users[e]&&l._users[e].name)return c.a.createElement(O.a,{title:l._users[e].name,key:e},c.a.createElement(x.a,{alt:l._users[e].name,src:l._users[e].image||S.a},l._users[e].name.substr(0,1)))})))))),c.a.createElement(g.a,{options:l._tags,showOptions:!1}))))})))}).call(this,r(479)(e))},1027:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},1028:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},1038:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},108:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M3,19.77a1,1,0,0,1,.29-.7l2.43-2.43a1,1,0,0,1,1.41,0,1,1,0,0,1,0,1.42L4.65,20.48a1,1,0,0,1-1.41,0A1,1,0,0,1,3,19.77Z"}),a.default.createElement("path",{d:"M3,19.77a1,1,0,0,1,.29-.7l2.43-2.43a1,1,0,0,1,1.41,0,1,1,0,0,1,0,1.42L4.65,20.48a1,1,0,0,1-1.41,0A1,1,0,0,1,3,19.77Z"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M3.15,4.67A1,1,0,0,1,4.86,4L7.28,6.38a1,1,0,0,1,0,1.42,1,1,0,0,1-1.41,0L3.44,5.37A1,1,0,0,1,3.15,4.67Z"}),a.default.createElement("path",{d:"M15.67,17.18a1,1,0,0,1,.29-.7,1,1,0,0,1,1.41,0L19.8,18.9a1,1,0,0,1-1.42,1.42L16,17.89A1,1,0,0,1,15.67,17.18Z"}),a.default.createElement("path",{d:"M15.67,7.09A1,1,0,0,1,16,6.38L18.38,4A1,1,0,0,1,19.8,4a1,1,0,0,1,0,1.41L17.37,7.8A1,1,0,0,1,16,7.8,1,1,0,0,1,15.67,7.09Z"}),a.default.createElement("path",{d:"M.73,12a1,1,0,0,1,1-1H6.58a5.26,5.26,0,0,1,4.13-4.13V1.44a1,1,0,1,1,2,0V7.78a1,1,0,0,1-1,1A3.23,3.23,0,0,0,8.48,12a1,1,0,0,1-1,1H1.73A1,1,0,0,1,.73,12Z"}),a.default.createElement("path",{d:"M10.71,22.56V16.22a1,1,0,0,1,1-1A3.22,3.22,0,0,0,14.93,12a1,1,0,0,1,1-1h6.34a1,1,0,0,1,0,2H16.83a5.23,5.23,0,0,1-4.12,4.13v5.43a1,1,0,0,1-2,0Z"}))),"Brigth");t.default=o},1093:function(e,t,r){e.exports=r(1718)},11:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(2),a=r(0),o=r.n(a),i=r(747),c=r(121),l=r(1);function s(e){return o.a.createElement(c.a,{title:e.title?Object(l.r)(e.title,1):""},"string"===typeof e.icon||"string"===typeof e.children?o.a.createElement(i.a,{className:e.className?e.className:"",style:Object(n.a)({position:"".concat(e.static?"static":""),display:"flex",justifyContent:"center",alignItems:"center",height:e.size||"22px",width:e.size||"22px",fontSize:e.size||"22px",color:e.color||Object(l.d)("medium"),opacity:e.disabled?"0.5":"1",cursor:e.onClick?"pointer":""},e.style),onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null},e.icon||e.children):o.a.createElement(e.icon,{className:e.className?e.className:"",style:Object(n.a)({width:e.size||"22px",height:e.size||"22px",fontSize:e.size||"22px",color:e.color||Object(l.d)("medium"),opacity:e.disabled?"0.5":"1",cursor:e.onClick?"pointer":"",margin:"auto"},e.style),onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null}))}},1102:function(e,t){},1151:function(e,t){},1152:function(e,t){},1153:function(e,t){},1154:function(e,t){},1155:function(e,t){},121:function(e,t,r){"use strict";var n=r(23),a=r(746),o=Object(n.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",fontSize:e.typography.pxToRem(12),border:"1px solid #dadde9",borderRadius:"7px",boxShadow:"0 0 3px 3px rgba(0,0,0,0.03)",display:"flex",alignItems:"center",justifyContent:"center"}}}))(a.a);t.a=o},124:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M5.9,12.6C5.9,12.6,5.8,12.6,5.9,12.6l-0.1-0.1c0,0,0,0,0,0l0,0c0,0-0.1,0-0.1,0H3.1c0,0-0.1,0-0.1,0l-0.1,0\n\t\t\tc0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0.1,0,0.1\n\t\t\tc0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0.1,0.1l8.8,8.8v-1.2l-7.4-7.4h1.3l6.1,6.1v-1.2L5.9,12.6L5.9,12.6z M2.9,12.7\n\t\t\tL2.9,12.7L2.9,12.7L2.9,12.7z M2.8,13L2.8,13L2.8,13L2.8,13z M2.9,13.1L2.9,13.1L2.9,13.1L2.9,13.1z"}),a.default.createElement("path",{d:"M5.9,12.6C5.9,12.6,5.8,12.6,5.9,12.6l-0.1-0.1c0,0,0,0,0,0l0,0c0,0-0.1,0-0.1,0H3.1c0,0-0.1,0-0.1,0l-0.1,0\n\t\t\tc0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0.1,0,0.1\n\t\t\tc0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0.1,0.1l8.8,8.8v-1.2l-7.4-7.4h1.3l6.1,6.1v-1.2L5.9,12.6L5.9,12.6z M2.9,12.7\n\t\t\tL2.9,12.7L2.9,12.7L2.9,12.7z M2.8,13L2.8,13L2.8,13L2.8,13z M2.9,13.1L2.9,13.1L2.9,13.1L2.9,13.1z"}),a.default.createElement("path",{d:"M18.9,13C18.9,13,18.9,13,18.9,13c0-0.1,0-0.1,0-0.2l-0.1-0.2c0,0,0,0,0,0v0l-0.1,0c0,0,0,0-0.1-0.1l0,0\n\t\t\tc0,0,0,0,0,0l0,0c0,0-0.1,0-0.1,0H16c0,0-0.1,0-0.1,0l0,0c0,0,0,0,0,0l-0.1,0c0,0,0,0,0,0l-3.2,3.2l0,0v1.2l3.7-3.7h1.2l-4.8,4.8\n\t\t\tl0,0v1.2l6.2-6.2l0,0v0c0,0,0,0,0,0l0,0l-0.1-0.1L18.9,13L18.9,13z M18.7,12.8L18.7,12.8L18.7,12.8L18.7,12.8z"}),a.default.createElement("path",{d:"M18.1,11.3L18.1,11.3c0.1,0,0.1,0.1,0.1,0.1l0,0c0,0,0,0,0,0l0,0c0,0,0.1,0,0.1,0h2.5c0,0,0.1,0,0.1,0\n\t\t\tl0.2-0.1c0,0,0,0,0.1,0l0,0c0,0,0,0,0-0.1l0.1-0.2c0,0,0-0.1,0-0.1c0,0,0-0.1,0-0.1l0-0.1c0,0,0,0,0-0.1c0,0,0,0,0-0.1L12.5,2v1.2\n\t\t\tl7.4,7.4h-1.3l-6.1-6.1v1.2L18.1,11.3L18.1,11.3z M18.3,11.3L18.3,11.3L18.3,11.3L18.3,11.3z"}),a.default.createElement("path",{d:"M12.9,11.5H16c0,0,0.1,0,0.1,0l0.1-0.1c0,0,0,0,0,0l0.1,0v0c0,0,0,0,0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0\n\t\t\tc0,0,0-0.1,0-0.1c0,0,0-0.1,0-0.1l0-0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l-3.8-3.9l0,4.1C12.5,11.3,12.7,11.5,12.9,11.5z"}),a.default.createElement("path",{d:"M5.2,10.8C5.2,10.8,5.2,10.8,5.2,10.8C5.2,10.8,5.2,10.9,5.2,10.8l-0.1,0.2L5.3,11l-0.2,0c0,0,0,0.1,0,0.1\n\t\t\tc0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0.1,0.1l0,0c0,0,0,0,0,0l0.1-0.1h0l0,0.1l0.1-0.1l0,0.1c0,0,0,0,0.1,0\n\t\t\tc0,0,0.1,0,0.1,0H8c0,0,0.1,0,0.1,0l0,0c0,0,0,0,0,0l0.1,0c0,0,0,0,0,0l3.2-3.2V6.9l-3.7,3.7H6.6l4.9-4.9V4.5L5.2,10.8L5.2,10.8z\n\t\t\t M5.3,11.1L5.3,11.1L5.3,11.1L5.3,11.1z"}),a.default.createElement("path",{d:"M11.1,12.5H8c0,0-0.1,0-0.1,0l-0.1,0c0,0,0,0,0,0l0,0c0,0,0,0-0.1,0.1c0,0,0,0-0.1,0.1l0,0.1l0.1,0.1l-0.2,0\n\t\t\tl0,0c0,0,0,0.1,0,0.1c0,0,0,0.1,0,0.1l0.1,0.1c0,0,0,0,0.1,0.1l3.8,3.8v-4.1C11.5,12.7,11.3,12.5,11.1,12.5z M7.8,12.8\n\t\t\tC7.8,12.8,7.8,12.8,7.8,12.8L7.8,12.8L7.8,12.8z M7.7,12.9L7.7,12.9L7.7,12.9L7.7,12.9z"}),a.default.createElement("path",{d:"M21.3,12.6L21.3,12.6c-0.2-0.2-0.4-0.2-0.6,0l-8.1,8.1l0,0V22l8.8-8.8c0.1-0.1,0.1-0.2,0.1-0.3\n\t\t\tC21.4,12.8,21.3,12.7,21.3,12.6z"}),a.default.createElement("path",{d:"M2.7,11.4L2.7,11.4c0.1,0.1,0.2,0.1,0.3,0.1c0.1,0,0.2,0,0.3-0.1l8.2-8.2V2l-8.8,8.8\n\t\t\tC2.6,10.9,2.6,11.2,2.7,11.4z"})),"Matrix");t.default=o},1359:function(e,t){},1361:function(e,t){},1371:function(e,t){},1373:function(e,t){},1398:function(e,t){},14:function(e,t,r){"use strict";function n(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;return{type:e,action:t,value:r,next:n,preLoader:a,redirect:o}}r.r(t),r.d(t,"reduxFunction",(function(){return n}))},1400:function(e,t){},1401:function(e,t){},1406:function(e,t){},1408:function(e,t){},1414:function(e,t){},1416:function(e,t){},1435:function(e,t){},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),a=(r(1009),r(29));function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(C){s=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=u;var p={};function f(){}function h(){}function m(){}var g={};s(g,i,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(k([])));v&&v!==t&&r.call(v,i)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),s(y,l,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}var i=function(){var e=Object(n.a)(o().mark((function e(t,r){var i,c,l,s,u,d=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>2&&void 0!==d[2]&&d[2],c=d.length>3?d[3]:void 0,(l=r).originalName=l.name,(s=new FormData).append("file",l,l.name),s.append("id",t),e.next=9,new Promise(function(){var e=Object(n.a)(o().mark((function e(t,r){var n,i,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!c||!c.onUploadProgress){e.next=9;break}return n=c.onUploadProgress,e.next=5,a.a.post("upload/file/",s,{onUploadProgress:n});case 5:(i=e.sent)&&(u=i.data),e.next=13;break;case 9:return e.next=11,a.a.post("upload/file/",s);case 11:(l=e.sent)&&(u=l.data);case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),c&&c.onUploadError&&c.onUploadError(e.t0),r(!1);case 19:return e.prev=19,t(!0),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])})));return function(t,r){return e.apply(this,arguments)}}());case 9:if(!e.sent){e.next=18;break}if(i){e.next=15;break}return e.abrupt("return","https://machen.azureedge.net/".concat(u.file));case 15:return e.abrupt("return",u);case 16:e.next=19;break;case 18:return e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},1447:function(e,t){},1450:function(e,t){},152:function(e,t,r){"use strict";var n=r(2),a=r(6),o=r(4),i=r(1),c={tags:Object(n.a)(Object(n.a)({},o.l),{},{position:"absolute",width:"100%",right:"0px",bottom:"-6px",userSelect:"none",height:"6px",marginBottom:"0px",display:"flex",justifyContent:"flex-end",overflow:"hidden","& .tag":{width:"15px",marginRight:"3px",cursor:"pointer",height:"6px",borderRadius:" 0px 0px 3px 3px"}}),tagsOver:Object(n.a)(Object(n.a)({},o.l),{},{position:"relative",width:"100%",userSelect:"none",marginTop:"5px",marginBottom:"5px",height:"auto",overflow:"hidden","& .tag":{fontSize:"12px",padding:"0 5px",margin:"3px",borderRadius:" 5px",color:Object(i.d)("light")}})},l=r(0),s=r.n(l),u=r(3),d=r(11),p=r(230),f=r(749),h=r(746),m=r(426),g=Object(m.a)(c);t.a=function(e){var t=g(),r=s.a.useState(!!e.showOptions),o=Object(a.a)(r,2),c=o[0],l=o[1],m=s.a.useState(!1),b=Object(a.a)(m,2),v=b[0],y=b[1],x=s.a.useState([]),_=Object(a.a)(x,2),O=_[0],w=_[1];return s.a.useEffect((function(){return w(u.a.getState().db[e.dbNode?e.dbNode:"tag"]),function(){w([]),y(!1)}}),[e.options]),s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:c||e.expanded?t.tagsOver:t.tags,onClick:function(t){e.options&&e.options.length>0&&!c&&l(!0),t.stopPropagation()},onMouseOver:function(){y(!0)},onMouseLeave:function(){setTimeout((function(){y(!1)}),500)}},O&&O.length>0&&e.options&&e.options.filter((function(e){return e.value})).map((function(t,r){var a=t;if(u.a.getState().db.tag.filter((function(e){return e.value===t.value})).length>0){a=u.a.getState().db.tag.filter((function(e){return e.value===t.value}))[0];var o=O.filter((function(e){return e.value===a.value})).length>0&&O.filter((function(e){return e.value===a.value}))[0].color?O.filter((function(e){return e.value===a.value}))[0].color:Object(i.d)("medium");return s.a.createElement("div",{key:r,className:"tag",style:Object(n.a)({position:"relative",float:"left",whiteSpace:"nowrap",backgroundColor:o},e.rounded?{borderRadius:"7px !important"}:{}),onClick:function(){e.colorPicker||e.showOptions||l(!1)}},!e.showOptions&&c&&e.colorPicker?s.a.createElement(p.a,{label:a.label,color:o,_id:a.value,onChange:function(e){var t=a;t.color=e,u.a.getState().functions.socket.emit("tag.UPD",t)}}):(c||e.expanded)&&s.a.createElement("div",{className:"tag",style:Object(n.a)({backgroundColor:o,color:a.color?Object(i.q)(a.color,!0):"#FFFFFF",display:"flex",alignItems:"center"},e.rounded?{borderRadius:"7px !important"}:{})},a.parent&&u.a.getState().db.tag.filter((function(e){return e.value===a.parent})).length>0?s.a.createElement("div",{style:{fontSize:8,marginRight:3}},u.a.getState().db.tag.filter((function(e){return e.value===a.parent}))[0].label," / "):s.a.createElement(s.a.Fragment,null),a.label))}})),!e.showOptions&&c&&!e.expanded&&v&&s.a.createElement("div",{style:{position:"absolute",top:"0",right:"0"}},s.a.createElement(h.a,{title:Object(i.r)("$__hideTags")},s.a.createElement(s.a.Fragment,null,s.a.createElement(f.a,{onClick:function(t){e.showOptions||l(!1)}},s.a.createElement(d.a,{size:"22px",color:Object(i.d)("medium"),icon:"visibility_off"})))))))}},153:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(426),i=r(1049),c=r(1),l=Object(o.a)((function(e){return{root:{position:"relative"},bottom:{color:e.palette.grey["light"===e.palette.type?200:700],position:"absolute",left:0},top:{color:Object(c.d)("ColumnTitleColor"),animationDuration:"550ms",position:"absolute",left:0},circle:{strokeLinecap:"round"}}}));t.a=function(e){var t=l();return a.a.createElement("div",{className:t.root,style:{width:e.size?e.size:"25px",height:e.size?e.size:"25px"}},a.a.createElement(i.a,Object.assign({variant:"determinate",className:t.bottom,size:e.size?e.size:25,thickness:4},e,{value:100})),a.a.createElement(i.a,Object.assign({variant:"indeterminate",disableShrink:!0,className:t.top,classes:{circle:t.circle},size:e.size?e.size:25,thickness:4},e)))}},1532:function(e,t,r){},1533:function(e,t,r){},1543:function(e,t,r){},1717:function(e,t,r){},1718:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(39),i=r(32),c=r(3),l=r(1837),s=r(13),u=r(63),d=r(2),p=r(8),f=r(7),h=r(6),m=r(528),g=r(106),b=r.n(g),v=r(62),y=r.n(v),x=r(10),_=r.n(x),O=r(137),w=(r(1105),r(48)),j=r(1728),E=r(19),S=r(1);function k(){k=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function L(e){var t=a.a.useState(!!c.a.getState().session.consent),r=Object(h.a)(t,2),n=r[0],o=(r[1],a.a.useState(!1)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!0),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){setTimeout((function(){x(!1)}),6e3)}),[l]);var O=function(){var e=Object(p.a)(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x(!0),g(!0),t={accepted_at:"".concat(_()().unix("X")),privacy:"Data de cria\xe7\xe3o: 31 de dezembro de 2021, \xdaltima atualiza\xe7\xe3o: 06 de janeiro de 2022",terms:"Data de cria\xe7\xe3o: 31 de dezembro de 2021, \xdaltima atualiza\xe7\xe3o: 06 de janeiro de 2022"},c.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"consent"},{version:JSON.stringify(t)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return m?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"policyAndTermsConsent"},a.a.createElement(j.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!n,onClick:function(e){}},a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden",backgroundColor:"#FFFFFF"})},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:Object(S.d)("color"),fontWeight:"bold"}},Object(S.r)("$__TermsOfUseAndPrivacyPolicy")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},l?a.a.createElement("iframe",{id:"terms",style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",src:"https://sonne.global/SONNE-Termos-de-Servicos-2022-01-07.pdf"}):a.a.createElement("iframe",{id:"policy",style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",onScroll:function(){console.log("scroll")},src:"https://sonne.global/SONNE-Politica-de-Privacidade-2022-01-07.pdf"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:40,display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:33}},a.a.createElement(E.a,{id:"policyButtonConsent",title:Object(S.r)(l?"$__accepted":"$__IReadAndIAgree","*"),text:l?null:Object(S.r)("$__IReadAndIAgree","*"),color:l?"green":Object(S.d)("menu"),icon:"verified",onClick:l?null:function(){s(!0)},size:"25px"}),l?Object(S.r)("$__PrivacyPolicy","*"):a.a.createElement(a.a.Fragment,null)),l&&!y?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(E.a,{id:"termsofuseButtonConsent",title:Object(S.r)("$__IReadAndIAgreeTheTermsOfUse","*"),text:Object(S.r)("$__IReadAndIAgreeTheTermsOfUse","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){O()},size:"25px"})):a.a.createElement(a.a.Fragment,null)))))}var C=r(14),I=r(12);function T(){T=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var F=Object(s.b)((function(e){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState(!0),n=Object(h.a)(r,2),o=(n[0],n[1]),i=a.a.useRef();if(a.a.useEffect((function(){return function(){}}),[]),t&&(!t.require||t.require&&!t.require.licensingAgreement))return a.a.createElement(a.a.Fragment,null);var l=function(){var e=Object(p.a)(T().mark((function e(){var t;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(!0),t={accepted_at:"".concat(_()().unix("X")),version:"2022-10-24"},c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"agreement"},{version:JSON.stringify(t)});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{id:"licensingAgreement"},a.a.createElement(j.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!0},a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden",backgroundColor:"#FFFFFF"})},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:Object(S.d)("color"),fontWeight:"bold"}},Object(S.r)("$__licensingAgreement")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("iframe",{id:"licensing",ref:i,onLoad:function(){console.log(i.current,i.current.contentWindow.window),console.log("licensing")},style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",src:"https://machen.ai/contracts/MACHEN-Termos-e-Condicoes-Gerais-de-Uso-de-Software-2022-10-24.pdf"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:40,display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:33}},a.a.createElement(E.a,{id:"agreementButtonConsent",title:Object(S.r)("$__IReadAndIAgree","*"),text:Object(S.r)("$__IReadAndIAgree","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){l()},size:"25px"}))))))})),N=r(41),D=r(42),A=r(52),P=r(53),$=function(e){Object(A.a)(r,e);var t=Object(P.a)(r);function r(e){var n;return Object(N.a)(this,r),(n=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},n}return Object(D.a)(r,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t}),console.log(window.location.hostname.indexOf("sonne.machen"),window.location.hostname.indexOf("software.machen")),-1===window.location.hostname.indexOf("sonne.machen")&&-1===window.location.hostname.indexOf("software.machen")&&console.log(e,t)}},{key:"render",value:function(){return this.state.hasError?a.a.createElement("div",null,Object(S.r)("$__ComponentErrorRefreshOrSupportMessage")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),r}(a.a.Component),z=r(426),M=r(1841),B=r(1814),Y=r(1815),R=r(1729),G=r(66),H=r(1050),W=r(4),U={button:{minHeight:"auto",minWidth:"auto",backgroundColor:W.q[0],color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.q[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.q[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.q[0])+", 0.12)",border:"none",borderRadius:"3px",position:"relative",padding:"12px 30px",margin:".3125rem 1px",fontSize:"12px",fontWeight:"400",textTransform:"uppercase",letterSpacing:"0",willChange:"box-shadow, transform",transition:"box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1)",lineHeight:"1.42857143",textAlign:"center",whiteSpace:"nowrap",verticalAlign:"middle",touchAction:"manipulation",cursor:"pointer","&:hover,&:focus":{color:W.O,backgroundColor:W.q[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.q[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.q[0])+", 0.2)"},"& .fab,& .fas,& .far,& .fal,& .material-icons":{position:"relative",display:"inline-block",top:"0",marginTop:"-1em",marginBottom:"-1em",fontSize:"1.1rem",marginRight:"4px",verticalAlign:"middle"},"& svg":{position:"relative",display:"inline-block",top:"0",width:"18px",height:"18px",marginRight:"4px",verticalAlign:"middle"},"&$justIcon":{"& .fab,& .fas,& .far,& .fal,& .material-icons":{marginTop:"0px",position:"absolute",width:"100%",transform:"none",left:"0px",top:"0px",height:"100%",lineHeight:"41px",fontSize:"20px"}}},fullWidth:{width:"100%"},custom_color:{backgroundColor:Object(S.d)("color"),boxShadow:"0 2px 2px 0 "+Object(S.d)("color",.14)+", 0 3px 1px -2px "+Object(S.d)("color",.2)+", 0 1px 5px 0 rgba("+Object(S.d)("color",.12),"&:hover,&:focus":{backgroundColor:Object(S.d)("color"),boxShadow:"0 14px 26px -12px "+Object(S.d)("color",.42)+", 0 4px 23px 0px "+Object(S.d)("color",.12)+", 0 8px 10px -5px rgba("+Object(S.d)("color",.2)}},custom_menuColor:{backgroundColor:Object(S.d)("menu"),boxShadow:"0 2px 2px 0 "+Object(S.d)("menu",.14)+", 0 3px 1px -2px "+Object(S.d)("menu",.2)+", 0 1px 5px 0 rgba("+Object(S.d)("menu",.12),"&:hover,&:focus":{backgroundColor:Object(S.d)("menu"),boxShadow:"0 14px 26px -12px "+Object(S.d)("menu",.42)+", 0 4px 23px 0px "+Object(S.d)("menu",.12)+", 0 8px 10px -5px rgba("+Object(S.d)("menu",.2)}},custom_mediumColor:{backgroundColor:Object(S.d)("medium"),boxShadow:"0 2px 2px 0 "+Object(S.d)("medium",.14)+", 0 3px 1px -2px "+Object(S.d)("medium",.2)+", 0 1px 5px 0 rgba("+Object(S.d)("medium",.12),"&:hover,&:focus":{backgroundColor:Object(S.d)("medium"),boxShadow:"0 14px 26px -12px "+Object(S.d)("medium",.42)+", 0 4px 23px 0px "+Object(S.d)("medium",.12)+", 0 8px 10px -5px rgba("+Object(S.d)("medium",.2)}},primary:{backgroundColor:W.z[0],boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.z[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.z[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.z[0])+", 0.12)","&:hover,&:focus":{backgroundColor:W.z[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.z[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.z[0])+", 0.2)"}},info:{backgroundColor:W.u[0],boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.u[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.u[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.u[0])+", 0.12)","&:hover,&:focus":{backgroundColor:W.u[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.u[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.u[0])+", 0.2)"}},success:{backgroundColor:W.G[0],boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.G[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.G[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.G[0])+", 0.12)","&:hover,&:focus":{backgroundColor:W.G[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.G[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.G[0])+", 0.2)"}},warning:{backgroundColor:W.N[0],boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.N[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.N[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.N[0])+", 0.12)","&:hover,&:focus":{backgroundColor:W.N[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.N[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.N[0])+", 0.2)"}},danger:{backgroundColor:W.j[0],boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.j[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.j[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.j[0])+", 0.12)","&:hover,&:focus":{backgroundColor:W.j[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.j[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.j[0])+", 0.2)"}},rose:{backgroundColor:W.D[0],boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.D[0])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.D[0])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.D[0])+", 0.12)","&:hover,&:focus":{backgroundColor:W.D[0],boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.D[0])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.D[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:W.O,color:W.q[0]}},twitter:{backgroundColor:W.K,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.K)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.K)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.K)+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:W.K,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.K)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.K)+", 0.2)"}},facebook:{backgroundColor:W.o,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.o)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.o)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.o)+", 0.12)","&:hover,&:focus":{backgroundColor:W.o,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.o)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.o)+", 0.2)"}},google:{backgroundColor:W.p,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.p)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.p)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.p)+", 0.12)","&:hover,&:focus":{backgroundColor:W.p,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.p)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.p)+", 0.2)"}},linkedin:{backgroundColor:W.v,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.v)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.v)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.v)+", 0.12)","&:hover,&:focus":{backgroundColor:W.v,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.v)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.v)+", 0.2)"}},pinterest:{backgroundColor:W.w,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.w)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.w)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.w)+", 0.12)","&:hover,&:focus":{backgroundColor:W.w,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.w)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.w)+", 0.2)"}},youtube:{backgroundColor:W.P,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.P)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.P)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.P)+", 0.12)","&:hover,&:focus":{backgroundColor:W.P,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.P)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.P)+", 0.2)"}},tumblr:{backgroundColor:W.J,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.J)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.J)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.J)+", 0.12)","&:hover,&:focus":{backgroundColor:W.J,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.J)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.J)+", 0.2)"}},github:{backgroundColor:W.q[7],color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.q[6])+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.q[6])+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.q[6])+", 0.12)","&:hover,&:focus":{backgroundColor:W.q[7],color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.q[6])+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.q[6])+", 0.2)"}},behance:{backgroundColor:W.a,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.a)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.a)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.a)+", 0.12)","&:hover,&:focus":{backgroundColor:W.a,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.a)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.a)+", 0.2)"}},dribbble:{backgroundColor:W.n,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.n)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.n)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.n)+", 0.12)","&:hover,&:focus":{backgroundColor:W.n,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.n)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.n)+", 0.2)"}},reddit:{backgroundColor:W.A,color:W.O,boxShadow:"0 2px 2px 0 rgba("+Object(W.r)(W.A)+", 0.14), 0 3px 1px -2px rgba("+Object(W.r)(W.A)+", 0.2), 0 1px 5px 0 rgba("+Object(W.r)(W.A)+", 0.12)","&:hover,&:focus":{backgroundColor:W.A,color:W.O,boxShadow:"0 14px 26px -12px rgba("+Object(W.r)(W.A)+", 0.42), 0 4px 23px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.A)+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:W.O,background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:W.z[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:W.u[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:W.G[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:W.N[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:W.D[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:W.j[0]}},"&$twitter":{"&,&:focus,&:hover,&:visited":{color:W.K}},"&$facebook":{"&,&:focus,&:hover,&:visited":{color:W.o}},"&$google":{"&,&:focus,&:hover,&:visited":{color:W.p}},"&$linkedin":{"&,&:focus,&:hover,&:visited":{color:W.v}},"&$pinterest":{"&,&:focus,&:hover,&:visited":{color:W.w}},"&$youtube":{"&,&:focus,&:hover,&:visited":{color:W.P}},"&$tumblr":{"&,&:focus,&:hover,&:visited":{color:W.J}},"&$github":{"&,&:focus,&:hover,&:visited":{color:W.q[7]}},"&$behance":{"&,&:focus,&:hover,&:visited":{color:W.a}},"&$dribbble":{"&,&:focus,&:hover,&:visited":{color:W.n}},"&$reddit":{"&,&:focus,&:hover,&:visited":{color:W.A}}},transparent:{"&,&:focus,&:hover":{color:"inherit",background:"transparent",boxShadow:"none"}},disabled:{opacity:"0.65",pointerEvents:"none"},lg:{"&$justIcon":{"& .fab,& .fas,& .far,& .fal,& svg,& .material-icons":{marginTop:"-4px"}},padding:"1.125rem 2.25rem",fontSize:"12px",lineHeight:"1.333333",borderRadius:"0.2rem"},sm:{"&$justIcon":{"& .fab,& .fas,& .far,& .fal,& svg,& .material-icons":{marginTop:"1px"}},padding:"0.40625rem 1.25rem",fontSize:"0.6875rem",lineHeight:"1.5",borderRadius:"0.2rem"},round:{borderRadius:"30px"},block:{width:"100% !important"},link:{"&,&:hover,&:focus":{backgroundColor:"transparent",color:W.q[0],boxShadow:"none"}},justIcon:{paddingLeft:"12px",paddingRight:"12px",fontSize:"20px",height:"41px",minWidth:"41px",width:"41px","& .fab,& .fas,& .far,& .fal,& svg,& .material-icons":{marginRight:"0px"},"&$lg":{height:"57px",minWidth:"57px",width:"57px",lineHeight:"56px","& .fab,& .fas,& .far,& .fal,& .material-icons":{fontSize:"32px",lineHeight:"56px"},"& svg":{width:"32px",height:"32px"}},"&$sm":{height:"30px",minWidth:"30px",width:"30px","& .fab,& .fas,& .far,& .fal,& .material-icons":{fontSize:"12px",lineHeight:"29px"},"& svg":{width:"16px",height:"16px"}}}},V=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],q=Object(z.a)(U),X=a.a.forwardRef((function(e,t){var r,n=q(),o=e.color,i=e.round,c=e.children,l=e.fullWidth,s=e.disabled,u=e.simple,d=e.size,p=e.block,h=e.link,m=e.justIcon,g=e.className,b=e.muiClasses,v=Object(G.a)(e,V),x=y()((r={},Object(f.a)(r,n.button,!0),Object(f.a)(r,n[d],d),Object(f.a)(r,n[o],o),Object(f.a)(r,n.round,i),Object(f.a)(r,n.fullWidth,l),Object(f.a)(r,n.disabled,s),Object(f.a)(r,n.simple,u),Object(f.a)(r,n.block,p),Object(f.a)(r,n.link,h),Object(f.a)(r,n.justIcon,m),Object(f.a)(r,g,g),r));return a.a.createElement(H.a,Object.assign({},v,{ref:t,classes:b,className:x}),c)})),K=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:W.q[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(d.a)(Object(d.a)({},W.e),{},{minHeight:"50px"}),flex:{flex:1},title:Object(d.a)(Object(d.a)({},W.l),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:W.O,letterSpacing:"unset","&:hover,&:focus":{background:"transparent",color:W.O}}),appResponsive:{top:"8px"},primary:Object(d.a)({backgroundColor:W.z[0],color:W.O},W.k),info:Object(d.a)({backgroundColor:W.u[0],color:W.O},W.k),success:Object(d.a)({backgroundColor:W.G[0],color:W.O},W.k),warning:Object(d.a)({backgroundColor:W.N[0],color:W.O},W.k),danger:Object(d.a)({backgroundColor:W.j[0],color:W.O},W.k),list:Object(d.a)(Object(d.a)({},W.l),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:W.O,paddingTop:"0",paddingBottom:"0"}),listItem:Object(f.a)({float:"left",position:"relative",display:"block",width:"auto",margin:"0",padding:"0"},e.breakpoints.down("sm"),{zIndex:"999",width:"100%",paddingRight:"15px"}),navLink:{color:W.O,margin:"0 5px",paddingTop:"15px",paddingBottom:"15px",fontWeight:"500",fontSize:"12px",textTransform:"uppercase",borderRadius:"3px",lineHeight:"20px",position:"relative",display:"block",padding:"10px 15px",textDecoration:"none","&:hover,&:focus":{color:W.O,background:"rgba("+Object(W.r)(W.q[17])+", 0.2)"}},listItemIcon:{marginTop:"-3px",top:"0px",position:"relative",marginRight:"3px",width:"20px",height:"20px",verticalAlign:"middle",color:"inherit",display:"inline-block"},listItemText:{flex:"none",padding:"0",minWidth:"0",margin:0,display:"inline-block",position:"relative",whiteSpace:"nowrap"},navLinkActive:{backgroundColor:"rgba("+Object(W.r)(W.O)+", 0.1)"},drawerPaper:Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({border:"none",bottom:"0",transitionProperty:"top, bottom, width",transitionDuration:".2s, .2s, .35s",transitionTimingFunction:"linear, linear, ease"},W.c),{},{width:W.m},W.c),{},{position:"fixed",display:"block",top:"0",height:"100vh",right:"0",left:"auto",visibility:"visible",overflowY:"visible",borderTop:"none",textAlign:"left",paddingRight:"0px",paddingLeft:"0"},W.I),{},{"&:before,&:after":{position:"absolute",zIndex:"3",width:"100%",height:"100%",content:'""',display:"block",top:"0"},"&:after":{background:W.b,opacity:".8"}}),sidebarButton:{"&,&:hover,&:focus":{color:W.O},top:"-2px"}}},J=r(346),Z=r.n(J),Q=Object(z.a)(K);function ee(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=(r[0],r[1],Q()),o=e.color,i=(e.brandText,y()(Object(f.a)({}," "+n[o],o)));R.a,n.list;return a.a.createElement(B.a,{position:"static",className:n.appBar+i},a.a.createElement(Y.a,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},a.a.createElement("div",{style:{maxWidth:"222px"}},a.a.createElement("img",{src:Object(S.d)("customLogo"),alt:"logo",style:{width:"100%"}})))))}var te={block:{},left:{float:"left!important",display:"block"},right:{margin:"0",fontSize:"12px",float:"right!important",padding:"15px"},footer:Object(d.a)(Object(d.a)({bottom:"0",borderTop:"1px solid "+W.q[15],padding:"15px 0"},W.l),{},{zIndex:4}),container:Object(d.a)(Object(d.a)({zIndex:3},W.e),{},{position:"relative"}),containerFluid:Object(d.a)(Object(d.a)({zIndex:3},W.f),{},{position:"relative"}),a:{color:W.z[0],textDecoration:"none",backgroundColor:"transparent"},list:{marginBottom:"0",padding:"0",marginTop:"0"},inlineBlock:{display:"inline-block",padding:"0",width:"auto"},whiteColor:{"&,&:hover,&:focus":{color:W.O}}},re=Object(z.a)(te);function ne(e){var t,r,n=re(),o=e.fluid,i=e.white,c=(e.rtlActive,y()((t={},Object(f.a)(t,n.container,!o),Object(f.a)(t,n.containerFluid,o),Object(f.a)(t,n.whiteColor,i),t))),l=n.a+y()(Object(f.a)({}," "+n.whiteColor,i));y()((r={},Object(f.a)(r,n.block,!0),Object(f.a)(r,n.whiteColor,i),r));return a.a.createElement("footer",{className:n.footer},a.a.createElement("div",{className:c,style:{display:"flex",justifyContent:"center"}},a.a.createElement("div",{className:n.left},a.a.createElement(R.a,{className:n.list})),a.a.createElement("p",{className:n.center},"\xa9 ",1900+(new Date).getYear()," ",a.a.createElement("a",{href:"https://sonne.global",className:l,target:"_blank"},"SONNE GLOBAL")," | ".concat("$__footerDescription"!==Object(S.r)("$__footerDescription",1)?Object(S.r)("$__footerDescription",1):""))))}var ae=r(11),oe=r(709),ie=r.n(oe),ce=(r(783),r(257)),le=r.n(ce),se=r(306),ue=(r(1126),r(1049)),de=r(23),pe=function(e){return{backdrop:{zIndex:4e3},header:{position:"absolute",top:"0px",left:"0px",right:"0px",height:"50px"},btClose:{position:"absolute",right:"15px",top:"15px"},content:{position:"absolute",top:"50px",bottom:"50px",left:"30px",right:"30px",display:"flex",justifyContent:"center",alignItems:"center"},loader:{position:"absolute",top:"calc(50% - 20px)",left:"calc(50% - 20px)",width:"40px",height:"40px","& .MuiCircularProgress-root":{color:"".concat(Object(S.d)("color")," !important")}},img:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"center center",display:"flex",alignItems:"center",justifyContent:"center","& img":{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}},movie:{position:"absolute",width:"-webkit-fill-available",height:"-webkit-fill-available"},embed:{position:"absolute",width:"-webkit-fill-available",height:"-webkit-fill-available"},leftButtom:{position:"absolute",top:"50px",bottom:"50px",left:"0px",width:"30px",display:"flex",alignItems:"center"},rightButtom:{position:"absolute",top:"50px",bottom:"50px",width:"30px",right:"0px",display:"flex",alignItems:"center"},footer:{position:"absolute",bottom:"0px",left:"0px",right:"0px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center"}}},fe=r(348),he=r.n(fe);var me,ge,be=Object(s.b)((function(e){return{store:{lightbox:e.lightBox}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(pe)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.lightBox,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],p=a.a.useState(!1),f=Object(h.a)(p,2),m=f[0],g=f[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(null),O=Object(h.a)(_,2),w=O[0],E=O[1],k=a.a.useState(null),L=Object(h.a)(k,2),C=L[0],I=L[1],T=a.a.useState(null),F=Object(h.a)(T,2),N=(F[0],F[1]),D=a.a.useState(!0),A=Object(h.a)(D,2),P=A[0],z=A[1],M=a.a.useState(.5),B=Object(h.a)(M,2),Y=B[0];B[1],a.a.useEffect((function(){s||(u(!0),window.addEventListener("keydown",(function(e){R(e)}),!1))})),a.a.useEffect((function(){if(o.open&&o.files.length>0&&o.file&&o.file!==w){g(!0),E(o.file);var e=c.a.getState().lightBox.files.filter((function(e){return e._id===o.file}))[0],t=e&&e.name?e.name.split("."):null,r=e&&e.file?"https://machen.azureedge.net/".concat(encodeURIComponent(e.file)):null,a=e&&e.file?"https://machen.azureedge.net/".concat(e.file):null,i=t.length>0?t[t.length-1]:null;"pdf"===(i?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].viewer:"file":null)&&(z(!0),I(r));n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&(n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(e.file)),setTimeout((function(){g(!1),I(r),N(a)}),1e3)}}),[o]);var R=function(e){if(39!==e.keyCode&&40!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&27!==e.keyCode||1===c.a.getState().lightBox.files.length&&27!==e.keyCode)return!1;if(c.a.getState().lightBox.open){var t;if(c.a.getState().lightBox.files.map((function(e,r){e._id===c.a.getState().lightBox.file&&(t=r)})),39===e.keyCode||40===e.keyCode)t+1===c.a.getState().lightBox.files.length?t=0:t+=1,H("R");else{if(37!==e.keyCode&&38!==e.keyCode)return 27===e.keyCode&&void G();0===t?t=c.a.getState().lightBox.files.length-1:t-=1,H("L")}g(!0),setTimeout((function(){g(!1)}),1e3)}},G=function(){setTimeout((function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}),500),window.removeEventListener("keydown",(function(e){R(e)}),!1)},H=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.a.getState().lightBox.open&&(g(!0),c.a.getState().lightBox.files.map((function(e,r){e._id===c.a.getState().lightBox.file&&(t=r)})),"R"===y||"R"===r?t+1===c.a.getState().lightBox.files.length?t=0:t+=1:"L"!==y&&"L"!==r||(0===t?t=c.a.getState().lightBox.files.length-1:t-=1),c.a.getState().lightBox.files.length>0&&c.a.getState().lightBox.files[t]&&e.reduxFunction("ASYNC","LIGHTBOX",Object(d.a)(Object(d.a)({},c.a.getState().lightBox),{},{file:c.a.getState().lightBox.files[t]._id})),setTimeout((function(){g(!1),x(!1)}),700))};if(!c.a.getState().lightBox.open&&0===c.a.getState().lightBox.files.length)return null;var W=c.a.getState().lightBox.files.filter((function(e){return e._id===w}))[0];if(!W||!W.file)return a.a.createElement(a.a.Fragment,null);var U=W&&W.name?W.name.split("."):null,V=U.length>0?U[U.length-1]:null,q=V?n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1}))[0].viewer:"file":null,X=C,K=W&&W.file?"https://fl.machen.ai/?arq=".concat(W.file.replace("&","||MCH-ECOM||"),"&name=").concat(W.name.replace("&","||MCH-ECOM||")):null,J=(W.file,W.name,"https://fls.machen.ai/".concat(encodeURIComponent(W.file),"/name/").concat(encodeURIComponent(W.name)));return console.log(J),n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1})).length>0&&(X=n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(W.file)),a.a.createElement(ie.a,{onSwipeMove:function(e,t){e.x>100?x("L"):e.x<-100?x("R"):e.y<-100&&G()},onSwipeEnd:function(e){!1!==y&&H()}},a.a.createElement(j.a,{className:t.backdrop,open:c.a.getState().lightBox.open,onClick:function(e){G()}},a.a.createElement("div",{id:"lightBox",className:t.header,onClick:function(e){G(),e.stopPropagation()}},a.a.createElement("div",{className:t.btClose},a.a.createElement(ae.a,{title:Object(S.r)("$__close","*"),color:Object(S.d)("light"),onClick:function(){G()}},"close"))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("div",{className:t.content,style:{zIndex:1e3},onClick:function(e){e.stopPropagation()}},m?a.a.createElement("div",{className:t.loader},a.a.createElement(ue.a,null)):"img"===q?a.a.createElement("div",{className:t.img},"string"===typeof C&&(-1===C.indexOf("https://")||C.indexOf("svg")>-1)?a.a.createElement(a.a.Fragment,null,"img"===q&&X&&X.indexOf("svg")>-1&&a.a.createElement("a",{href:K},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},a.a.createElement("img",{src:he.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),Object(S.r)("$__clickHereToDownload",1)))):a.a.createElement("img",{src:"".concat(X),onError:function(e){return e.target.src=X}})):m||"movie"!==q?m||"microsoft"!==q?m||"text"!==q?!m&&"pdf"===q&&C?a.a.createElement("div",{className:t.embed},P&&a.a.createElement("div",{className:t.loader},a.a.createElement(ue.a,null)),a.a.createElement("div",{className:t.embed},a.a.createElement("div",{className:t.embed,style:{overflow:"auto"}},a.a.createElement("div",{className:t.embed,style:{zoom:"".concat(100*Y,"%")}},a.a.createElement($,null,a.a.createElement("embed",{className:t.embed,id:"embed-docs",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"".concat(J),d:!0})))))):m||"audio"!==q?m||"file"!==q?m?null:a.a.createElement("embed",{className:t.embed,id:"embed-pdf",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"https://drive.google.com/viewerng/viewer?embedded=true&url=".concat(C)}):a.a.createElement("a",{href:K},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},Object(S.r)("$__clickHereToDownload",1))):a.a.createElement(le.a,{src:C,autoPlay:!0,controls:!0}):a.a.createElement(a.a.Fragment,null,a.a.createElement($,null,a.a.createElement("embed",{className:t.embed,id:"embed-docs",style:{backgroundColor:"#FFFFFF",padding:15},onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"".concat(J)}))):a.a.createElement(a.a.Fragment,null,a.a.createElement($,null,a.a.createElement("embed",{className:t.embed,id:"embed-docs",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"https://view.officeapps.live.com/op/embed.aspx?src=".concat(J)}))):a.a.createElement("video",{className:t.movie,src:C,controls:!0})),c.a.getState().lightBox.files.length>1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.leftButtom},a.a.createElement(ae.a,{title:Object(S.r)("$__previous","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){H("L")}},"keyboard_arrow_left")),a.a.createElement("div",{className:t.rightButtom},a.a.createElement(ae.a,{title:Object(S.r)("$__next","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){H("R")}},"keyboard_arrow_right"))),a.a.createElement("div",{className:t.footer,onClick:function(e){e.stopPropagation()}},a.a.createElement("a",{href:K},a.a.createElement(ae.a,{title:Object(S.r)("$__download","*"),color:Object(S.d)("light"),size:"33px"},"get_app"))))))}))),ve=w.default.div(me||(me=Object(u.a)(["\n position: relative;\n width: 100%;\n height: 100%;\n padding-top: 20px;\n padding-bottom: 20px;\n"]))),ye=w.default.div(ge||(ge=Object(u.a)(["\n position: fixed;\n top: 0;\n left: 0;\n right: 25%;\n width: 100%;\n height: 100%;\n background-color: #ffffffeb;\n z-index: 7000;\n"])));function xe(e){return a.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?a.a.createElement(ye,null,a.a.createElement(ue.a,{size:50|e.size})):a.a.createElement(ve,null,a.a.createElement(ue.a,null)))}var _e=function(e){return a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},a.a.createElement("div",{style:{width:"100%",maxWidth:"250px",height:"150px",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(xe,null)))},Oe=r(69),we={button:Object(d.a)(Object(d.a)({},W.l),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(d.a)(Object(d.a)({},W.l),{},{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",width:"fit-content",userSelect:"none","&$reverse":{},"& :hover":{}}),reverse:{flexDirection:"row-reverse"},iconButton:{width:"21px",height:"21px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"10%"},icon:{fontSize:"21px"},onlyIcon:{fontSize:"21px"},text:{marginLeft:"7px",marginRight:"7px"}},je=Object(z.a)(we),Ee=a.a.forwardRef((function(e,t){var r,n,o=je(),i=(e.reverse,e.text),c=y()((r={},Object(f.a)(r,o.button,!0),Object(f.a)(r,o.reverse,!!e.reverse),r)),l=y()((n={},Object(f.a)(n,o.buttonText,!0),Object(f.a)(n,o.reverse,!!e.reverse),n));return a.a.createElement("div",{className:e.text?l:c,onClick:function(){return e.onClick?e.onClick():null},style:Object(d.a)({},e.style)},a.a.createElement("div",{className:o.iconButton,style:{color:e.iconColor?Object(S.d)(e.iconColor):Object(S.d)("color"),backgroundColor:e.iconBackground?Object(S.d)(e.iconBackground):"none"}},e.icon?a.a.createElement(Oe.a,{className:e.iconBackground?o.icon:o.onlyIcon,size:e.size?e.size:null,icon:e.icon,color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(d.a)({},e.style?e.style:{})}):a.a.createElement(Oe.a,{className:e.iconBackground?o.icon:o.onlyIcon,icon:"stop_circle",color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(d.a)({},e.style?e.style:{})})),i&&a.a.createElement("div",{className:o.text,style:{color:e.textColor?Object(S.d)(e.textColor):Object(S.d)("medium")}},i))})),Se=r(1069),ke=r(91),Le=r.n(ke);function Ce(){Ce=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ie=Object(z.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),Te=function(e){var t=c.a.getState(),r=t.session,n=t.functions.socket,o=a.a.useState(e.data),i=Object(h.a)(o,2),l=i[0],s=i[1],u=Ie();a.a.useEffect((function(){s(e.data)}),[e.data]);var m=function(){var t=Object(p.a)(Ce().mark((function t(a,o){var i,c;return Ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.emit("data",{module:"social",method:"post",action:"interact"},{react:a,user:r._id,nodeId:e.data._id,message:e.data._id,delete:o}),(i=l)&&i._reactions&&Object.keys(i._reactions).length>0&&Object.keys(i._reactions).filter((function(e){return e!==a})).map((function(e){i._reactions[e][r._id]&&delete i._reactions[e][r._id]})),o&&l&&l._reactions&&l._reactions[a]&&l._reactions[a][r._id]?(delete(c=l)._reactions[a][r._id],s(c)):s(Object(d.a)(Object(d.a)({},l),{},{_reactions:Object(d.a)(Object(d.a)({},l._reactions),{},Object(f.a)({},a,Object(f.a)({},r._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},r.displayName?{displayName:r.displayName}:{}),r.name?{name:r.name}:{}),r.image?{image:r.image}:{}),{},{reactDate:{low:_()().tz("America/Sao_Paulo").unix("X")}}))))}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();l._reactions&&Object.keys(l._reactions).length>0&&Object.keys(l._reactions).map((function(e){Object.keys(l._reactions[e]).length>0&&Object.keys(l._reactions[e]).map((function(t){t===r._id&&e}))}));var g=function(t){var n=t.react,o=t.color,i=t.primaryIcon,c=t.secondaryIcon;return e.hideDisables&&l&&n&&l._reactions&&(!l._reactions[n]||l._reactions[n]&&0===Object.keys(l._reactions[n]).length)?a.a.createElement(a.a.Fragment,null):a.a.createElement(Ee,{icon:l._reactions&&l._reactions[n]&&l._reactions[n][r._id]?i:c||i,iconColor:l._reactions&&l._reactions[n]&&l._reactions[n][r._id]?o||Object(S.d)("menu"):"lightgray",size:"18px",onClick:function(){m(n,!!(l._reactions&&l._reactions[n]&&l._reactions[n][r._id]))},title:l._reactions&&l._reactions[n]&&Object.keys(l._reactions[n]).length>0?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:3,borderBottom:"1px solid lightgray",marginBottom:"7px"}},Object(S.r)("$__".concat(n),1)),a.a.createElement("div",{className:u.users},Object.keys(l._reactions[n]).sort((function(e,t){return l._reactions[n][e].reactDate&&String(l._reactions[n][e].reactDate.low)&&l._reactions[n][t].reactDate&&String(l._reactions[n][t].reactDate.low)&&parseInt(l._reactions[n][e].reactDate.low)<parseInt(l._reactions[n][t].reactDate.low)?-1:l._reactions[n][e].reactDate&&String(l._reactions[n][e].reactDate.low)&&l._reactions[n][t].reactDate&&String(l._reactions[n][t].reactDate.low)&&parseInt(l._reactions[n][e].reactDate.low)>parseInt(l._reactions[n][t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:l._reactions[n][e].name,src:l._reactions[n][e].image||Le.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},l._reactions[n][e].displayName?l._reactions[n][e].displayName:l._reactions[n][e].name,l._reactions[n][e].reactDate&&l._reactions[n][e].reactDate.low&&" (".concat(_()(1e3*l._reactions[n][e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))):Object(S.r)("$__".concat(n),1)})};return a.a.createElement("div",{onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"}},a.a.createElement(g,{react:"like",primaryIcon:"thumb_up",secondaryIcon:"thumb_up_off_alt"}),a.a.createElement(g,{react:"nolike",primaryIcon:"thumb_down",secondaryIcon:"thumb_down_off_alt"}),a.a.createElement(g,{react:"love",primaryIcon:"favorite",secondaryIcon:"favorite_border",color:"red"}),a.a.createElement(g,{react:"approve",primaryIcon:"verified",color:"green"}),a.a.createElement(g,{react:"attention",primaryIcon:"report_problem",color:"red"}),e.children&&a.a.createElement(a.a.Fragment,null,e.children)))},Fe=r(152),Ne=r(34),De=r(230),Ae=r(748),Pe=r(1730),$e=r(1048),ze=r(749),Me=r(1817),Be=r(1816),Ye=r(750),Re=r(1047),Ge=r(746),He=Object(z.a)((function(e){return{iconButtonStyleTransaparent:Object(d.a)({padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{}),iconButtonStyleWhite:Object(d.a)({padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{})}}));var We=Object(n.memo)((function(e){var t=He(),r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useRef(null),l=function(t){t.preventDefault(),t.stopPropagation(),c.current&&c.current.contains(t.target)||(i(!1),e.onClose&&e.onClose())};function s(t){"Tab"===t.key&&(t.preventDefault(),i(!1),e.onClose&&e.onClose())}return e.options&&0!==e.options.length?a.a.createElement("div",{style:Object(d.a)({zIndex:"100 !important"},e.style?e.style:{})},a.a.createElement(Ge.a,{title:e.title?e.title:Object(S.r)("$__options",1)},e.text?a.a.createElement(H.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!o&&e.onOpen&&e.onOpen(),o&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(S.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),a.a.createElement(ae.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):a.a.createElement(ze.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!o&&e.onOpen&&e.onOpen(),o&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(ae.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),a.a.createElement(Re.a,{open:o,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps;t.placement;return a.a.createElement($e.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:l},a.a.createElement(Be.a,{autoFocusItem:o,id:"menu-list-grow",onKeyDown:s,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return a.a.createElement(Me.a,{key:r,style:{color:t&&t.color?t.color:Object(S.d)("menu"),padding:"12px 7px"},onClick:function(r){e.forceStopPropagation||i(!1),e.onClose&&e.onClose(),t.onClick&&t.onClick(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},t.render?t.render:t.avatar?a.a.createElement(Se.a,{alt:t.name,src:t.avatar||null,style:{width:e.size?e.size:"20px",height:e.size?e.size:"20px"}},t.name.substr(0,1)):a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},a.a.createElement(ae.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(S.d)("menu")})),!t.render&&a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.r)(t.name,1)))}))))))}))):a.a.createElement(a.a.Fragment,null)})),Ue=r(544),Ve=r(1046),qe=r(1010),Xe=r.n(qe),Ke=r(51);function Je(){Je=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ze=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var Qe=Object(s.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState(null),n=Object(h.a)(r,2),o=n[0],i=n[1],l=Boolean(o);a.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:"$__last7Days",dashboard:Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:"$__last7Days"})}))}}),[]);var s=function(){var t=Object(p.a)(Je().mark((function t(r){var n;return Je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i(null),"string"!==typeof r){t.next=7;break}return e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:r,dashboard:Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:r})})),n=(n=String(r).replace("$__last","")).replace("Days",""),t.next=7,Object(Ke.d)(e,n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(ze.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){i(e.currentTarget)},style:Object(d.a)({},e.style?e.style:{})},a.a.createElement(Xe.a,null)),a.a.createElement(Ve.a,{id:"long-menu",anchorEl:o,keepMounted:!0,open:l,onClose:s,PaperProps:{style:{maxHeight:216,width:"20ch"}}},Ze.map((function(e){return a.a.createElement(Me.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return s(e)}},Object(S.r)(e,1))}))))})),et=r(1818),tt=a.a.forwardRef((function(e,t){var r={root:Object(d.a)(Object(d.a)({},W.l),{},{color:Object(S.d)("mediumText"),padding:0,width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px"},"& label":{marginTop:"-10px",fontSize:"12px"},"& label.MuiFormLabel-filled":{color:Object(S.d)("mediumText"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(S.d)("mediumText"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?0:"filled"===Object(S.d)("fieldVariant")?"-15px":0,borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}})},n=Object(z.a)(r)();return a.a.createElement(et.a,Object.assign({},e,{ref:t,className:n.root}))}));function rt(){rt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var nt=Object(z.a)((function(e){return{header:{display:"flex",width:"100%",justifyContent:"space-between"},content:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center"},contentWithExpand:{position:"relative",width:"calc(100% - 7px)",height:"100%",display:"flex",paddingLeft:"5px",paddingTop:"5px",alignItems:"center",justifyContent:"center"},info:{display:"flex",width:"100%",alignItems:"center"},headerIcon:{display:"contents",alignItems:"center"},headerTitle:{width:"100%",overflowX:"hidden",overflowY:"hidden",fontWeight:"bold"},actionButtons:{position:"absolute",height:"24px",right:"3px",display:"flex"},cancelButton:{right:"4px",position:"absolute",cursor:"pointer"},saveButton:{right:"33px",position:"absolute",cursor:"pointer"},button:{padding:"3px auto",cursor:"pointer",alignItems:"center",display:"flex",opacity:1},parent:{width:"100%",padding:"0 5px","& .title":{color:Object(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("colorText"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));var at=function(e){var t=c.a.getState(),r=t.session,n=t.functions,o=t.db,i=n.socket,l=nt(),s=a.a.useState(e.title.trim()||null),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1];a.a.useEffect((function(){"0"===String(e.unlockedPrivates)&&O&&w(!1)}),[e.unlockedPrivates]),a.a.useEffect((function(){!e.title&&e.editable&&y(!0)}),[e.title]);var j=function(){var t=Object(p.a)(rt().mark((function t(r){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&i.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(d.a)({_id:e._id},r)),e.onEdit&&e.onEdit(f,e._id?e._id:null)}catch(n){console.log(n)}y(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:l.header,style:Object(d.a)(Object(d.a)({minHeight:e.style&&e.style.minHeight?e.style.minHeight:"30px"},e.style),e.backClick?{cursor:"pointer"}:{})},a.a.createElement("div",{className:!e.onExpanding||v?l.content:l.contentWithExpand},a.a.createElement("div",{className:l.info},!e.private||c.a.getState().controls.lockPrivate||O?a.a.createElement(a.a.Fragment,null,e.icon&&a.a.createElement("div",{className:l.headerIcon,style:Object(d.a)({color:e.color?e.color:Object(S.d)("colorText")},e.backClick?{cursor:"pointer"}:{})},a.a.createElement(Oe.a,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:e.icon,color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),e.searchText?a.a.createElement("div",{style:Object(d.a)({marginLeft:"7px"},e.searchTextStyle?e.searchTextStyle:{})},Object(S.b)(e.title?e.title:"",e.searchText,!!e.dark)):a.a.createElement("div",{className:l.headerTitle,style:Object(d.a)(Object(d.a)({fontSize:e.fontSize?e.fontSize:"14px",color:e.color?e.color:Object(S.d)("colorText"),marginLeft:e.icon?"7px":"none"},e.textStyle?e.textStyle:{}),e.backClick?{cursor:"pointer"}:{}),onClick:e.backClick?function(t){e.backClick(),t.stopPropagation()}:null},v?a.a.createElement("div",{style:Object(d.a)({position:"relative",float:"left",width:"100%",paddingTop:"10px",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between"},e.inputStyle?e.inputStyle:{}),onClick:function(e){e.stopPropagation()}},a.a.createElement(tt,{style:{width:"calc(100% - 60px)"},label:e.fieldName?e.fieldName:Object(S.r)("$__nameOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){m(e.target.value)},onKeyDown:function(t){13===t.keyCode&&f&&j({name:f}),27===t.keyCode&&(y(!1),m(e.value?e.value:e.title?e.title.trim():""))}},value:f,placeholder:Object(S.r)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),a.a.createElement(Oe.a,{color:Object(S.d)("medium"),onClick:function(){return v?y(!1):e.onCancel()},icon:"cancel",title:Object(S.r)("$__close","*"),size:e.actionsSize||"25px"}),a.a.createElement(Oe.a,{overlap:"rectangular",color:"green",icon:"save",onClick:function(){v?j({name:f}):e.onSave()},title:Object(S.r)("$__save"," * "),size:e.actionsSize||"25px"})):a.a.createElement(Ge.a,{title:e.title?e.title:""},a.a.createElement("div",{style:Object(d.a)({},e.expanded?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:e.viewAllName&&!0===e.viewAllName?"":"nowrap"}),onDoubleClick:function(){e.onEdit&&e.editable&&(m(e.value?e.value:e.title?e.title.trim():""),y(!0))}},"".concat(e.showOrder?"".concat(e.showOrder,". "):"").concat(e.title&&e.title.indexOf("$__")>-1?Object(S.r)(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):""))))):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:l.headerIcon,style:{color:"lightgray"}},a.a.createElement(Oe.a,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:"private_connectivity",color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),a.a.createElement("div",{style:{marginLeft:"7px",fontSize:12,color:"lightgray"}},e.privateTitle?e.privateTitle:Object(S.r)("$__privateActivity")))),e.periodFilter&&r&&r.period&&a.a.createElement("div",{style:{position:"absolute",right:0,textAlign:"right",color:"#FFFFFF",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},Object(S.r)(r.period),a.a.createElement(Qe,{style:{color:"#FFFFFF",height:"20px",width:"20px"}}))),!v&&a.a.createElement("div",{style:{position:"absolute",right:7,padding:"3px 0px",display:"flex",alignItems:"center",borderRadius:7,backgroundColor:"rgba(250,250,250,0.7)"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},!e.moreButton&&a.a.createElement(Ue.a,{nodeId:e._id}),e.moreButton&&a.a.createElement("div",{style:{position:"absolute",top:0,right:0,display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation()}},!e.private||c.a.getState().controls.lockPrivate||O?a.a.createElement(a.a.Fragment,null,e.colorPicker&&a.a.createElement("div",{style:{zIndex:1e3}},a.a.createElement(De.a,{color:e._id&&o.cards[e._id]&&o.cards[e._id].color?o.cards[e._id].color:null,_id:e._id,onChange:function(t){e.colorPicker(t)},style:{zIndex:5e3}})),e.options&&e.options.length>0&&e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0})).length>0&&a.a.createElement(Ge.a,{title:Object(S.r)(e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].name)},a.a.createElement(ze.a,{onClick:function(t){e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].onClick()},className:l.iconButtonStyle},a.a.createElement(ae.a,{size:"22px",color:Object(S.d)("menu"),icon:e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].icon,usePropagation:!0}))),e.options&&e.options.filter((function(e){return e&&e.show&&"fixed"===e.show})).length>0?e.options.filter((function(e){return e&&e.show&&"fixed"===e.show})).map((function(e,t){return a.a.createElement(Ge.a,{key:"opt".concat(t),title:Object(S.r)(e.name)},a.a.createElement(ze.a,{onClick:function(){return e.onClick()},className:l.iconButtonStyle},a.a.createElement(ae.a,{size:"22px",color:e.color||Object(S.d)("menu"),icon:e.icon,usePropagation:!0})))})):a.a.createElement(a.a.Fragment,null),!e.noExpanding&&e.onExpanding&&a.a.createElement(Ge.a,{title:Object(S.r)(e.isExpanded?"$__collapse":"$__expand")},a.a.createElement(ze.a,{onClick:function(t){e.onExpanding()},className:l.iconButtonStyle},a.a.createElement(ae.a,{size:"22px",color:Object(S.d)("menu"),icon:e.isExpanded?"expand_less":"expand_more",usePropagation:!0}))),e.options&&e.options.length>0&&a.a.createElement(We,Object.assign({noButton:!0,options:[].concat(Object(Ne.a)(e.options),Object(Ne.a)(e.private&&O?[{color:"lightblue",icon:"lock",name:"$__lockThisPrivateCard",onClick:function(){w((function(e){return!e})),e.setPrivate&&e.setPrivate(!O)},show:"hover"}]:[]))},e.optionsProps?e.optionsProps:{}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(E.a,{title:Object(S.r)("$__showPrivateActivity","*"),color:"lightGray",icon:"lock_open",onClick:function(){w((function(e){return!e})),e.setPrivate&&e.setPrivate(!O)},size:"21px",style:{padding:"0px !important"}})))))},ot=r(1845),it=Object(de.a)({root:{"&:hover":{backgroundColor:"transparent"},color:Object(S.d)("color")}})(ot.a),ct=r(1737),lt=r(1819),st=r(21),ut=r(29),dt=r(38),pt=r(144);function ft(){ft=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ht=function(){var e=Object(p.a)(ft().mark((function e(t){var r,n,a,o,i,l,s,u;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),n=c.a.getState(),a=n.sideModule,o=a.data,i=c.a.getState().db[a.db][a.id]||{},!1,!1,console.log(o),(l=window.location.hash.split("/"))[0]=l[0].replace("#",""),JSON.stringify(i)!==JSON.stringify(o)&&!0,"user"===o.type&&l&&l.length>2&&l[2]&&36===l[2].length&&(o.type="user",o._parent=l[2]),Object.keys(o).map((function(e){"file"===e&&(!0,!0),(i&&i[e]&&o[e]!==i[e]||!i&&o)&&!0,(o[e]&&o[e].low||o[e]&&o[e].low&&"0"===String(o[e].low))&&(o[e]=o[e].low)})),s=o.file||null,delete o.file,"new"!==o._id&&o._id){e.next=25;break}return e.prev=15,r.emit("data",{module:"user",method:"post",action:"add"},Object(d.a)(Object(d.a)({},o),{},{oldData:i}),function(){var e=Object(p.a)(ft().mark((function e(n){var a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o._id=n.id,o._token={_id:n.tokenId},!s){e.next=8;break}return e.next=5,Object(pt.a)(o._id,s);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=o.image;case 9:a=e.t0,o.image=a,r.emit("data",{module:"user",method:"put",action:"update"},Object(d.a)(Object(d.a)({},o),{},{image:a,oldData:i})),t.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:n.id,data:Object(d.a)(Object(d.a)({},c.a.getState().sideModule.data),{},{_id:n.id})}));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 20:e.prev=20,e.t0=e.catch(15),console.log(e.t0);case 23:e.next=35;break;case 25:if(!s){e.next=31;break}return e.next=28,Object(pt.a)(o._id,s);case 28:e.t1=e.sent,e.next=32;break;case 31:e.t1=o.image;case 32:return u=e.t1,(s&&u||!s)&&r.emit("data",{module:"user",method:"put",action:"update"},Object(d.a)(Object(d.a)({},o),{},{image:u,oldData:i}),function(){var e=Object(p.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 35:case"end":return e.stop()}}),e,null,[[15,20]])})));return function(t){return e.apply(this,arguments)}}(),mt=function(){var e=Object(p.a)(ft().mark((function e(t){var r,n,a,o;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),n=c.a.getState(),a=n.sideModule,o=a.data,r.emit("data",{module:"user",method:"post",action:"access"},{_id:o._id,email:o.email,name:o.name,access:o._access,safety:o._safety},function(){var e=Object(p.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("user.ACCESS",Object(f.a)({_id:o._id},o._id,Object(d.a)({},o)));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),gt=function(e,t){var r=Object(d.a)({},t[t._id]?t[t._id]:{});c.a.getState().db.users[t._id]&&(r=Object(d.a)(Object(d.a)({},c.a.getState().db.users[t._id]),r)),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().db.users),{},Object(f.a)({},t._id,Object(d.a)({},r)))}))};function bt(e){return vt.apply(this,arguments)}function vt(){return(vt=Object(p.a)(ft().mark((function e(t){var r;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.a.getState().db.users,1!==Object.keys(r).filter((function(e){return r[e].email===t})).length){e.next=5;break}return e.abrupt("return",!0);case 5:return e.prev=5,e.next=8,dt.a.get("/M_User_Verify_MailExist/?email=".concat(t));case 8:return e.abrupt("return",!1);case 11:return e.prev=11,e.t0=e.catch(5),console.log(e.t0),e.abrupt("return",!0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[5,11]])})))).apply(this,arguments)}function yt(e){return xt.apply(this,arguments)}function xt(){return(xt=Object(p.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.get("/M_User_Verify_MailExist/?email=".concat(t));case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function _t(e,t){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(p.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ut.a.post("user/email-token-validate",{token:t,email:r});case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!0);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function wt(e,t){return jt.apply(this,arguments)}function jt(){return(jt=Object(p.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ut.a.post("user/email-token-generate",{name:t,email:r});case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!0);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}var Et=function(e,t,r,n,a){var o,i=c.a.getState().db.users[t]?c.a.getState().db.users[t]:a;o=(e&&e.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket);var l=c.a.getState().db;return Object(st.c)(e,{cardId:n,userId:t,access:r,userData:{_id:t,name:i.name,image:i.image?i.image:null}}),o.emit("data",{module:"cards",method:"post",action:"access"},{cardType:l.cards[n].type,cardId:n,parentUser:l.cards[n]._parent,userId:t,access:r,userData:{_id:t,name:i.name,image:i.image?i.image:null}},function(){var e=Object(p.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),!0},St=function(){var e=Object(p.a)(ft().mark((function e(t,r,n){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ut.a.post("/card/groupAccess",{groupId:r,cardId:n}),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},n,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n]),{},{_groups:Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n]._groups||{}),{},Object(f.a)({},r,{_id:r}))})))}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),kt=function(){var e=Object(p.a)(ft().mark((function e(t,r,n){var a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ut.a.post("/card/groupAccessRemove",{groupId:r,cardId:n}),delete(a=c.a.getState().db.cards[n]._groups)[r],t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},n,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n]),{},{_groups:a})))}));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Lt=function(){var e=Object(p.a)(ft().mark((function e(t,r){var n,a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),a=c.a.getState(),a.db,n.emit("data",{module:"cards",method:"post",action:"userResponsible"},Object(d.a)({},r),function(){var e=Object(p.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ct=function(){var e=Object(p.a)(ft().mark((function e(t,r){var n,a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),a=c.a.getState(),a.db,n.emit("data",{module:"cards",method:"post",action:"userParam"},Object(d.a)({},r),function(){var e=Object(p.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();var It=function(e){var t=c.a.getState(),r=t.db,n=t.session,a=r.cards[e];return!!(a._users[n._id]||a._groups&&Object.keys(a._groups).length>0&&Object.keys(a._groups).filter((function(e){var t,a;return(null===r||void 0===r||null===(t=r.users[n._id])||void 0===t||null===(a=t.groups)||void 0===a?void 0:a.filter((function(t){return t.value===e})).length)>0})).length>0)};function Tt(){Tt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ft=Object(z.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0}}}}));var Nt=Object(s.b)((function(e,t){return{data:e.db.cards[t._id]?e.db.cards[t._id]:{},store:{users:e.db.users}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Ft(),r=a.a.useRef(null),n=c.a.getState(),o=n.db,i=n.session,l=(n.functions,e.data),s=a.a.useState(!!e.open),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState([]),v=Object(h.a)(b,2),y=v[0],x=v[1],O=a.a.useState([]),w=Object(h.a)(O,2),j=w[0],k=w[1],L=a.a.useState(""),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(!1),N=Object(h.a)(F,2),D=N[0],A=N[1],P=a.a.useState(!1),$=Object(h.a)(P,2),z=$[0],M=$[1],B=a.a.useState(Object(st.u)(l._id)),Y=Object(h.a)(B,2),R=Y[0];Y[1],a.a.useEffect((function(){return function(){}}),[]);var G=Object(S.j)(),W=Object(st.t)(l._id),U=!1;W>3&&(U=!0),!U&&G.plan&&G.planAdmin&&(U=!0);var V=window.location.hash.split("/");function q(e){"Tab"===e.key&&(e.preventDefault(),g(!1))}V[0]=V[0].replace("#","");var X=function(){var t=Object(p.a)(Tt().mark((function t(r,n){var a,i;return Tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=1,l&&"plan"===l.type&&(a=3),n?a=n:l._planId&&o.cards[l._planId]&&o.cards[l._planId]._users&&o.cards[l._planId]._users[r]&&o.cards[l._planId]._users[r].access&&(a=l._parent&&o.cards[l._parent]&&o.cards[l._parent]._users&&o.cards[l._parent]._users[r]&&o.cards[l._parent]._users[r].access&&parseInt(o.cards[l._parent]._users[r].access)>parseInt(o.cards[l._planId]._users[r].access)?parseInt(o.cards[l._parent]._users[r].access):parseInt(o.cards[l._planId]._users[r].access)),i=!!(l&&l._users&&l._users[r]),t.next=6,Et(e,r,a,l._id,i);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),K=function(){var e=Object(p.a)(Tt().mark((function e(t){return Tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ut.a.put("cards/removeAccess/",{cardId:l._id,userIds:y}),x([]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(){var t=Object(p.a)(Tt().mark((function t(){return Tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:j.map((function(t){Object(st.K)(e,{_id:l._id,userId:t,option:!0})})),M(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Z=function(e){var t=e.data;return a.a.createElement(Me.a,null,t.label,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}}))},Q=function(t){var r=t.pr,n=!1;e.permission&&(n=!0);var o=!1;l._users&&l._users[r]&&l._users[r].myDay&&l._users[r].myDay&&_()(1e3*parseInt(l._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0);var i=!!(Object.keys(R).length>1&&R[r]&&R[r].isResponsible),c=!!(e.customDefine&&e.customDefine.name&&Object.keys(R).length>1&&R[r]&&R[r][e.customDefine.name]),s=R[r]?R[r]:l._users[r];return a.a.createElement(Me.a,{onClick:n?function(){}:null,disabled:!n},a.a.createElement("div",{style:Object(d.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},n?{}:{cursor:"pointer"})},a.a.createElement("div",{style:Object(d.a)(Object(d.a)({width:"33px",height:"33px",borderRadius:"50%"},e.customDefine?{border:c?"3px green solid":"none"}:{border:i?"3px deepskyblue solid":o?"2px #ff8800 solid":"none"}),{},{backgroundImage:s.image?'url("'.concat(s.image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center",marginRight:7}),src:s.image||null},!s.image&&s&&s.name?s.name.substr(0,1):""),s.name||s.name,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},!e.customDefine&&l._users[r]&&!l._users[r].isResponsible&&U?a.a.createElement(E.a,{title:Object(S.r)("$__defineAsResponsible",1),color:"lightGray",icon:"admin_panel_settings",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Lt(e,{cardId:l._id,userId:r})}})},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.customDefine&&l._users[r]&&U?a.a.createElement(E.a,{title:Object(S.r)(l._users[r][e.customDefine.name]?"$__removeThe".concat(e.customDefine.name):"$__defineAs".concat(e.customDefine.name),1),color:l._users[r][e.customDefine.name]?"red":"green",icon:e.customDefine&&e.customDefine.icon||"check",onClick:function(){Object(S.c)({message:Object(S.r)(l._users[r][e.customDefine.name]?"$__confirmUnSetAs".concat(e.customDefine.name):"$__confirmSetAs".concat(e.customDefine.name),1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Ct(e,{cardId:l._id,userId:r,param:e.customDefine.name,on:!l._users[r][e.customDefine.name]})}})},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.customDefine?a.a.createElement(a.a.Fragment,null):a.a.createElement(it,Object.assign({},z?{checked:!!(o||j.indexOf(r)>-1)}:{checked:!!l._users[r]},{disabled:!(!z||!o),onClick:n?function(){if(z){var e=Array.from(j);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),k(e)}else!function(e){var t=Array.from(y);l._users[e]&&-1===t.indexOf(e)?(t.push(e),x(t)):l._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),x(t)):l._users[e]||X(e)}(r)}:null,color:"default"}))),y.indexOf(r)>-1&&a.a.createElement("div",{style:{height:"2px",width:"100%",backgroundColor:"red",position:"absolute",top:"50%"}})))};return a.a.createElement("div",{onClick:function(e){e.stopPropagation()}},a.a.createElement(H.a,{ref:r,"aria-controls":m?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(e.permission||l&&l._users&&l._users[i._id]&&l._users[i._id].access&&parseInt(l._users[i._id].access)>3)&&(g((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(Dt,e)),a.a.createElement(Re.a,{open:m,anchorEl:r.current,transition:!0},(function(t){var r,n=t.TransitionProps,o=t.placement;return a.a.createElement($e.a,Object.assign({},n,{style:{transformOrigin:"bottom"===o?"center top":"center bottom",maxHeight:"333px",minHeight:"50px",overflowY:"auto"}}),a.a.createElement(Ye.a,null,a.a.createElement("div",{style:(r={position:"relative",width:"100%",paddingBottom:y&&y.length>0||j&&j.length>0?"50px":0},Object(f.a)(r,"width","100%"),Object(f.a)(r,"display","flex"),Object(f.a)(r,"justifyContent","space-between"),r)},a.a.createElement(Pe.a,{onClickAway:function(){g(!1),M(!1),k([])}},a.a.createElement("div",null,D&&a.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},a.a.createElement(tt,{id:"quickUser_Search",label:Object(S.r)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end",style:{cursor:"pointer"},onClick:function(){T(""),A(!1)}},a.a.createElement(ae.a,{icon:"close"})),onChange:function(e){T(e.target.value)},onBlur:function(e){}},value:I,placeholder:Object(S.r)("$__searchByName",1),autoFocus:!0})),a.a.createElement(Be.a,{autoFocusItem:m,id:"menu-list-grow",onKeyDown:q},z?a.a.createElement("div",{style:{position:"relative",overflow:"auto"}},a.a.createElement(Me.a,{disabled:!0},Object(S.r)("$__selectUsersToMyDay","*")),Object.keys(l._users).filter((function(e){return e!==i._id})).sort((function(e,t){var r,n,a,o;return(null===(r=l._users[e])||void 0===r?void 0:r.name)&&(null===(n=l._users[t])||void 0===n?void 0:n.name)&&l._users[e].name.toLowerCase()<l._users[t].name.toLowerCase()?-1:(null===(a=l._users[e])||void 0===a?void 0:a.name)&&(null===(o=l._users[t])||void 0===o?void 0:o.name)&&l._users[e].name.toLowerCase()>l._users[t].name.toLowerCase()?1:0})).map((function(e){return a.a.createElement(Q,{pr:e,key:e})}))):a.a.createElement("div",null,e.types&&e.types.indexOf("teams")>-1?a.a.createElement(a.a.Fragment,null,a.a.createElement(Me.a,{disabled:!0},Object(S.r)("$__usersGroups","*")),console.log(c.a.getState().db.userGroup),c.a.getState().db.userGroup.map((function(e){return a.a.createElement(Z,{data:e,key:e.value})}))):a.a.createElement(a.a.Fragment,null),a.a.createElement(Me.a,{disabled:!0},Object(S.r)("$__users","*")),Object.keys(R).filter((function(t){if((!I||I&&R[t].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"user"===R[t].type&&!R[t].deleted&&!R[t]._parent&&(!e.customDefine||e.customDefine&&l._users[t]))return!0})).sort((function(e,t){return R[e].name<R[t].name?-1:R[e].name>R[t].name?1:0})).map((function(e){return R&&R[e]&&R[e]._id&&a.a.createElement(Q,{pr:e,key:e})})),Object.keys(R).filter((function(t){if((!I||I&&R[t].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"external"===R[t].type&&!R[t].deleted&&(!e.customDefine||e.customDefine&&l._users[t]))return!0})).length>0&&a.a.createElement(Me.a,{disabled:!0},Object(S.r)("$__UnityUsers","*")),Object.keys(R).filter((function(t){return(!I||I&&R[t].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"external"===R[t].type&&!R[t].deleted&&(!e.customDefine||e.customDefine&&l._users[t])})).sort((function(e,t){return R[e].name<R[t].name?-1:R[e].name>R[t].name?1:0})).map((function(e){return R&&R[e]&&R[e]._id&&a.a.createElement(Q,{pr:e,key:e})})),Object.keys(R).filter((function(t){if((!I||I&&R[t].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"consultant"===R[t].type&&!R[t].deleted&&(!e.customDefine||e.customDefine&&l._users[t]))return!0})).length>0&&a.a.createElement(Me.a,{disabled:!0},Object(S.r)("$__planningUsers","*")),Object.keys(R).filter((function(t){if((!I||I&&R[t].name.toLowerCase().indexOf(I.toLowerCase())>-1)&&"consultant"===R[t].type&&!R[t].deleted&&(!e.customDefine||e.customDefine&&l._users[t]))return!0})).sort((function(e,t){return R[e].name<R[t].name?-1:R[e].name>R[t].name?1:0})).map((function(e){return R&&R[e]&&R[e]._id&&a.a.createElement(Q,{pr:e,key:e})})))),D||z?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:10}},a.a.createElement(E.a,{title:Object(S.r)("$__searchUser",1),color:Object(S.d)("menu"),icon:"search",onClick:function(){A(!0)},size:"25px"})),e.customDefine||D||z||!U?z?a.a.createElement("div",{style:{position:"absolute",right:15,top:10}},a.a.createElement(E.a,{title:Object(S.r)("$__back",1),color:Object(S.d)("menu"),icon:"arrow_back",onClick:function(){M(!1)},size:"25px"})):a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:45,top:10}},a.a.createElement(E.a,{title:Object(S.r)("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){M(!0)},size:"25px"}))))),y&&y.length>0&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",padding:"7px",backgroundColor:"red",width:"100%",display:"flex",justifyContent:"space-between",color:"#FFFFFF",alignItems:"center",zIndex:10},onClick:function(e){e.preventDefault(),e.stopPropagation()}},Object(S.r)("$__confirmSelectedUsersRemove"),a.a.createElement(E.a,{title:Object(S.r)("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){K()},size:"25px",transparent:!0})),z&&j&&j.length>0&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",padding:"7px",backgroundColor:"orange",width:"100%",display:"flex",justifyContent:"space-between",color:"#FFFFFF",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement(ct.a,{style:{flexWrap:"wrap"}},j.map((function(e,t){return e&&c.a.getState().db.users[e]?a.a.createElement(Ge.a,{title:c.a.getState().db.users[e].name,key:e},a.a.createElement(Se.a,{alt:c.a.getState().db.users[e].name,src:c.a.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},c.a.getState().db.users[e].name.substr(0,1))):a.a.createElement(a.a.Fragment,null)}))),a.a.createElement(E.a,{title:Object(S.r)("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){J()},size:"25px",transparent:!0}))))})))}));var Dt=function(e){var t=e.data;return a.a.createElement("div",null,0===Object.keys(t._users).filter((function(r){return"null"!==String(r)&&(!e.customDefine||e.customDefine&&t._users[r][e.customDefine.name])})).length?Object(S.r)("$__selectUsers"):a.a.createElement("div",{style:{display:"flex"}},Object.keys(t._users).filter((function(r){return"null"!==String(r)&&(!e.customDefine||e.customDefine&&t._users[r][e.customDefine.name])})).sort((function(e,r){return t._users[e].isResponsible?-1:t._users[r].isResponsible?1:t._users[e].name<t._users[r].name?-1:t._users[e].name>t._users[r].name?1:0})).map((function(r,n){var o=!1,i=!!(Object.keys(t._users).length>1&&t._users[r].isResponsible),c=!(!e.customDefine||!e.customDefine.name)&&!!(Object.keys(t._users).length>1&&t._users[r][e.customDefine.name]);if(t._users[r].myDay&&t._users[r].myDay&&_()(1e3*parseInt(t._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0),t._users[r]&&t._users[r].name){var l=e.noLimit?7:e.limit?e.limit:7;if(n<l)return a.a.createElement("div",{key:r,style:{marginLeft:-7,position:"relative"}},a.a.createElement(Ge.a,{title:"".concat(t._users[r].name).concat(o?" (".concat(Object(S.r)("$__inMyDay"),")"):""),key:r},a.a.createElement("div",{overlap:"circular",alt:t._users[r].name,src:t._users[r].image||null,style:Object(d.a)(Object(d.a)({width:o||i?"30px":e.avatarSize?e.avatarSize:"24px",height:o||i?"30px":e.avatarSize?e.avatarSize:"24px",borderRadius:"50%"},e.customDefine?{border:c?e.customDefine.avatarBorder||"3px green solid":"none"}:{border:i?"3px deepskyblue solid":o?"2px #ff8800 solid":"none"}),{},{backgroundImage:t._users[r].image?'url("'.concat(t._users[r].image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center"})},t._users[r].image?"":t._users[r].name.substr(0,1))),o&&a.a.createElement("div",{style:{position:"absolute",backgroundColor:"#ff8800",width:"14px",height:"14px",borderRadius:"14px",display:"flex",alignItems:"center",justifyContent:"center",right:"7px",bottom:0}},a.a.createElement(ae.a,{icon:"hourglass_top",size:"10px",color:"#FFFFFF"})));if(n===l){var s=Object.keys(t._users).length-l;return a.a.createElement(Ge.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(t._users).sort((function(e,r){return t._users[e].isResponsible?-1:t._users[r].isResponsible?1:t._users[e].name<t._users[r].name?-1:t._users[e].name>t._users[r].name?1:0})).map((function(r,n){if(t._users[r].myDay&&t._users[r].myDay&&_()(1e3*parseInt(t._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&!0,n>=l&&t._users[r]&&t._users[r].name)return a.a.createElement("li",{key:r,style:{display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{overlap:"circular",alt:t._users[r].name,src:t._users[r].image||null,style:Object(d.a)(Object(d.a)({width:e.avatarSize?e.avatarSize:"22px",height:e.avatarSize?e.avatarSize:"22px",border:t._users[r].isResponsible?"3px deepskyblue solid":t._users[r].myDay?"2px #ff8800 solid":"none"},e.customDefine?{border:t._users[r][e.customDefine.name]?"3px green solid":"none"}:{border:t._users[r].isResponsible?"3px deepskyblue solid":t._users[r].myDay?"2px #ff8800 solid":"none"}),{},{marginRight:7})},t._users[r].name.substr(0,1)),t._users[r].name)}))),key:n},a.a.createElement(Se.a,{style:{width:e.avatarSize?e.avatarSize:27,height:e.avatarSize?e.avatarSize:27,border:"none"},alt:"+".concat(s)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(s))))}}}))))},At=r(294),Pt=r.n(At),$t=r(1761),zt=function(e){return{root:{position:"relative"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"calc(100% - 15px)",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},dataSave:{padding:"7px"},fieldSet:{padding:"7px",width:"calc(100% - 50px)"},progress:{},progressPercentage:{}}};r(640);function Mt(){Mt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(641);var Bt=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(zt)((function(e){var t=e.classes,r=(c.a.getState().functions.socket,a.a.useState(!1)),n=Object(h.a)(r,2),o=(n[0],n[1]),i=a.a.useState(""),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=e.timer||{},y=e.data||{},x=function(){var e=Object(p.a)(Mt().mark((function e(t,r){var n;return Mt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(!0),n=String(g),(n="backspace"===t.key.toLowerCase()?n.substr(0,n.length-1):"".concat(n||"").concat(isNaN(t.key)&&(","!==t.key&&"."!==t.key||-1!==n.indexOf(",")||-1!==n.indexOf("."))?"":t.key))&&n.indexOf(",")>-1&&(n=n.substr(0,n.indexOf(",")+3)),b(n);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!y)return null;var _=function(){var t=Object(p.a)(Mt().mark((function t(){var r,n;return Mt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||s?(r=isNaN(g)?g.replace(",","."):g,n=Object(d.a)(Object(d.a)({_id:Object($t.a)(),cardId:y._id,idRel:y._id,value:e.PositiveValue?r:"-".concat(r),type:"kpi"},e.manualEntry?{manualEntry:!0}:{}),{},{kpi_type:y.kpi_type?y.kpi_type:null,message:s||""}),e.timer&&(n=Object(d.a)(Object(d.a)({},n),{},{value:v.diff,ini:v.created_at,fin:v.updated_at,type:"timer",kpi_type:"timer",to:v.to})),ut.a.post("timeline/add",Object(d.a)({},n)),e.callBack&&e.callBack(),e.timer&&!e.manualAdd&&Object(st.v)(e,y._id,v._id),b(0),u("")):Object(S.c)({message:Object(S.r)("$__fillDescription",1),variant:"warning",persist:!1,horizontal:"center"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return e.data?a.a.createElement("div",{className:t.dataSave},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__new",1)),!e.timer&&a.a.createElement(tt,{placeholder:Object(S.r)("$__value",1),value:Object(S.h)(g||0,"time"===y.kpi_type?"number":y.kpi_type,y.kpi_currency?y.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){x(e,"ini")}}}),a.a.createElement(tt,{multiline:!0,placeholder:Object(S.r)("$__description",1),onChange:function(e){return u(e.target.value)},value:s,InputProps:{autoComplete:"new-password"}}),a.a.createElement("div",{style:{display:"flex",textAlign:"right"}},a.a.createElement(E.a,{title:Object(S.r)("$__save",1),color:"green",icon:"save",onClick:function(){return _()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&a.a.createElement(E.a,{title:Object(S.r)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(){e.callBack&&e.callBack()},size:"25px",transparent:!0})))):a.a.createElement("div",null,"NO DATA RECEIVED")}))),Yt=r(1820);function Rt(){Rt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Gt=Object(z.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var Ht=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=Gt(),n=a.a.useState(!1),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useRef(null),u=e.data,m=c.a.getState(),g=m.db,b=m.session,v=(m.functions,m.sideModule),y=a.a.useState([]),x=Object(h.a)(y,2),_=x[0],O=(x[1],a.a.useState(e.selected?e.selected:[])),w=Object(h.a)(O,2),j=w[0],E=w[1],k=a.a.useState(""),L=Object(h.a)(k,2),C=L[0],I=L[1],T=e.admins?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=c.a.getState(),n=r.db,a={};if(Object.keys(n.users).filter((function(e){return!n.users[e]._parent&&n.users[e]._access&&n.users[e]._access.admin})).map((function(e){a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e,n.users[e]))})),(!e||e&&!e.isArray)&&a){var o={};return Object.keys(a).map((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&(o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},e,a[e])))})),o}if(e&&e.isArray&&a){var i=[];return Object.keys(a).map((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&0===i.filter((function(t){return t._id===e})).length&&i.push(a[e])})),i}return{}}(u&&u._id?u._id:null,null,{onlyCard:!(!u||!u._id)}):Object(st.u)(u&&u._id?u._id:null,{onlyCard:!(!u||!u._id)}),F=v&&v.id?Object(st.t)(v.id):0,N=function(){var t=Object(p.a)(Rt().mark((function t(r){var n;return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=Array.from(j),e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],E(n),e.onSelect&&e.onSelect(n),e.multiple||l(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),D=function(t){var r=t.pr,n=t.selected,o=!1;(!e.data||T[r]&&T[r].access&&T[b._id]&&T[b._id].access&&parseInt(T[b._id].access)>=parseInt(T[r].access)||!T[r]&&(T[b._id]&&T[b._id].access&&parseInt(T[b._id].access)>=3||u._parent&&g.cards[u._parent]._users[b._id]&&g.cards[u._parent]._users[b._id].access&&parseInt(g.cards[u._parent]._users[b._id].access)>=3||u._planId&&g.cards[u._planId]._users[b._id]&&g.cards[u._planId]._users[b._id].access&&parseInt(g.cards[u._planId]._users[b._id].access)>=3)||F>3)&&(o=!0);var i=T[r];return i?a.a.createElement(Me.a,{autoFocus:!1,onClick:o?function(){N(r)}:null},a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center",cursor:"pointer"}},a.a.createElement(Se.a,{alt:i.name||null,src:i.image||null,style:Object(d.a)({},e.avatarSize?{width:e.avatarSize,height:e.avatarSize}:{})},i&&i.name?i.name.substr(0,1):""),a.a.createElement("div",{style:{marginLeft:"15px",color:o?"black":"lightgray"}},a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},i.name||i.name),a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center"}},i._parent&&g.users[i._parent]&&g.users[i._parent].image?a.a.createElement("div",{style:{position:"relative",bottom:-4,right:-7,width:17,height:17,borderRadius:"50%",backgroundImage:"url(".concat(g.users[i._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null),i._parent&&g.users[i._parent]&&g.users[i._parent].name?a.a.createElement("div",{style:{position:"relative",float:"left",fontSize:11,color:"lightgray",marginLeft:7}},g.users[i._parent].name):a.a.createElement(a.a.Fragment,null)),n?a.a.createElement("div",{style:{position:"absolute",right:0,top:0,bottom:0,alignItems:"center",justifyContent:"center",display:"flex"}},0===j.indexOf(i._id)?a.a.createElement("div",null,a.a.createElement(ae.a,{icon:"admin_panel_settings",color:"lightgray"})):a.a.createElement(a.a.Fragment,null),a.a.createElement(ae.a,{icon:"check",color:"green"})):a.a.createElement(a.a.Fragment,null)))):a.a.createElement(a.a.Fragment,null)};return a.a.createElement("div",{onClick:function(e){e.stopPropagation()}},a.a.createElement(H.a,{ref:s,"aria-controls":i?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!u||e.permission||u&&T&&T[b._id]&&T[b._id].access&&parseInt(T[b._id].access)>2||F>3)&&l((function(e){return!e}))},className:e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite},0===j.length?Object(S.r)("$__selectUser"):a.a.createElement("div",null,a.a.createElement(ct.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},j.filter((function(e){return e&&c.a.getState().db.users[e]})).map((function(t){var r,n,o,i;return a.a.createElement(Ge.a,{key:t,title:c.a.getState().db.users[t]&&c.a.getState().db.users[t].displayName?c.a.getState().db.users[t].displayName:(null===(r=c.a.getState().db.users[t])||void 0===r?void 0:r.name)||""},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:c.a.getState().db.users[t].name||"",src:c.a.getState().db.users[t].image||null,style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"}},(null===(n=c.a.getState().db.users[t])||void 0===n||null===(o=n.name)||void 0===o?void 0:o.substr(0,1))||""),!e.multiple&&a.a.createElement("span",{style:{marginLeft:15}},c.a.getState().db.users[t].displayName?c.a.getState().db.users[t].displayName:(null===(i=c.a.getState().db.users[t])||void 0===i?void 0:i.name)||"")))})),e.multiple&&a.a.createElement(Ge.a,{title:Object(S.r)("$__selectUser")},a.a.createElement(Se.a,{style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"},alt:"ADD",src:null},"+"))))),a.a.createElement(Yt.a,{open:i},a.a.createElement("div",{style:(t={position:"relative",width:"100%",paddingBottom:_&&_.length?"66px":0},Object(f.a)(t,"width","100%"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"justifyContent","space-between"),t)},a.a.createElement(Pe.a,{onClickAway:function(e){s.current&&s.current.contains(e.target)||l(!1)}},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative"}},a.a.createElement(tt,{id:"quickUser_Search",label:Object(S.r)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"searchValue",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end",style:{cursor:"pointer"},onClick:function(){I(""),l(!1)}},a.a.createElement(ae.a,{icon:"close"})),onChange:function(e){I(e.target.value)}},value:C,placeholder:Object(S.r)("$__searchByName",1),autoFocus:!0})),a.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative",maxHeight:250,overflowY:"auto"}},a.a.createElement(Be.a,{id:"menu-list-grow",autoFocusItem:!1,autoFocus:!1,onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),l(!1))}},Object.keys(T).filter((function(e){return!T[e].deleted&&(""===C||C&&T[e].name&&T[e].name.toLowerCase().indexOf(C.toLowerCase())>-1)})).sort((function(e,t){return T[e].name<T[t].name?-1:T[e].name>T[t].name?1:0})).map((function(e){return T&&T[e]&&T[e]._id&&a.a.createElement(D,{pr:e,key:e,selected:-1!==j.indexOf(T[e]._id)})})))))))))})),Wt=r(545);function Ut(){Ut=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(641);var Vt,qt,Xt=Object(s.b)((function(e,t){return{card:e.db.cards[t.data._id]}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(zt)((function(e){var t,r=e.classes,n=c.a.getState(),o=n.db,i=n.session,l=o.cards,s=a.a.useState(!1),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState({}),O=Object(h.a)(x,2),w=O[0],j=O[1],k=e.data,L=a.a.useState([]),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT06:00")),N=Object(h.a)(F,2),D=N[0],A=N[1],P=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT07:00")),z=Object(h.a)(P,2),M=z[0],B=z[1],Y=a.a.useState(!1),R=Object(h.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(0),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(1),K=Object(h.a)(X,2),J=K[0],Z=K[1],Q=a.a.useState(0),ee=Object(h.a)(Q,2),te=(ee[0],ee[1],"time"===k.kpi_type&&k.kpi_ini?parseFloat(k.kpi_ini):0),re="time"===k.kpi_type&&k.kpi_fin?parseFloat(k.kpi_fin):0;a.a.useEffect((function(){t&&clearTimeout(t),ie(),oe(e.data._id)}),[v]),a.a.useEffect((function(){t&&clearTimeout(t),ie(),oe(e.data._id)}),[JSON.stringify(e.card)]);var ne=[e.data._id],oe=function e(t,r){var n=Object.keys(l).filter((function(e){return l[e].kpi_useParent&&l[e]._parent===t}));return n.length>0?n.map((function(t){e(t,!0),ne.push(t),T(Array.from(new Set(ne)))})):r||T(ne),n},ie=function(){var t=Object(d.a)({},c.a.getState().db.cards[e.data._id]);if(t&&t._kpiTimer&&Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id})).length>0){var r=t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id}))[0]];r.diff=_()().tz("America/Sao_Paulo").unix("x")-r.created_at,r&&r.updated_at&&(r.diff=parseInt(r.updated_at)-parseInt(r.created_at)),ce(r,!!r.updated_at)}else m(!1),j({}),y(!1);0===Object.keys(w).length&&e.manualAdd&&(j({created_at:_()(D).tz("America/Sao_Paulo").unix("X"),updated_at:_()(M).tz("America/Sao_Paulo").unix("X")}),ce({created_at:_()(D).tz("America/Sao_Paulo").unix("X"),updated_at:_()(M).tz("America/Sao_Paulo").unix("X")},!!w.updated_at))},ce=function(e,r){var n,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object(d.a)({},e),i=!1;if(o.diff?n=parseInt(o.diff):(n=parseInt(e.updated_at-e.created_at),e.updated_at-e.created_at<0&&(n=null)),n||G)if(n<60)o.diffText="".concat(o.diff," ").concat(Object(S.r)("$__seconds",1)),a||Z(0);else if(n>=3600){var c=Math.trunc(n/3600);n-=3600*c;var l=Math.trunc(n/60)>0?Math.trunc(n/60):0,s=(n-=60*l)>0?n:0;o.diffText="".concat(c," hora").concat(c>1?"s":""," ").concat(l," ").concat(Object(S.r)("$__minutes",1)," ").concat(s," ").concat(Object(S.r)("$__seconds",1)),a||(Z(c),q(l))}else{var u=Math.trunc(n/60)>0?Math.trunc(n/60):0,p=(n-=60*u)>0?n:0;o.diffText="".concat(u," ").concat(Object(S.r)("$__minutes",1)," ").concat(p," ").concat(Object(S.r)("$__seconds",1)),a||(Z(0),q(u))}else o.diffText=Object(S.r)("$__theEndMustBeGreaterThanTheBeginning");j(Object(d.a)(Object(d.a)({},w),o)),e.updated_at?(o.diff=parseInt(e.updated_at)-parseInt(e.created_at),f||m(!0)):(o.diff=_()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),v||(y(!0),i=!0)),r||e.updated_at||!i||(t=setTimeout((function(){ie()}),1e3))};if(!k)return null;var le=function(){var t=Object(p.a)(Ut().mark((function t(){var r;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.w)(e,k._id);case 2:(r=t.sent)&&(ce(r),y(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),se=function(){var t=Object(p.a)(Ut().mark((function t(){var r;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!1),t.next=3,Object(st.x)(e,k._id);case 3:(r=t.sent)&&j(Object(d.a)(Object(d.a)({},w),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ue=Object(d.a)({},Wt.model),de=[],pe=[],fe={};I.map((function(e){fe=Object(d.a)(Object(d.a)({},fe),o.cards[e]._timeline||{})})),fe=Object.keys(fe).filter((function(e){return"kpi"===fe[e].type})).map((function(e){return fe[e]}));var he="time"!==k.kpi_type?parseFloat(te):0,me=parseFloat(te)-parseFloat(re);me<0&&(me*=-1),fe&&Object.keys(fe).length>0&&Object.keys(fe).sort((function(e,t){return fe[e].created_at<fe[t].created_at?-1:1})).map((function(e,t){he=parseFloat(he)+parseFloat(fe[e].value),de.push({meta:fe[e].value,total:he,value:parseFloat(te)>parseFloat(re)?100-Math.floor(100*he/me):Math.floor(100*he/me)}),pe.push(t+1),t+1===Object.keys(fe).length&&(ue=Object(d.a)(Object(d.a)({},ue),{},{data:{labels:pe,series:[[].concat(de)]},options:Object(d.a)(Object(d.a)({},ue.options),{},{low:0,high:100,plugins:[Pt.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+Object(S.h)(e,"time"===k.kpi_type?"number":k.kpi_type)+"<br>"+Object(S.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var ge=te<re?re-te:te-re;fe&&Object.keys(fe).length>0&&Object.keys(fe).map((function(e){ge=parseFloat(ge)+parseFloat(fe[e].value)}));var be=Math.ceil(te<re?re-te:te-re);return(be=100*Math.ceil(ge)/be-100)<0&&(be*=-1),e.data?a.a.createElement("div",{className:r.root},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},e.manualAdd?Object(S.r)("$__timerLog",1):Object(S.r)("$__timer",1)),e.manualAdd&&a.a.createElement(a.a.Fragment,null,G?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"schedule"}),a.a.createElement(tt,{label:Object(S.r)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"date",inputProps:{max:_()().format("YYYY-MM-DD"),autoComplete:"start-date",onChange:function(e){_()(e.target.value).isValid()&&A(e.target.value);var t=w.updated_at-w.created_at;ce(Object(d.a)(Object(d.a)({},w),{},{created_at:_()("".concat(e.target.value," 00:00:00")).unix("X"),updated_at:_()("".concat(e.target.value," 00:00:00")).unix("X")+t}),!0,!0)}},value:D}))):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"schedule"}),a.a.createElement(tt,{label:Object(S.r)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{max:M,autoComplete:"start-date",onChange:function(e){_()(e.target.value).isValid()&&(A(e.target.value),ce(Object(d.a)(Object(d.a)({},w),{},{created_at:_()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:D})),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"watch_later"}),a.a.createElement(tt,{label:Object(S.r)("$__finalDate",1),variant:Object(S.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:D,autoComplete:"new-password",onChange:function(e){_()(e.target.value).isValid()&&(B(e.target.value),ce(Object(d.a)(Object(d.a)({},w),{},{updated_at:_()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:M}))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"more_time"}),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tt,{label:Object(S.r)("$__hours",1),variant:Object(S.d)("fieldVariant",1),name:"hours",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,autoComplete:"hours",onChange:function(e){Z(e.target.value),H(!0),D.indexOf("T")>-1&&A(D.substring(0,10)),ce(Object(d.a)(Object(d.a)({},w),{},{created_at:_()("".concat(D.substring(0,10)," 00:00:00")).unix("X"),updated_at:_()("".concat(D.substring(0,10)," 00:00:00")).unix("X")+60*e.target.value*60+60*V}),!0,!0)}},value:J,style:{paddingLeft:7,paddingRight:7}}),a.a.createElement(tt,{label:Object(S.r)("$__minutes",1),variant:Object(S.d)("fieldVariant",1),name:"minutes",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,max:59,autoComplete:"new-password",onChange:function(e){q(e.target.value),H(!0),D.indexOf("T")>-1&&A(D.substring(0,10)),ce(Object(d.a)(Object(d.a)({},w),{},{created_at:_()("".concat(D.substring(0,10)," 00:00:00")).unix("X"),updated_at:_()("".concat(D.substring(0,10)," 00:00:00")).unix("X")+60*J*60+60*e.target.value}),!0,!0)}},value:V,style:{paddingLeft:7,paddingRight:7}}),a.a.createElement(E.a,{title:Object(S.r)("$__reset",1),icon:"update_disabled",color:Object(S.d)("menu"),onClick:function(){H(!1),A("".concat(D," 00:00:00"))},size:"17px",style:{marginLeft:3,marginRight:3,backgroundColor:"rgba(0,0,0,0.05)",padding:3},transparent:!0}))),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}}),w&&w.diffText&&a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},w.diffText)),parseInt(o.cards[k._id]._users[i._id].access)>=3?a.a.createElement($,null,a.a.createElement(Ht,{includeMe:!0,data:o.cards[k._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){ce(Object(d.a)(Object(d.a)({},w),{},{to:e}),!0)}})):a.a.createElement(a.a.Fragment,null)),f||e.manualAdd?a.a.createElement("div",null,!e.manualAdd&&w&&w.created_at&&w.updated_at&&w.diffText&&_()(1e3*w.created_at).isValid()&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},_()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"watch_later"}),a.a.createElement("div",{className:"text"},_()(1e3*w.updated_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},w.diffText))),w.created_at<w.updated_at?a.a.createElement($,null,a.a.createElement(Bt,{manualAdd:!!e.manualAdd,data:k,timer:w,manualEntry:G,callBack:function(){m(!1),e.callBack&&e.callBack()}})):a.a.createElement(a.a.Fragment,null)):a.a.createElement("div",{className:r.time},v?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){se()}})}},"pause_circle_filled"),a.a.createElement("div",{className:"text"},w.diffText)):a.a.createElement(a.a.Fragment,null,re&&he?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:60*re<he?"red":"color",icon:"schedule"}),a.a.createElement("div",{className:"text",style:{color:60*re<he?"red":"grey"}},Object(S.r)("$__timeLeft",1),": ",60*re-he>-60&&60*re-he<60?"".concat(60*re-he," ").concat(Object(S.r)("$__seconds",1)," "):"".concat(Math.trunc((60*re-he)/60)," ").concat(Object(S.r)("$__minutes",1)," ").concat(60*re-he-60*Math.trunc((60*re-he)/60)," ").concat(Object(S.r)("$__seconds",1)," "))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",onClick:function(){le()},title:"playRegisterLogWork"},"play_circle_outline"),a.a.createElement("span",{style:{marginLeft:7,color:Object(S.d)("color")}},Object(S.r)("$__startStopWatch"))))))):a.a.createElement("div",null,"NO DATA RECEIVED")}))),Kt={containerNoShadow:Object(d.a)(Object(d.a)({},W.l),{},(Vt={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(Vt,"padding","3px"),Object(f.a)(Vt,"display","flow-root"),Vt)),container:Object(d.a)(Object(d.a)({},W.l),{},(qt={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(qt,"padding","3px"),Object(f.a)(qt,"display","flow-root"),Object(f.a)(qt,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),qt)),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("color"),fontWeight:"500",alignItems:"center"}},infos:{position:"relative",float:"left",width:"100%",height:"auto",display:"block"},indicators:{position:"relative",float:"left",height:"auto",zIndex:"0 !important"},indicatorsIcon:{position:"relative",float:"left",margin:"0px 0px","& MuiBadge-badge":{position:"relative",float:"left"}},image:{position:"relative",float:"left",width:"100%",marginTop:"7px",maxWidth:"100%",display:"none"},imagePreview:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%"},imagePreviewList:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%",paddingTop:"48%","@media screen and (max-width: 800px)":{width:"100%"}},PreLoader:{top:"calc(50% - 25px)",left:"calc(50% - 25px)",position:"absolute"},description:{position:"relative",float:"left",padding:"5px",minHeight:"75px",width:"100%",overflow:"hidden",textOverflow:"ellipses"},dates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(S.d)("medium"),fontSize:"10px",display:"flex"},lateDates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:"red",fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{minHeight:"20px",minWidth:"40px",zIndex:"0 !important"},users:{position:"absolute",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};var Jt=Object(de.a)(Kt)((function(e){var t=e.classes;return a.a.createElement("div",null,a.a.createElement("div",{className:t.infos},a.a.createElement("div",{className:t.imagePreview,style:{background:e.backgroundColor?e.backgroundColor:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(ae.a,{icon:"lock",size:"39px",color:e.avatarIconColor?e.avatarIconColor:Object(S.d)("AvatarIconColor")})))))})),Zt=r(55),Qt=r(546);function er(){er=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var tr,rr=function(){var e=Object(p.a)(er().mark((function e(t){var r,n,a,o,i;return er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(d.a)({},t),Object.keys(n).map((function(e){n[e]||delete n[e]})),n.name.trim().split("\n"),a={},o={},n.users&&n.users.length>0&&n.users.map((function(e,t){var r=c.a.getState().db.users[e];o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},e,Object(d.a)({_id:e,name:r.name,image:r.image||null},0===t?{isResponsible:!0}:{})))})),i=Object($t.a)(),ut.a.post("card/add",Object(d.a)({_id:i},n)),a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},i,Object(d.a)(Object(d.a)({_id:i},n),{},{_users:o}))),(null===(r=a[i])||void 0===r?void 0:r.users)&&delete a[i].users,e.abrupt("return",a);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),nr=function(){var e=Object(p.a)(er().mark((function e(t){var r,n,a=arguments;return er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:"order",n=a.length>2&&void 0!==a[2]?a[2]:0,e.prev=2,e.next=5,ut.a.post("kanban/reorder",{cards:t,orderBy:r});case 5:return e.abrupt("return",!0);case 8:e.prev=8,e.t0=e.catch(2),n<3&&setTimeout((function(){nr(t,r,n+1)}),3e3);case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),ar=function(){var e=Object(p.a)(er().mark((function e(t){return er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ut.a.put("card/link",t);case 3:return e.abrupt("return",!0);case 6:e.prev=6,e.t0=e.catch(0),setTimeout((function(){ar(t)}),3e3);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),or=function(e,t,r){var n=c.a.getState().db.cards[r],a=c.a.getState().db.cards[t],o={};n&&n.automationDueDateType&&"add"===n.automationDueDateType&&(o=Object(d.a)({endDate:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add((null===n||void 0===n?void 0:n.automationDueDate)||1,"days").unix("X")},a.startDate?{}:{startDate:_()().unix("X")})),n&&n.automationStatusType&&"replace"===n.automationStatusType&&(o=Object(d.a)(Object(d.a)({},o),{},{status:n.automationStatus||"notStarted"},n.automationStatus&&"completed"===n.automationStatus?{completed_at:_()().unix("x")}:{}));var i,l=[];if(n&&n.automationUsers&&"add"===n.automationUsers&&n._users&&Object.keys(n._users).filter((function(e){return e})).length>0&&Object.keys(n._users).filter((function(e){return e})).map((function(t){if(n._users[t].isResponsible&&(i=t),a&&(!a._users||a._users&&!a._users[t])){var r=!(!a._users||!a._users[t]);Et(e,t,n._users[t].access,a._id,r)}})),n&&n.automationTags&&"doNotChange"!==n.automationTags&&n._tags&&n._tags.length>0){var s=a._tags?Array.from(a._tags):[];if("replace"===n.automationTags){var u=[],p=[];n._tags.map((function(e){s.findIndex((function(t){return t.value===e.value}))>-1&&(u.push(e.value),s.splice(s.findIndex((function(t){return t.value===e.value})),1))})),n._tags.map((function(e){-1===s.findIndex((function(t){return t.value===e.value}))&&(s.push(e),-1===p.indexOf(e.value)&&p.push(e.value))})),o=Object(d.a)(Object(d.a)(Object(d.a)({},o),u.length>0?{removeTags:u}:{}),p.length>0?{addTags:p}:{}),s=Array.from(n._tags)}if("add"===n.automationTags){var f=[];n._tags.map((function(e){0===s.filter((function(t){return t.value===e.value})).length&&(f.push(e.value),s.push(e))})),o=Object(d.a)(Object(d.a)({},o),{},{addTags:f})}if("remove"===n.automationTags){var h=[];n._tags.map((function(e){s.findIndex((function(t){return t.value===e.value}))>-1&&(h.push(e.value),s.splice(s.findIndex((function(t){return t.value===e.value})),1))})),o=Object(d.a)(Object(d.a)({},o),{},{removeTags:h})}o=Object(d.a)(Object(d.a)({},o),{},{_tags:s})}return n&&n.automationUsers&&"remove"===n.automationUsers&&n._users&&Object.keys(n._users).filter((function(e){return e})).length>0&&Object.keys(n._users).filter((function(e){return e})).map((function(e){a&&a._users&&a._users[e]&&l&&-1===l.indexOf(e)&&l.push(e)})),n&&n.automationUsers&&"replace"===n.automationUsers&&n._users&&Object.keys(n._users).filter((function(e){return e})).length>0&&(Object.keys(n._users).filter((function(e){return e})).map((function(t){if(n._users[t].isResponsible&&(i=t),a&&(!a._users||a._users&&!a._users[t])){var r=!(!a._users||!a._users[t]);Et(e,t,n._users[t].access,a._id,r)}})),a&&a._users&&Object.keys(a._users).filter((function(e){return e})).length>0&&Object.keys(a._users).filter((function(e){return e})).map((function(e){console.log(a),!n.removeCreatorUser&&a._users&&console.log("ok")}))),l.length>0&&ut.a.put("cards/removeAccess/",{cardId:a._id,userIds:l}),i&&Lt(e,{cardId:a._id,userId:i}),"{}"!==JSON.stringify(o)&&ir(Object(d.a)({_id:t},o)),ar({idRel:t,destination:r}),o&&o.status&&"completed"===o.status&&!o.completed_at&&(o=Object(d.a)(Object(d.a)({},o),{},{completed_at:_()().unix("x")})),o},ir=function(){var e=Object(p.a)(er().mark((function e(t){var r,n;return er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(d.a)({},t),e.next=3,ut.a.post("kanban/automation",r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c.a.getState().db.cards,n={},a=[];return r&&Object.keys(r).length>0&&Object.keys(r).filter((function(t){return r[t]._parent===e&&"step"===r[t].type&&!r[t].deleted})).length>0&&Object.keys(r).filter((function(t){return r[t]._parent===e&&"step"===r[t].type})).sort((function(e,t){var n=r[e].step||1,a=r[t].step||1;return parseInt(n)<parseInt(a)?-1:parseInt(n)>parseInt(a)?1:0})).map((function(o,i){var c=[];Object.keys(r).length>0&&Object.keys(r).filter((function(n){return r[n]._parent===o&&(!t.deleted&&!r[n].deleted||t.deleted)||0===i&&r[n]._parent===e&&!r[n].deleted&&"objective"!==r[n].type&&"goal"!==r[n].type&&"step"!==r[n].type&&-1===r[n].type.indexOf("guideline")&&"link"!==r[n].type&&"insight"!==r[n].type&&"threat"!==r[n].type&&"strength"!==r[n].type&&"weakness"!==r[n].type&&"opportunity"!==r[n].type&&"chatGroup"!==r[n].type})).sort((function(e,t){var n,a,o,i,c,l,s,u,d,p,f,h,m=0,g=0;return(null===(n=r[e])||void 0===n?void 0:n.order)&&(m=String((null===(a=r[e])||void 0===a||null===(o=a.order)||void 0===o?void 0:o.low)?null===(i=r[e])||void 0===i||null===(c=i.order)||void 0===c?void 0:c.low:null===(l=r[e])||void 0===l?void 0:l.order)),(null===(s=r[t])||void 0===s?void 0:s.order)&&(g=String((null===(u=r[t])||void 0===u||null===(d=u.order)||void 0===d?void 0:d.low)?null===(p=r[t])||void 0===p||null===(f=p.order)||void 0===f?void 0:f.low:null===(h=r[t])||void 0===h?void 0:h.order)),parseInt(m)<parseInt(g)?-1:parseInt(m)>parseInt(g)?1:0})).map((function(e,t){r[e].deleted&&console.log(r[e]),c.push(Object(d.a)(Object(d.a)({},r[e]),{},{order:String(t)}))})),n=Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},o,{id:o,name:r[o].name,icon:r[o].icon||null,items:c})),-1===a.indexOf(o)&&a.push(o)})),{columns:n,columnOrder:a}},lr=function(){var e=Object(p.a)(er().mark((function e(t){var r,n,a,o,i,l,s,u,p,h,m,g,b;return er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.nodeId,n=t.reason,a=void 0===n?null:n,o=t.approval,i=void 0!==o&&o,l=t.approved,s=void 0!==l&&l,u=c.a.getState().db.cards[r],p=c.a.getState().db.cards[u._parent],h=p.onConcludedStepMoveTo?p.onConcludedStepMoveTo:Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===p._parent&&"step"===c.a.getState().db.cards[e].type&&parseInt(c.a.getState().db.cards[e].step)===parseInt(p.step)+1}))[0],m=c.a.getState().db.cards[h],!i){e.next=10;break}return g={_id:Object($t.a)(),idRel:r,cardId:p._id,message:"".concat(s?"$__approved":"$__rejected"," - ").concat(a?"$__reason: ".concat(a):""),type:"log",filesCount:0,approval:!0,db:"cards"},e.next=9,ut.a.post("timeline/add",g);case 9:s||(ar({idRel:r,destination:p._parent}),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},r,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r]),{},{_parent:p._parent,requireApproval:null})))})));case 10:(!i||i&&s)&&(b=or(t,r,h),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},r,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r]),b),{},{_parent:p.onConcludedStepMoveTo},(null===m||void 0===m?void 0:m.requireApproval)?{requireApproval:!0}:{requireApproval:null})))})));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function sr(){sr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ur,dr=w.default.div(tr||(tr=Object(u.a)(["\n","\n","\n","\n","\n","\n","\n width:calc(100%) !important\n"])),(function(e){return e.selectable&&e.selected?"\n opacity:1":e.selectable?"\n opacity:0.5":""}),(function(e){return e.locked?"cursor:no-drop !important":"cursor:pointer"}),(function(e){return e.priority&&e.showCard,""}),(function(e){return!e.selectable&&e.selected?"border-bottom:solid 5px ".concat(Object(S.d)("color")):""}),(function(e){return e.isDragDisable?"":e.isDragging?"\n opacity:0.88\n max-width:320px":""}),(function(e){return e.inLine?"position:relative\n float:left\n margin:1px\n width:calc(20% - 7px)\n // maxWidth:320px\n ":"\n width:calc(100%) !important\n margin:1px 0px 1px 0px\n "})),pr=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Qt.a)((function(e){var t=e.classes,r=c.a.getState().db,n=e.data&&e.data._id?c.a.getState().db.cards[e.data._id]:{},o=a.a.useState(n.name?n.name:""),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],_=function(){var t=Object(p.a)(sr().mark((function t(r){return sr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:n._id}}),r),g(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(){var e=Object(p.a)(sr().mark((function e(){return sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmDeleteThisFullDescription",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){_({deleted:!0})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(dr,Object.assign({},e.provided&&e.provided.draggableProps,e.key?{key:e.key}:{},{ref:e.provided&&e.provided.innerRef,isDragging:e.snapshot&&e.snapshot.isDragging,isDragDisable:n.isDragDisable||e.isDragDisable||!1,inLine:e.inLine,selectable:e.showSelected,selected:n._selected,priority:n.priority?r.priority.filter((function(e){return String(e.value)===String(n.priority)}))[0].color:null,locked:e.locked||!1,className:e.showCard?t.cardContainer:t.container}),a.a.createElement("div",e.provided&&e.provided.dragHandleProps,m?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(tt,{label:Object(S.r)("$__taskTitle"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onBlur:function(e){""===e.target.value&&g(!m)},onKeyDown:function(e){13===e.keyCode&&l&&_({name:l}),27===e.keyCode&&(g(!m),s())}},autoFocus:!0,value:l,placeholder:Object(S.r)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return _({name:l})}},a.a.createElement(ae.a,{color:"green",icon:"save",title:Object(S.r)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){g(!m),s("")}},a.a.createElement(ae.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.r)("$__cancel","*"),size:e.actionsSize||"25px"}))))):a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},onMouseOver:function(){x(!0)},onMouseLeave:function(){x(!1)}},a.a.createElement("div",Object.assign({style:{width:"100%",padding:"0px 7px",wordBreak:"break-word"},onDoubleClick:function(){g(!m)}},e.provided?{provided:e.provided}:{},e.snapshot?{snapshot:e.snapshot}:{}),e.showCard?a.a.createElement(Dn,{db:"cards",data:e.data,viewTimer:!0,viewAllName:!0}):n.name?n.name:Object(S.r)("$__new",1)),"completed"!==n.status||e.showCard?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:"rgba(0,0,0,0.05)",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{position:"absolute",top:"50%",marginLeft:15,height:1,width:"calc(100% - 50px)",backgroundColor:"rgba(0,0,0,0.1)"}}),n.completed_at?a.a.createElement("div",{style:{position:"absolute",right:33,top:"calc(50% - 15px)",fontSize:10,textAlign:"right",backgroundColor:"#f1f1f1",paddingLeft:7}},Object(S.k)(n.completed_at)):a.a.createElement(a.a.Fragment,null)),y&&e.permission&&!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(E.a,{title:Object(S.r)("$__undoConclude",1),color:"lightgrey",icon:"delete_forever",onClick:function(){return O()},transparent:!0}),n.checklist?a.a.createElement(E.a,{title:Object(S.r)("$__turnIntoActivity",1),color:"lightgrey",icon:"change_circle",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmTurnIntoActivity",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){_({checklist:null})}})},transparent:!0}):a.a.createElement(a.a.Fragment,null)),(!e.showCard||!e.dragStatus&&e.showCard)&&a.a.createElement(E.a,{title:"completed"!==n.status?Object(S.r)("$__conclude",1):Object(S.r)("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){n._hasStep?lr(Object(d.a)(Object(d.a)({},e),{},{nodeId:n._id})):Object(st.J)(e,n)},transparent:!0}))),e.locked?a.a.createElement("div",{style:{position:"absolute",backgroundColor:"rgba(233,233,233,0.88)",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:"lightgray",icon:"lock",size:"22px"}))):a.a.createElement(a.a.Fragment,null))}))),fr=r(1821),hr=Object(de.a)({switchBase:{color:Object(S.d)("medium"),"&$checked":{color:Object(S.d)("color")},"&$checked + $track":{backgroundColor:Object(S.d)("color")}},checked:{},track:{}})(fr.a);function mr(){mr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var gr=w.default.div(ur||(ur=Object(u.a)(["\n background-color:none\n ","\n "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""})),br=Object(s.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=c.a.getState().functions.socket,i=a.a.useState(e.name?e.name:""),l=Object(h.a)(i,2),s=(l[0],l[1],a.a.useState(!1)),u=Object(h.a)(s,2),m=u[0],g=u[1],b=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),v=window.location.hash.split("/");v[0]=v[0].replace("#",""),36!==v[0].length&&(v[0]=null);var y={};c.a.getState().db[e.db]&&c.a.getState().db[e.db][e.nodeId]&&(y=c.a.getState().db[e.db][e.nodeId]);var x=Object.keys(c.a.getState().db.cards).filter((function(t){return!(e.myDay||"step"===c.a.getState().db.cards[t].type||!(!e.noChecklist&&c.a.getState().db.cards[t]&&!c.a.getState().db.cards[t].deleted&&c.a.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!c.a.getState().db.cards[t].deleted&&c.a.getState().db.cards[t]._parent===e.nodeId))||(!(!(e.myDay&&r.cards[t]._users&&r.cards[t]._users[n._id]&&r.cards[t]._users[n._id].myDay&&_()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===b&&c.a.getState().db.cards[t])||c.a.getState().db.cards[t].deleted)||void 0)})).sort((function(e,t){var n=r.cards[e]&&r.cards[e].order&&!r.cards[e].order.low?parseInt(r.cards[e].order):r.cards[e].order&&r.cards[e].order.low?parseInt(r.cards[e].order.low):0,a=r.cards[t]&&r.cards[t].order&&!r.cards[t].order.low?parseInt(r.cards[t].order):r.cards[t].order&&r.cards[t].order.low?parseInt(r.cards[t].order.low):0;return n<a?-1:n>a?1:0})).map((function(e){return e})),O=function(){var t=Object(p.a)(mr().mark((function t(n){var a,i,l,s,u;return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g(!1),a=n.destination,i=n.source,l=n.draggableId,a){t.next=4;break}return t.abrupt("return",!1);case 4:if(a.droppableId!==i.droppableId||a.id!==i.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(s=Array.from(x.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){var n=r.cards[e].order||0;String(n.low)&&(n=parseInt(n.low));var a=r.cards[t].order||0;return String(a.low)&&(a=parseInt(a.low)),n<a?-1:n>a?1:0})).map((function(e){return e})))).splice(i.index,1),t.next=10,setTimeout(500);case 10:return s.splice(a.index,0,l),t.next=13,setTimeout(500);case 13:return o.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u=Object(d.a)({},c.a.getState().db.cards),t.next=17,new Promise((function(e,t){s.map((function(t,r){u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},t,Object(d.a)(Object(d.a)({},u[t]),{},{order:"".concat(r+1)}))),r+1===s.length&&e(!0)}))}));case 17:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(d.a)(Object(d.a)({},r),{},{cards:Object(d.a)(Object(d.a)({},r.cards),u)})),t.abrupt("return");case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),w=function(){var e=Object(p.a)(mr().mark((function e(t){return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=Object(p.a)(mr().mark((function e(t){return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=x.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){var n=r.cards[e]&&r.cards[e].order&&!r.cards[e].order.low?parseInt(r.cards[e].order):r.cards[e].order&&r.cards[e].order.low?parseInt(r.cards[e].order.low):0,a=r.cards[t]&&r.cards[t].order&&!r.cards[t].order.low?parseInt(r.cards[t].order):r.cards[t].order&&r.cards[t].order.low?parseInt(r.cards[t].order.low):0;return n<a?-1:n>a?1:0}));return a.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},e.permission?a.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",alignItems:"center",padding:"3px 10px",justifyContent:"center"}},a.a.createElement("div",{style:{marginRight:15}},Object(S.r)("$__requireConcludedByStep")),a.a.createElement(hr,{checked:!!y.listStepLock,onChange:function(){Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:y._id}}),{listStepLock:!y.listStepLock})},name:"listStepLock",inputProps:{"aria-label":"secondary checkbox"}}),a.a.createElement(E.a,{title:Object(S.r)("$__openBoard"),text:Object(S.r)("$__openBoard"),color:"lightgrey",textColor:"lightgrey",icon:"open_in_new",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:e.nodeId})),e.reduxFunction("ASYNC","CLEAR_MODULE")},size:"25px"})):a.a.createElement(a.a.Fragment,null),e.showProgress&&x.length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{position:"absolute",right:7,bottom:0,fontSize:9,color:Object(S.d)("menu"),fontWeight:"bold"}},x.filter((function(e){return"completed"===r.cards[e].status})).length,"/",a.a.createElement("span",{style:{fontWeight:"normal"}},x.length)),a.a.createElement("div",{style:{position:"relative",width:"100%",height:5,backgroundColor:"lightGray"}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,backgroundColor:Object(S.d)("menu"),width:"".concat(100/x.length*x.filter((function(e){return"completed"===r.cards[e].status})).length,"%")}}))):a.a.createElement(a.a.Fragment,null),x.filter((function(e){return"completed"!==r.cards[e].status})).length>0?a.a.createElement(Zt.a,{onDragEnd:O,onDragStart:w,onDragUpdate:j},a.a.createElement(Zt.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return a.a.createElement(gr,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),k.map((function(t,n){return a.a.createElement(Zt.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(o,i){return a.a.createElement(pr,{dragStatus:m,provided:o,snapshot:i,data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!(r.cards[t].checklist&&(!r.cards[t].checklist||!e.showCard&&!r.cards[t].showCard)),permission:e.permission,locked:y.listStepLock&&n>0&&"completed"!==r.cards[k[n-1]].status})}))})),t.placeholder)}))):a.a.createElement(a.a.Fragment,null),(e.permission||e.myDay)&&a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(Ee,{text:Object(S.r)("$__new","*"),icon:"add_box",iconColor:Object(S.d)("color"),onClick:function(){var t,r,n,a,o;e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{myDay:!!e.myDay,addCard:{myDay:!!e.myDay,_parent:(null===(t=y)||void 0===t?void 0:t._id)||null,rows:x.length,type:y&&y.type&&(null===(r=y)||void 0===r||null===(n=r.type)||void 0===n?void 0:n.indexOf("guideline"))>-1?"objective":"objective"===(null===(a=y)||void 0===a?void 0:a.type)?"goal":(null===(o=y)||void 0===o||o.type,"task")}}))},style:{padding:7}}),e.myDay?a.a.createElement(a.a.Fragment,null):a.a.createElement(Ee,{text:Object(S.r)("$__newSimpleTask","*"),icon:"playlist_add",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{myDay:e.myDay||!1,checklist:!0,addCard:{_parent:y._id,rows:x.length,type:y.type.indexOf("guideline")>-1?"objective":"objective"===y.type?"goal":(y.type,"task"),checklist:!0}}))},style:{padding:7}})),x.filter((function(e){return"completed"===r.cards[e].status})).length>0?a.a.createElement(a.a.Fragment,null,x.filter((function(e){return"completed"===r.cards[e].status})).sort((function(e,t){var n=0,a=0;return r.cards[e].completed_at&&r.cards[e].completed_at.low&&(n=parseInt(r.cards[e].completed_at.low)),r.cards[t].completed_at&&r.cards[t].completed_at.low&&(a=parseInt(r.cards[t].completed_at.low)),n>a?-1:n<a?1:0})).map((function(t,n){return a.a.createElement("div",{key:"".concat(t).concat(n)},a.a.createElement(pr,{dragStatus:m,data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!(r.cards[t].checklist&&(!r.cards[t].checklist||!e.showCard&&!r.cards[t].showCard)),permission:e.permission,locked:y.listStepLock&&n>0&&k[n-1]&&r.cards[k[n-1]]&&"completed"!==r.cards[k[n-1]].status}))}))):a.a.createElement(a.a.Fragment,null))}));var vr=function(e){var t=c.a.getState(),r=t.db,n=t.session,o=Object(st.i)(e.id),i=Object(S.j)();if(0===Object.keys(o).length)return null;var l=Object.keys(o).map((function(t,c){var l=Object(st.t)(t);if(o[t].icon&&o[t].type&&o[t].name)return a.a.createElement("div",{style:{marginRight:"10px",width:"100%"},key:c},a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:e.open&&((i.planAdmin||i.planModerate)&&("plan"!==r.cards[o[t]._id].type||"plan"===r.cards[o[t]._id].type&&Object(st.B)(o[t]._id))||l>=1)&&(!r.cards[o[t]._id].private||r.cards[o[t]._id].private&&r.cards[o[t]._id]._users&&r.cards[o[t]._id]._users[n._id])?function(r){e.open(o[t]._id),r.stopPropagation()}:null},a.a.createElement(Oe.a,{overlap:"rectangular",icon:o[t].icon,title:"".concat(Object(S.r)("$__".concat(o[t].type),"*"),": ").concat(o[t].name),size:"16px",color:Object(S.d)("color")}),a.a.createElement("span",{style:{marginLeft:"5px"}},o[t].name)),a.a.createElement("div",{style:{clear:"both"}}))}));return a.a.createElement("div",{style:{width:"calc(100% - 5px)"},onClick:function(e){e.stopPropagation()}},e.showLegend?a.a.createElement("fieldset",{style:{marginBottom:"14px",width:"100%"}},a.a.createElement("legend",null,Object(S.r)(e.legend||"$__connectedIn",1)),l):l,a.a.createElement("div",{style:{clear:"both"}}))},yr=r(1011),xr=r.n(yr),_r=r(1822);var Or=function(e){var t={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(Object(S.d)("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(S.d)("color")}},bar:{borderRadius:7}},r=Object(z.a)(t)(),n=Object(d.a)({},e);return n.showText&&delete n.showText,n.customColor&&delete n.customColor,a.a.createElement("div",{className:r.root,style:e.showText?{width:"calc(100% - 40px)"}:{}},a.a.createElement(_r.a,n),e.showText&&a.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))},wr=Object(z.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var jr=function(e){var t=wr(),r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useRef(null),l=function(e){c.current&&c.current.contains(e.target)||i(!1)};return a.a.createElement("div",{onClick:function(e){e.stopPropagation()},style:{zIndex:100}},a.a.createElement(Ge.a,{title:Object(S.r)("$__options",1)},a.a.createElement(ze.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),e.onClick&&e.onClick(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(ae.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:Object(S.d)("menu"),icon:e.icon?e.icon:"design_services",title:e.title?e.title:"NO_ALIAS"}))),a.a.createElement(Re.a,{open:o,anchorEl:c.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement($e.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:l},a.a.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault()}},a.a.cloneElement(e.children,{callBack:function(e){i(!1)}})))))})))};function Er(){Er=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var Sr=function(){var e=Object(p.a)(Er().mark((function e(t,r){var n,a,o,i,l,s;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n={},a=c.a.getState(),o=a.db,i=a.session,(c.a.getState().timeline[r.id]||c.a.getState().timeline[r.readedBy])&&(n=c.a.getState().timeline,l=r.id,s={},"cards"!==r.db?(l=n[r.readedBy]?r.readedBy:r.id,s={_id:r.readedBy,name:o.users[r.readedBy].name,image:o.users[r.readedBy].image}):o.cards[r.id]&&o.cards[r.id]._users&&o.cards[r.id]._users[r.readedBy]&&(s=o.cards[r.id]._users[r.readedBy]),n&&n[l]&&Object.keys(n[l]).filter((function(e){if(r&&r.type&&("all"!==r.type&&n[l][e].type===r.type||"all"===r.type)&&n[l][e].user._id!==r.readedBy&&(!n[l][e].readedBy||i&&i._id&&n[l][e].readedBy&&!n[l][e].readedBy[i._id]))return!0})).map((function(e,t){n[l][e]=Object(d.a)(Object(d.a)({},n[l][e]),{},{readedBy:Object(d.a)(Object(d.a)({},n[l][e]&&n[l][e].readedBy?n[l][e].readedBy:{}),{},Object(f.a)({},r.readedBy,Object(d.a)(Object(d.a)(Object(d.a)({},n[l][e]&&n[l][e].readedBy&&n[l][e].readedBy[r.readedBy]?n[l][e].readedBy[r.readedBy]:{}),s),{},{readedDate:{low:_()().unix("x")}})))})}))),t.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)({},n)),c.a.getState().db.cards[r.id]&&r.type&&c.a.getState().db.cards[r.id]._notifications&&(c.a.getState().db.cards[r.id]._notifications[r.type]||"all"===r.type)&&t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},r.id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r.id]),"all"===r.type?{notifications:{}}:{_notifications:Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r.id]&&c.a.getState().db.cards[r.id]._notifications?c.a.getState().db.cards[r.id]._notifications:{}),{},Object(f.a)({},r.type,0))})))}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),kr=function(){var e=Object(p.a)(Er().mark((function e(t,r){var n,a,o,i,l,s,u,p;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState(),a=n.db,o=n.timeline,i=n.session,l={},s=r.nodeId!==i._id?s=r.nodeId:r.user,a.users[r.user]?l=a.users[r.user]:r.user&&a[r.db]&&o[s]&&o[s]._users&&o[s]._users[r.user]&&(l=o[s]._users[r.user]),s&&r.message&&o&&o[i._id]&&o[i._id][r.message]&&(s=i._id),a[r.db]&&o[s]&&o[s][r.message]&&(u=Object(d.a)(Object(d.a)({},o[s][r.message]&&o[s][r.message]._reactions?o[s][r.message]._reactions:{}),{},Object(f.a)({},r.react,Object(d.a)(Object(d.a)({},o[s][r.message]&&o[s][r.message]._reactions&&o[s][r.message]._reactions[r.react]?o[s][r.message]._reactions[r.react]:{}),{},Object(f.a)({},r.user,Object(d.a)(Object(d.a)({},l),{},{reactDate:{low:_()().tz("America/Sao_Paulo").unix("x")}}))))),Object.keys(u).map((function(e){e!==r.react&&Object.keys(u[e]).map((function(t){u[e][t]&&t===r.user&&delete u[e][t]}))})),p=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},s,Object(d.a)(Object(d.a)({},o[s]),{},Object(f.a)({},r.message,Object(d.a)(Object(d.a)({},o[s][r.message]),{},{_reactions:u}))))),t.reduxFunction("ASYNC","SET_TIMELINE",p));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Lr=function(){var e=Object(p.a)(Er().mark((function e(t,r){var n,a,o,i;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(p.a)(Er().mark((function e(n,a){return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||"cards"!==r.db||c.a.getState().db.cards[r.idRel]){e.next=7;break}return e.next=3,Object(Ke.b)(t,{idRel:r.idRel,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:e.sent&&n(!0),e.next=8;break;case 7:n(!0);case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 2:if(!e.sent){e.next=11;break}return n=r,a=c.a.getState(),a.timeline,o=a.session,(i=n._parent?n._parent:n.cardId?n.cardId:n.node)===o._id&&(i=n.comment.user._id),n.to&&(n.to.map((function(e){var t=c.a.getState().db.users[e];n._toUser=Object(d.a)(Object(d.a)({},n._toUser?n._toUser:{}),{},Object(f.a)({},e,{_id:e,name:t.displayName?t.displayName:t.name,image:t.image?t.image:null}))})),delete n.to),i&&n.comment&&t.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),{},Object(f.a)({},i,Object(d.a)(Object(d.a)({},c.a.getState().timeline[i]),{},Object(f.a)({},n.comment._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]?c.a.getState().timeline[i][n.comment._id]:{}),n.comment),n._toUser?{_toUser:n._toUser}:{}),{},{type:c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]&&c.a.getState().timeline[i][n.comment._id].type?c.a.getState().timeline[i][n.comment._id].type:n&&n.comment&&n.comment.type?n.comment.type:c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]&&c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id].type?c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id].type:"comment",readedBy:Object(d.a)(Object(d.a)({},c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]&&c.a.getState().timeline[i][n.comment._id].readedBy?c.a.getState().timeline[i][n.comment._id].readedBy:{}),n.comment&&n.comment.readedBy?n.comment.readedBy:{}),idRel:null})))))),e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Cr=function(){var e=Object(p.a)(Er().mark((function e(t,r){var n,a,o,i,l,s,u,h,m,g,b,v,y,x,_,O,w,j,E,S,k,L,C;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=(null===(n=c.a.getState().chat)||void 0===n?void 0:n.lastMessageDate)||0,o=r.ids,i=r.db,l=r.type,s=r.limit,u=void 0===s?0:s,h=r.skip,m=void 0===h?0:h,g=r.toId,b=void 0===g?null:g,v=r.ini,y=void 0!==v&&v,x=r.reqChildrens,_=void 0!==x&&x,O=r.newUpdates,w=void 0!==O&&O,j=r.lastDate,void 0===j?null:j,E=c.a.getState(),S=E.session,k=[],L=[],"string"===typeof o?L.push(o):L=o,L&&L.length>0&&L.map((function(e){-1===k.indexOf(e)&&k.push(e)})),!(k.length>0)){e.next=16;break}return e.next=10,new Promise(function(){var e=Object(p.a)(Er().mark((function e(n,o){var s,p,h;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(k.length>0)){e.next=13;break}return e.prev=1,e.next=4,dt.a.post("/M_Timeline_Get_V3",{nodesIds:k,db:i,type:l||"comment",skip:parseInt(m),limit:u,toId:b,ini:y,newUpdates:w,reqChildrens:_,lastDate:w?r.lastDate?r.lastDate:a:null});case 4:(s=e.sent)&&s.data&&s.data.length>0?(p=Object(d.a)({},c.a.getState().timeline),h=null,s.data.map((function(e){var t=p&&p[o]&&p[o][e.data._id]&&p[o][e.data._id].readedBy?p[o][e.data._id].readedBy:{},n={},o=e.nodeId!==S._id?e.nodeId:e.params.user._id;e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.map((function(e){n=Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},e.type,Object(d.a)(Object(d.a)({},n[e.type]),{},Object(f.a)({},e._id,e))))}));var i={};e&&e.params&&e.params.users&&e.params.users.filter((function(e){return e.name})).length>0&&e.params.users.filter((function(e){return e.name})).map((function(e){i=Object(d.a)(Object(d.a)({},i),{},Object(f.a)({},e._id,e))})),S&&S._id&&t&&!t[S._id]&&p[o]&&Object.keys(p[o]).filter((function(r){p[o][r]&&p[o][r].readedBy&&p[o][r].readedBy[S._id]&&parseInt(p[o][r].created_at)>parseInt(e.data.created_at)&&(t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},S._id,Object(d.a)({},p[o][r].readedBy[S._id]))))})),(r.ini||r.newUpdates)&&parseInt(e.data.created_at)>parseInt(a)&&(a=parseInt(e.data.created_at),h=o),p=Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},o,Object(d.a)(Object(d.a)({},p&&p[o]?p[o]:{}),{},Object(f.a)({},e.data._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},e.data),e.params),"timer"===e.data.type&&"0"===String(e.data.ini)?{manualEntry:!0,ini:parseInt(e.data.created_at),fin:parseInt(e.data.created_at)+parseInt(e.data.fin)}:{}),{},{readedBy:t,_reactions:n},i!=={}?{_toUser:i}:{})))))})),t.noReg||t.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),p)),n({result:!0,total:s.data.length,timelines:p,chatOpenId:h,lastMessageDate:a})):n({result:!0,total:s.data.length}),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(1),console.group("loadTimeline::ERR::"),console.log(e.t0),console.groupEnd();case 13:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,r){return e.apply(this,arguments)}}());case 10:if((C=e.sent)&&(C.chatOpenId||C.lastMessageDate)&&t.reduxFunction("IMMEDIATE","SET_CHAT",Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().chat),(r.ini||r.newUpdates)&&C.lastMessageDate?{lastMessageDate:C.lastMessageDate}:{}),r.ini&&C.chatOpenId?{nodeId:C.chatOpenId}:{})),!C){e.next=14;break}return e.abrupt("return",C);case 14:e.next=17;break;case 16:return e.abrupt("return",{result:!0,total:0});case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ir=function(){var e=c.a.getState(),t=e.db,r=e.session,n=e.timeline,a=0,o=0;return Object.keys(n).map((function(e){Object.keys(n[e]).map((function(i){n[e]&&n[e][i]&&!n[e][i].deleted&&n[e][i].user&&n[e][i].user._id&&n[e][i].user._id!==r._id&&(!n[e][i].readedBy||n[e][i].readedBy&&!n[e][i].readedBy[r._id])&&(e&&t.cards[e]&&"chatGroup"===t.cards[e].type&&(a+=1),e&&t.users[e]&&"user"===t.users[e].type&&(o+=1),1)}))})),{total:a+o+0+0,groups:a,externalGroups:0,users:o,externalUsers:0}},Tr=function(){var e=Object(p.a)(Er().mark((function e(t,r){var n,a;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(p.a)(Er().mark((function e(a,o){return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.emit("data",{module:"chat",method:"put",action:"cancel"},r,(function(e){var n=r.idRel,o=c.a.getState().session;c.a.getState().timeline[o._id]&&c.a.getState().timeline[o._id][r.id]&&(n=o._id),t.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),{},Object(f.a)({},n,Object(d.a)(Object(d.a)({},c.a.getState().timeline[n]),{},Object(f.a)({},r.id,Object(d.a)(Object(d.a)({},c.a.getState().timeline&&c.a.getState().timeline[n]&&c.a.getState().timeline[n][r.id]),{},{deleted:!0},r.deletedReason?{deletedReason:r.deletedReason}:{})))))),a(!0)}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();function Fr(){Fr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(641);var Nr=Object(s.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(zt)((function(e){var t=e.classes,r=e.data,n=c.a.getState(),o=n.db,i=n.timeline,l=o.cards,s=a.a.useState(!1),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!0),b=Object(h.a)(g,2),v=(b[0],b[1]),y=a.a.useState(!0),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState([]),j=Object(h.a)(w,2),E=j[0],k=j[1],L=parseFloat(r.kpi_ini),C=parseFloat(r.kpi_fin);a.a.useEffect((function(){f||(m(!0),F(e.data._id),I())}),[]),a.a.useEffect((function(){F(e.data._id)}),[l]);var I=function(){var t=Object(p.a)(Fr().mark((function t(){return Fr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i||i[r._id]&&(!i[r._id]||0!==Object.keys(i[r._id]).filter((function(e){return"kpi"===i[r._id][e].type})).length)){t.next=7;break}return t.next=3,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/init()"}),{ids:[r._id],db:"cards",reqChildrens:!0,type:"kpi",limit:!0});case 3:t.sent&&O(!1),t.next=8;break;case 7:O(!1);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=[e.data._id],F=function(){var e=Object(p.a)(Fr().mark((function e(t,r){var n;return Fr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object.keys(l).filter((function(e){return l[e].kpi_useParent&&l[e]._parent===t}))).length>0?n.map(function(){var e=Object(p.a)(Fr().mark((function e(t){return Fr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:F(t,!0),T.push(t),k(Array.from(new Set(T)));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||k(T),e.abrupt("return",n);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!r)return null;var N=Object(d.a)({},Wt.model),D=[],A=[],P={};E.map((function(e){P=Object(d.a)(Object(d.a)({},P),i[e]||{})})),P=Object.keys(P).filter((function(e){return"kpi"===P[e].type&&P[e].kpi_type===r.kpi_type})).map((function(e){return P[e]}));var $="time"!==r.kpi_type?parseFloat(L):0,z=parseFloat(L)-parseFloat(C),M=0;z<0&&(z*=-1),P&&Object.keys(P).length>0&&Object.keys(P).sort((function(e,t){return P[e].created_at<P[t].created_at?-1:1})).map((function(e,t){$=parseFloat($)+parseFloat(P[e].value),M+=parseFloat(P[e].value),D.push({meta:P[e].value,total:$,value:parseFloat(L)>parseFloat(C)?100-Math.floor(100*$/z):Math.floor(100*$/z)}),A.push(t+1),t+1===Object.keys(P).length&&(N=Object(d.a)(Object(d.a)({},N),{},{data:{labels:A,series:[[].concat(D)]},options:Object(d.a)(Object(d.a)({},N.options),{},{low:0,high:100,plugins:[Pt.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+Object(S.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+Object(S.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var B=L<C?C-L:L-C,Y=B;P&&Object.keys(P).length>0&&Object.keys(P).map((function(e){B=parseFloat(B)+parseFloat(P[e].value)}));var R=Y-(B-Y),G=Y-(Y-B),H=Math.ceil(L<C?C-L:L-C);if((H=100*Math.ceil(B)/H-100)<0&&(H*=-1),!e.data)return a.a.createElement("div",null,"NO DATA RECEIVED");if(_)return a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(Or,null));return a.a.createElement("div",{className:t.root},a.a.createElement(a.a.Fragment,null,e.chartShow&&"time"!==r.kpi_type&&"task"!==r.kpi_type&&P.length>0&&a.a.createElement("div",{style:{backgroundColor:Object(S.d)("color")}},a.a.createElement(xr.a,{className:"ct-chart-white-colors",data:N.data,type:"Line",options:N.options,listener:N.animation})),"task"!==r.kpi_type&&a.a.createElement("fieldset",{style:{position:"relative"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__progress",1)),a.a.createElement("div",{className:t.progress},a.a.createElement(Or,{variant:"determinate",size:100,value:H,showText:!0,onClick:function(){}})),a.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:Object(S.d)("color")}},function(){var e=L&&parseInt(L)?parseInt(L):0,t=C&&parseInt(C)?parseInt(C):0;r&&"time"===r.kpi_type&&({},parseInt(e)<parseInt(t)&&Object(S.r)("$__maxTime",1),parseInt(e)>parseInt(t)&&Object(S.r)("$__minTime",1)),e>0&&"".concat(Object(S.r)("$__initial",1),": ").concat(Object(S.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)," / ");return["decimal","currency","percentage"].indexOf(r.kpi_type)>-1&&Object(S.r)("$__targetValue",1),a.a.createElement(a.a.Fragment,null,Object(S.r)("".concat(e>t?"$__balance":"$__targetValue"),1),": ",Object(S.h)(e<t?R:G||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null),"time"===r.kpi_type?a.a.createElement("span",{style:{marginLeft:5,fontSize:10,textTransform:"lowercase"}},Object(S.r)("$__minutes")):"")}()),a.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:M>0?Object(S.d)("green"):"red"}},Object(S.r)("$__accomplished",1),": ",M&&parseInt(M)>0?Object(S.h)(M,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null):0),a.a.createElement("div",{style:{position:"absolute",right:"0px",top:"-33px",display:"flex"}},(H>=0&&H<100&&C>L||H>0&&H<=100&&C<L)&&a.a.createElement(jr,{icon:"add_circle",title:Object(S.r)("$__increase"),iconColor:Object(S.d)("blue"),onClick:function(){v(!0)},transparent:!0},a.a.createElement(Bt,{data:r,PositiveValue:!0,callBack:function(){}})),(H>=0&&H<100&&C<L||H>0&&H<=100&&C>L)&&a.a.createElement(jr,{icon:"remove_circle",iconColor:"orange",title:Object(S.r)("$__decrease"),onClick:function(){v(!1)},transparent:!0},a.a.createElement(Bt,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&a.a.createElement("div",{className:t.time},"TASK")))}))),Dr=r(1848),Ar={root:Object(d.a)({},W.l),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:Object(S.d)("color"),display:"flex",alignItems:"center"}},Pr=Object(z.a)(Ar);var $r,zr,Mr=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){console.log(e.data);var t=c.a.getState().db,r=Pr(),n=a.a.useState(!1),o=Object(h.a)(n,2),i=(o[0],o[1],a.a.useState([])),l=Object(h.a)(i,2),s=l[0],u=l[1];a.a.useEffect((function(){var r=[];return e.data&&e.data.length>0&&e.data.map((function(e){r.push(t.cards[e])})),u(r),function(){}}),[e.data]);var d="guidelineD"===e.type||"guidelineR"===e.type?s.filter((function(e){return e&&"strength"===e.type})):s.filter((function(e){return e&&"weakness"===e.type})),p="guidelineD"===e.type||"guidelineE"===e.type?s.filter((function(e){return e&&"threat"===e.type})):s.filter((function(e){return e&&"opportunity"===e.type})),f="guidelineD"===e.type||"guidelineR"===e.type?"strength":"weakness",m="guidelineD"===e.type||"guidelineE"===e.type?"threat":"opportunity",g="guidelineD"===e.type||"guidelineR"===e.type?"forces":"weaknesses",b="guidelineD"===e.type||"guidelineE"===e.type?"threats":"opportunities";return a.a.createElement("div",{className:r.root},a.a.createElement("div",{className:r.aspectsTitle},a.a.createElement(ae.a,{icon:"guidelineD"===e.type||"guidelineR"===e.type?t.dataType.filter((function(e){return"strength"===e.name}))[0].icon:t.dataType.filter((function(e){return"weakness"===e.name}))[0].icon,color:Object(S.d)("color"),title:Object(S.r)(f,1)}),a.a.createElement("span",{style:{marginLeft:"5px"}},Object(S.r)("$__internalAspects",1)," - ",Object(S.r)("$__".concat(g),1))),d&&d.length>0&&d.sort((function(e,t){return e.name-t.name})).map((function(e,t){return a.a.createElement(Dr.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})),a.a.createElement("div",{className:r.aspectsTitle},a.a.createElement(ae.a,{icon:"guidelineD"===e.type||"guidelineE"===e.type?t.dataType.filter((function(e){return"threat"===e.name}))[0].icon:t.dataType.filter((function(e){return"opportunity"===e.name}))[0].icon,color:Object(S.d)("color"),title:Object(S.r)(m,1)}),a.a.createElement("span",{style:{marginLeft:"5px"}},Object(S.r)("$__externalAspects",1)," - ",Object(S.r)("$__".concat(b),1))),p&&p.length>0&&p.sort((function(e,t){return e.name-t.name})).map((function(e,t){return a.a.createElement(Dr.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),Br={containerNoShadow:Object(d.a)(Object(d.a)({},W.l),{},($r={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)($r,"padding","3px"),Object(f.a)($r,"minWidth","150px"),Object(f.a)($r,"display","flow-root"),$r)),container:Object(d.a)(Object(d.a)({},W.l),{},(zr={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(zr,"padding","3px"),Object(f.a)(zr,"minWidth","150px"),Object(f.a)(zr,"display","flow-root"),Object(f.a)(zr,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),zr)),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("color"),fontWeight:"500",alignItems:"center"}},infos:{position:"relative",float:"left",width:"100%",height:"auto",display:"block"},indicators:{position:"relative",float:"left",height:"auto",zIndex:"0 !important"},indicatorsIcon:{position:"relative",float:"left",margin:"0px 0px","& MuiBadge-badge":{position:"relative",float:"left"}},image:{position:"relative",float:"left",width:"100%",marginTop:"7px",maxWidth:"100%",display:"none"},imagePreview:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%"},imagePreviewList:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%",paddingTop:"48%","@media screen and (max-width: 800px)":{width:"100%"}},PreLoader:{top:"calc(50% - 25px)",left:"calc(50% - 25px)",position:"absolute"},description:{position:"relative",float:"left",padding:"5px",minHeight:"75px",width:"100%",overflow:"hidden",textOverflow:"ellipses"},dates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(S.d)("medium"),fontSize:"10px",display:"flex"},lateDates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:"red",fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{minHeight:"20px",minWidth:"40px",zIndex:"0 !important"},users:{position:"absolute",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}},Yr=r(728),Rr=r.n(Yr),Gr=r(108),Hr=r.n(Gr);function Wr(){Wr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ur=Object(s.b)((function(e,t){return{card:e.db.cards[t.data._id]}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Br)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.timeline,l=a.a.useState(null),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!0),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),O=(x[0],x[1],a.a.useState(!1)),w=Object(h.a)(O,2),j=w[0],k=w[1],L=a.a.useState(!1),C=Object(h.a)(L,2),I=C[0],T=C[1],F=e.data&&e.data._id?c.a.getState().db.cards[e.data._id]:{},N=(Object(S.j)(),window.location.hash.split("/"));N[0]=N[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&(F._parent&&(!N[0]||N[0]&&36!==N[0].length)?D():T(!1)),function(){e=!1}}),[]);var D=function(){var t=Object(p.a)(Wr().mark((function t(){var r;return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(!F._loadTimeline||F._loadTimeline&&!F._loadTimeline.kpi)&&F.kpi_type&&"task"!==F.kpiType&&"timer"!==F.kpiType&&"time"!==F.kpiType&&Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[F._id],db:"cards",type:"kpi"}),r=function(){var t=Object(p.a)(Wr().mark((function t(a){return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.cards[a]){t.next=8;break}return T(!0),t.next=4,Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:t.sent&&T(!1),t.next=9;break;case 8:n.cards[a]&&n.cards[a]._parent?r(n.cards[a]._parent)&&T(!1):T(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(p.a)(Wr().mark((function e(){return Wr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(F._parent);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),e.onExpand&&e.onExpand();case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(I)return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.r)("$__loadingData")),a.a.createElement(Or,null));if(!F||!e.data||!e.data._id)return null;var A=function(){var t=Object(p.a)(Wr().mark((function t(){var r,n=arguments;return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.length>0&&void 0!==n[0]?n[0]:"cardEdit",e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},e.store.sideModule),{},{db:e.db,id:F._id,module:"cardEdit",activeModule:r,data:F}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),P=!1,$=a.a.createElement(a.a.Fragment,null);if(F&&F.url&&(F.url.indexOf(".youtube.com/watch?")>-1||F.url.indexOf("youtu.be")>-1)){var z=F.url.indexOf(".youtube.com/watch?")>-1?F.url.split("?")[1].split("v=")[1].split("&")[0]:F.url.split(".be/")[1];z&&($=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(z),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),P=!0)}if(F&&F.url&&F.url.indexOf("https://vimeo.com")>-1){var M=F.url.replace("https://","").split("/")[1];M&&($=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://player.vimeo.com/video/".concat(M),title:"Vimeo video player",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0}),P=!0)}return a.a.createElement("div",null,a.a.createElement("div",null,a.a.createElement("div",Object.assign({},e.provided&&e.provided.dragHandleProps,{style:{display:"none"}})),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.infos,onClick:function(t){e.onClick&&e.onClick()}},P||F.image&&(F.image||e.Avatar||F.image||e.Avatar)&&!o.cards.hide.image?a.a.createElement("div",{className:t.imagePreview,style:u?{backgroundImage:'url("'.concat(u||Le.a,'")')}:{background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},P?$:F.image&&!u?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===F.type||"link"===F.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===F.type||"link"===F.type?a.a.createElement(ae.a,{icon:Hr.a,size:"39px",color:"rgba(250,250,250,0.77)"}):a.a.createElement("img",{src:Rr.a,style:{width:"25%"}}),a.a.createElement("div",{style:{clear:"both"}})),!b&&a.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},a.a.createElement(xe,null),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),!P&&(!u||e.Avatar||F.image!==u)&&a.a.createElement(a.a.Fragment,null,a.a.createElement("img",{className:t.image,src:"".concat(F.image?F.image:Le.a),onError:function(e){F.image?f(null):v(!0)},onLoad:function(t){f("".concat(e.Avatar&&!F.image?Le.a:F.image))},width:"100%"})),a.a.createElement("div",{style:{clear:"both"}})):e.Avatar&&!o.cards.hide.image&&a.a.createElement("div",{className:n.viewList?t.imagePreviewList:t.imagePreview,style:{background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},"insight"===F.type||"link"===F.type?a.a.createElement(ae.a,{icon:Hr.a,size:"39px",color:"rgba(250,250,250,0.77)"}):a.a.createElement("img",{src:Rr.a,style:{width:"25%"}}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),"swot"!==n.dataType.filter((function(e){return e.name===F.type}))[0].module&&(F._parent&&F._parent!==F._id||F._planId&&F._planId!==F._id)&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},"SQUASH"===F.name&&console.log(F),n.cards[F._parent]?a.a.createElement(vr,{id:F._parent&&c.a.getState().db.cards[F._parent]?F._parent:F._planId&&c.a.getState().db.cards[F._planId]?F._planId:null,loading:I,showLegend:!e.Resume}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:!n.viewList||e.ignoreList?{}:{position:"relative",float:"left",width:"100%"}},F.type.indexOf("guideline")>-1&&(F._aspects&&F._aspects.length>0||F._aspects&&F._aspects.length>0)?a.a.createElement(Mr,{data:F._aspects,type:F.type}):a.a.createElement(a.a.Fragment,null),!e.searchText&&F.description&&a.a.createElement(Ge.a,{title:F.description||""},e.Resume?a.a.createElement("div",{className:t.description,style:{height:90}},F.description?"".concat(F.description.substr(0,150),"..."):""):a.a.createElement("div",{className:t.description,style:{wordBreak:"break-word",height:90},dangerouslySetInnerHTML:{__html:F.description?Object(S.o)(F.description):""}})),F.kpi_type&&!o.cards.hide.kpi&&a.a.createElement(Nr,{data:F,chartShow:!o.cards.hide.kpiChart}),a.a.createElement(ct.a,{max:100,className:t.indicators},(F._timelineCount&&F._timelineCount>0||i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"comment"===i[F._id][e].type})).length>0)&&a.a.createElement(Oe.a,{overlap:"rectangular",className:t.indicatorsIcon,icon:"timeline",title:"$__timeline",size:"16px",onClick:function(){return!e.onlyOption&&A("timeline")},disabled:!0,count:i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"comment"===i[F._id][e].type})).length>0?Object.keys(i[F._id]).filter((function(e){return"comment"===i[F._id][e].type})).length:F._timelineCount}),(F._logCount&&F._logCount>0||i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"log"===i[F._id][e].type})).length>0)&&a.a.createElement(Oe.a,{overlap:"rectangular",className:t.indicatorsIcon,icon:"history",title:"$__log",size:"16px",onClick:function(){return!e.onlyOption&&A("log")},disabled:!0}),(F._kpiCount&&F._kpiCount>0||i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"kpi"===i[F._id][e].type})).length>0)&&a.a.createElement(Oe.a,{overlap:"rectangular",className:t.indicatorsIcon,icon:"analytics",title:"$__kpi",size:"16px",onClick:function(){return!e.onlyOption&&A("kpi")},disabled:!0,count:i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"kpi"===i[F._id][e].type})).length>0?Object.keys(i[F._id]).filter((function(e){return"kpi"===i[F._id][e].type})).length:F._kpiCount}),(F._timerCount&&F._timerCount>0||i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"timer"===i[F._id][e].type})).length>0)&&a.a.createElement(Oe.a,{overlap:"rectangular",className:t.indicatorsIcon,icon:"timer",title:"$__timeSheet",size:"16px",onClick:function(){return!e.onlyOption&&A("timeLog")},disabled:!0,count:i[F._id]&&Object.keys(i[F._id]).filter((function(e){return"timer"===i[F._id][e].type})).length>0?Object.keys(i[F._id]).filter((function(e){return"timer"===i[F._id][e].type})).length:F._timerCount}),F&&F._id&&c.a.getState().db.cards&&Object.keys(c.a.getState().db.cards).length>0&&Object.keys(c.a.getState().db.cards).filter((function(e){return F&&F._id&&c.a.getState().db.cards[e]&&c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._parent===F._id})).length>0&&a.a.createElement(Oe.a,{overlap:"rectangular",className:t.indicatorsIcon,icon:"checklist",title:"$__list",size:"16px",onClick:function(){return!e.onlyOption&&k(!j)},disabled:!0,count:c.a.getState().db.cards&&Object.keys(c.a.getState().db.cards).length>0&&Object.keys(c.a.getState().db.cards).filter((function(e){return F&&F._id&&c.a.getState().db.cards[e]&&c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._parent===F._id})).length})),("link"===F.type||"insight"===F.type)&&a.a.createElement("div",{className:t.dates},a.a.createElement("div",{className:t.dateInfo},a.a.createElement(Oe.a,{overlap:"rectangular",className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),_()(1e3*F.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"))),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))),(j||"plan"!==F.type&&Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._parent===F._id})).length>0&&0===Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&"step"===c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e]._parent===F._id})).length)&&a.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},a.a.createElement("div",{style:{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",fontSize:"16px",borderTopLeftRadius:7,borderTopRightRadius:7}},Object(S.r)("$__list",1)),a.a.createElement(br,{nodeId:F._id,db:"cards",noDelete:!0,showProgress:!0}),a.a.createElement("div",{style:{clear:"both"}})),(j||Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&"step"===c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e]._parent===F._id})).length>0)&&a.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},a.a.createElement(E.a,{title:Object(S.r)("$__openTaskList"),text:Object(S.r)("$__openTaskList"),color:"lightgrey",textColor:"lightgrey",icon:"open_in_new",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:F._id}))},size:"25px"}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))}))),Vr=r(1012),qr=r.n(Vr),Xr=r(1013),Kr=r.n(Xr),Jr=r(547),Zr=r(376),Qr=r(548),en=r.n(Qr),tn=Object(z.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function rn(e){var t=tn();return a.a.createElement(Ge.a,{title:e.title?e.title:""},a.a.createElement(ze.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle,style:e.style||{}},a.a.createElement(ae.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:Object(S.d)("menu"),icon:e.icon?e.icon:"circle"})))}var nn=r(1824),an={control:{backgroundColor:"#fff",fontSize:14,fontFamily:"Roboto",fontWeight:"normal",lineHeight:"17px"},"&multiLine":{control:{fontFamily:"Roboto"},highlighter:{padding:9,border:"1px solid transparent",boxSizing:"border-box",overflow:"hidden",maxHeight:150},input:{padding:9,border:"1px solid silver",overflow:"auto",maxHeight:150,borderColor:"transparent"}},"&singleLine":{display:"inline-block",width:180,lineHeight:"17px",highlighter:{lineHeight:"17px",padding:1,border:"2px inset transparent"},input:Object(f.a)({border:"none",lineHeight:"17px",padding:1},"border","2px inset")},suggestions:{position:"absolute",list:{backgroundColor:"white",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"7px 7px",boxShadow:"0 0 3px 5px rgba(0,0,0,0.05)",fontSize:14,zIndex:200,maxHeight:"151px !important",overflow:"auto !important"},item:{padding:"5px 15px",borderBottom:"1px solid rgba(0,0,0,0.15)","&focused":{backgroundColor:Object(S.d)("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},on=function(e){var t,r,n;return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},rootRelative:{position:"relative",top:"0px",left:"0px",right:"0px",bottom:"0px"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%",display:"flex",position:"absolute",bottom:"0px",left:"0px",right:"0px",height:"auto"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:"0px",padding:"0 0 20px",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:(t={},Object(f.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(f.a)(t,"color",W.O),Object(f.a)(t,"width","30px"),Object(f.a)(t,"height","30px"),Object(f.a)(t,"lineHeight","25px"),Object(f.a)(t,"fontSize","12px"),Object(f.a)(t,"textAlign","center"),Object(f.a)(t,"position","absolute"),Object(f.a)(t,"bottom","23px"),Object(f.a)(t,"left","50%"),Object(f.a)(t,"marginLeft","-24px"),Object(f.a)(t,"zIndex","1"),Object(f.a)(t,"borderTopRightRadius","50%"),Object(f.a)(t,"borderTopLeftRadius","50%"),Object(f.a)(t,"borderBottomRightRadius","50%"),Object(f.a)(t,"borderBottomLeftRadius","50%"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.b)+", 0.4)"},info:{backgroundColor:W.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.u[0])+", 0.4)"},success:{backgroundColor:W.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.G[0])+", 0.4)"},danger:{backgroundColor:W.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.j[0])+", 0.4)"},warning:{backgroundColor:W.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.N[0])+", 0.4)"},primary:{backgroundColor:W.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(f.a)(r,e.breakpoints.down("sm"),{float:"right !important",width:"calc(100% - 60px) !important","&:before":{borderLeftWidth:"0 !important",borderRightWidth:"15px !important",left:"-20px !important",right:"auto !important"},"&:after":{borderLeftWidth:"0 !important",borderRightWidth:"14px !important",left:"-19px !important",right:"auto !important"}}),Object(f.a)(r,"width","45%"),Object(f.a)(r,"float","left"),Object(f.a)(r,"padding","7px"),Object(f.a)(r,"marginBottom","5px"),Object(f.a)(r,"position","relative"),Object(f.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)"),Object(f.a)(r,"borderRadius","6px"),Object(f.a)(r,"color","rgba("+Object(W.r)(W.b)+", 0.87)"),Object(f.a)(r,"background",W.O),Object(f.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+W.q[10],borderRight:"0 solid "+W.q[10],borderBottom:"15px solid transparent",content:'" "'}),Object(f.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+W.O,borderRight:"0 solid "+W.O,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(f.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:W.O,"&:before":{borderLeftWidth:"0",borderRightWidth:"15px",left:"-15px",right:"auto"},"&:after":{borderLeftWidth:"0",borderRightWidth:"14px",left:"-14px",right:"auto"}}),timelineHeading:{marginBottom:"0px"},timelineBody:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(f.a)({position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",zIndex:"5",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)"},"zIndex",11),editor:{position:"absolute",bottom:"0px",height:"auto",width:"calc(100% - 0px)",zIndex:10},editorRelative:{position:"relative",bottom:"0px",minHeight:"50px",height:"auto",width:"calc(100% - 0px)",zIndex:10},files:{display:"inline-table",position:"absolute",width:"100%",bottom:0},textEditor:{zIndex:100},textEditorIcon:{cursor:"pointer",color:Object(S.d)("color")},progressBar:{backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"20px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"absolute",width:"100%",top:"-90px",maxHeight:"120px",background:"linear-gradient(60deg, rgba(250,250,250,1), rgba(250,250,250,0.9))",padding:"7px",display:"flex",overflow:"auto",alignItems:"center","& img":{maxWidth:"20%",height:"auto",position:"relative",float:"left",marginTop:"0px",marginRight:"7px"},"& .data":{position:"relative",float:"left",width:"75%","& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},mentionInput:Object(d.a)(Object(d.a)({},W.l),{},{"& textarea":Object(d.a)(Object(d.a)({},W.l),{},{padding:"7px",borderRadius:"7px",fontSize:"16px",width:"calc(100% - 14px)",minHeight:"38px",border:"solid 1px rgba(0,0,0,0.1)"}),"& .sugestions":{top:"none !important",bottom:"40px",border:"solid 10px red"},"& textarea::placeholder":{color:"rgba(0,0,0,0.2)"}}),mentionWrapper:{width:"100%",background:"transparent",fontSize:"0.9rem",color:" #a9b5c4","&&.mentionWrapper__control":{borderRadius:"25px",border:"1px solid #3a546f",minHeight:"45px","&& .mentionWrapper__highlighter":{padding:"0.7rem 1rem"},"&& .mentionWrapper__input":(n={padding:"0.7rem 1rem",outline:0,border:0,resize:"none"},Object(f.a)(n,"outline","none"),Object(f.a)(n,"fontSize","0.9rem"),Object(f.a)(n,"color","#7288a3"),Object(f.a)(n,"borderColor"," #3a546f"),Object(f.a)(n,"overflow","hidden"),Object(f.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}},cn=r(1823),ln=["children","className"],sn=Object(z.a)({grid:{margin:"0",width:"100%"}});function un(e){var t=sn(),r=e.children,n=e.className,o=Object(G.a)(e,ln);return a.a.createElement(cn.a,Object.assign({container:!0},o,{className:t.grid+" "+n}),r)}var dn=["children","className"],pn=Object(z.a)({grid:{padding:"0 15px !important"}});function fn(e){var t=pn(),r=e.children,n=e.className,o=Object(G.a)(e,dn);return a.a.createElement(cn.a,Object.assign({item:!0},o,{className:t.grid+" "+n}),r)}function hn(){hn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var mn=Object(z.a)(on),gn=Object(s.b)((function(e,t){return{draft:e.chats&&e.chats.drafts?e.chats.drafts[t.nodeId]:{}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(t.functions.socket,a.a.useState("")),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState([]),j=Object(h.a)(w,2),k=j[0],L=j[1],C=a.a.useState([]),I=Object(h.a)(C,2),T=I[0],F=I[1],N=a.a.useState({}),D=Object(h.a)(N,2),A=D[0],P=D[1],$=a.a.useState(null),z=Object(h.a)($,2),M=z[0],B=z[1],Y=a.a.useState(null),R=Object(h.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(!1),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState([]),K=Object(h.a)(X,2),J=K[0],Z=K[1],Q=a.a.useState(!1),ee=Object(h.a)(Q,2),te=ee[0],re=ee[1],ne=a.a.useState(58),oe=Object(h.a)(ne,2),ie=oe[0],ce=oe[1],le=mn(),se=a.a.createRef(),ue=a.a.createRef(),de=Object(S.j)(),pe=0;n._id&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]&&(pe=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]);var fe=window.location.hash.split("/");fe[0]=fe[0].replace("#",""),a.a.useEffect((function(){var t,r=!0;return r&&(e.draft&&e.draft.message?s(e.draft.message):s("")),(null===e||void 0===e||null===(t=e.draft)||void 0===t?void 0:t.files)?L(e.draft.files):L([]),function(){r=!1,s("")}}),[e.nodeId]);var he=a.a.createRef();a.a.useEffect((function(){var t,r=document.getElementById("sendingInput_".concat(e.nodeId));(null===(t=e.draft)||void 0===t?void 0:t.reply)&&r&&r.focus()}),[e.draft]);var me=function(){var e,t=[];if(e=l){var r=e.split("@[");r.length>0&&r.map((function(e){if(e){var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},ge=function(){var t=Object(p.a)(hn().mark((function t(){var a,o,i,u,h,m,g,v;return hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={_id:Object($t.a)(),idRel:e.nodeId,replyData:e.draft&&e.draft.reply&&c.a.getState().timeline[e.nodeId][e.draft.reply]?c.a.getState().timeline[e.nodeId][e.draft.reply]:{},reply:e.draft&&e.draft.reply?e.draft.reply:null,message:l,type:"comment",mentions:me(),notifyUsers:o,filesCount:k.length>0?k.length:0,_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null,db:e.db?e.db:"cards"},G&&(a=Object(d.a)(Object(d.a)({},a),{},{urlPreview:JSON.stringify(G)}),H(null)),s(""),c.a.getState().functions.socket,re(!1),k.length>0&&b(!0),o=[],i=me(),r.cards[e.nodeId]&&"chatGroup"!==r.cards[e.nodeId].type&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).length>0&&Object.keys(r.cards[e.nodeId]._users).filter((function(e){return e!==n._id&&-1===i.indexOf(e)})).map((function(e){o.push(e)})),e.onSending&&e.onSending(Object(d.a)(Object(d.a)({},a),{},{user:{_id:n._id,name:r.users[n._id].name,image:r.users[n._id].image||null}})),(u=Object(d.a)(Object(d.a)({},a),{},{created_at:"".concat(_()().unix("x")),user:{_id:n._id,name:r.users[n._id].name,image:r.users[n._id].image||null}})).mentions&&delete u.mentions,u.notifyUsers&&delete u.notifyUsers,u.db&&delete u.db,Lr({reduxFunction:e.reduxFunction},Object(d.a)(Object(d.a)({},a),{},{comment:u})),e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,{message:null,reply:null,files:null}))})),t.next=18,ut.a.post("timeline/add",a);case 18:return(h=t.sent)&&h.data&&(m=h.data)._id&&(g=Object(d.a)(Object(d.a)({},m.comment),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null}),v=2,pe<2&&(v=pe),i.map(function(){var t=Object(p.a)(hn().mark((function t(n){return hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.cards[e.nodeId]&&(!r.cards[e.nodeId]._users||r.cards[e.nodeId]._users&&!r.cards[e.nodeId]._users[n])&&Et(e,n,v,e.nodeId,!0);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),k.length>0?ye({comment:g,dataMessage:a}):(e.onSending&&e.onSending(),F([]),L([]),Z([]),H(null),q(!1),b(!1),e.onSending&&e.onSending())),t.abrupt("return",!1);case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),be=function(){var e=Object(p.a)(hn().mark((function e(t,r){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),P(Object(d.a)(Object(d.a)({},A),{},Object(f.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ve=function(){var e=Object(p.a)(hn().mark((function e(t,r){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B({options:t,fi:r}),P({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ye=function(){var t=Object(p.a)(hn().mark((function t(r){var n,a,o,i,l,s=arguments;return hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:0,a=s.length>2&&void 0!==s[2]?s[2]:[],c.a.getState().functions.socket,o=r.comment,i=r.dataMessage,(l=Array.from(k)).map(function(){var t=Object(p.a)(hn().mark((function t(c,s){var u,d;return hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s!==n){t.next=5;break}return t.next=3,Object(pt.a)(o._id,c,!0,{onUploadProgress:function(e){return be(e,s)},onUploadError:function(e){ve(r,s)}});case 3:(u=t.sent)&&((d=Array.from(a)).push(u),F(d),l.length>n+1?ye(r,n+1,d):l.length===n+1&&(i.files=d,setTimeout((function(){ut.a.post("timeline/add",i)}),1e3),F([]),L([]),H(null),q(!1),b(!1),e.onSending&&e.onSending()));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),xe=function(){var t=Object(p.a)(hn().mark((function t(r){var n;return hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L([].concat(Object(Ne.a)(k),Object(Ne.a)(Object.keys(r).map((function(e){return r[e]}))))),e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},(null===(n=c.a.getState().chats.drafts)||void 0===n?void 0:n[e.nodeId])||{}),{},{files:[].concat(Object(Ne.a)(k),Object(Ne.a)(Object.keys(r).map((function(e){return r[e]}))))})))})),O(!1);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),_e=function(){var e=Object(p.a)(hn().mark((function e(t){var r,n,a,o,i,l;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.a.getState().functions.socket,s(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=30;break}return r="",n=[],t.indexOf(" ")>-1?n=t.split(" "):t.indexOf("\n")>-1?n=t.split("\n"):n.push(t),a=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),e.next=9,n.map((function(e){var t=e.replace(":","");(t.indexOf("http://")>-1||t.indexOf("https://")>-1)&&a.test(t)&&(r=e)}));case 9:if(!(!G&&r&&-1===J.indexOf(r)||r&&G&&-1===J.indexOf(r)&&G.link!==r)){e.next=30;break}if(q(!0),-1!==t.indexOf("youtube.com/watch?")){e.next=29;break}return console.log("Verificando URL",r),e.prev=13,e.next=16,dt.a.post("/URL_DATA",{url:r});case 16:(o=e.sent)&&o.data&&(i=o.data)&&i.title&&i.img&&i.contentSnippet?H(i):(q(!1),H(null)),e.next=29;break;case 20:e.prev=20,e.t0=e.catch(13),q(!1),H(null),(l=J).push(r),Z(l),Object(S.c)({message:Object(S.r)("$__couldNotLoadDataFromURL",1),variant:"warning",persist:!1,horizontal:"center"}),console.log(e.t0);case 29:t.indexOf("youtube.com/watch?")>-1&&q(!1);case 30:t.indexOf("youtube.com/watch?")>-1&&q(!1);case 31:case"end":return e.stop()}}),e,null,[[13,20]])})));return function(t){return e.apply(this,arguments)}}(),Oe=[];r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).map((function(t){if(t&&null!==t&&void 0!==t&&t!==n._id&&r.cards[e.nodeId]._users[t].name&&(!r.users[t]||r.users[t]&&!r.users[t].deleted)){var a=r.cards[e.nodeId]._users[t]._id,o=r.cards[e.nodeId]._users[t].name?r.cards[e.nodeId]._users[t].name:r.cards[e.nodeId]._users[t].name.split(" ").length>0?r.cards[e.nodeId]._users[t].name.split(" ")[0]:r.cards[e.nodeId]._users[t].name;a&&0===Object.keys(Oe).filter((function(e){return Oe[e].id===a})).length&&Oe.push({id:a,display:o})}})),r.cards[e.nodeId]&&!r.cards[e.nodeId].private&&(de&&(de.owner||de.planAdmin||de.planModerate)||pe&&pe.access&&parseInt(pe.access)>3)&&Object.keys(r.users).filter((function(t){return!(r.users[t].deleted||"user"!==r.users[t].type||!(r.cards[e.nodeId]&&r.cards[e.nodeId].client&&(!r.users[t]._parent||r.users[t]._parent===r.cards[e.nodeId].client)||r.cards[e.nodeId]&&!r.cards[e.nodeId].client&&r.cards[e.nodeId]._planId&&r.cards[r.cards[e.nodeId]._planId]&&r.cards[r.cards[e.nodeId]._planId].client&&(!r.users[t]._parent||r.users[t]._parent===r.cards[r.cards[e.nodeId]._planId].client)||r.cards[e.nodeId]&&!r.cards[e.nodeId].client&&!r.users[t]._parent))})).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(Oe).filter((function(e){if(Oe[e].id===t)return!0})).length&&Oe.push({id:t,display:e.nodeId&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[t]&&r.cards[e.nodeId]._users[t].name?r.cards[e.nodeId]._users[t].name:r.users[t].displayName?r.users[t].displayName:r.users[t].name})})),r.cards[e.nodeId]&&r.cards[e.nodeId]._parent&&r.cards[r.cards[e.nodeId]._parent]&&r.cards[r.cards[e.nodeId]._parent]._users&&Object.keys(r.cards[r.cards[e.nodeId]._parent]._users).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(Oe).filter((function(e){if(Oe[e].id===t)return!0})).length&&Oe.push({id:t,display:r.cards[r.cards[e.nodeId]._parent]._users[t].name,image:r.cards[r.cards[e.nodeId]._parent]._users[t].image||null})})),r.cards[e.nodeId]&&r.cards[e.nodeId]._planId&&r.cards[r.cards[e.nodeId]._planId]&&r.cards[r.cards[e.nodeId]._planId]._users&&Object.keys(r.cards[r.cards[e.nodeId]._planId]._users).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(Oe).filter((function(e){if(Oe[e].id===t)return!0})).length&&Oe.push({id:t,display:r.cards[r.cards[e.nodeId]._planId]._users[t].name,image:r.cards[r.cards[e.nodeId]._planId]._users[t].image||null})}));return document.getElementById("sendingInput_".concat(e.nodeId))&&document.getElementById("sendingInput_".concat(e.nodeId)).offsetHeight&&document.getElementById("sendingInput_".concat(e.nodeId)).offsetHeight,a.a.createElement(Jr.FileDrop,{ref:se,className:e.relative?le.rootRelative:le.root,onDragOver:function(){!e.disabledSend&&O(!0)},onDrop:xe,accept:".png, .jpg, .jpeg, .bpm, .svg, .gif, .pdf, .mp4, .3gp, .ts, .mkv, .avi, .mov, .mts, m2ts, .mxf, .aac, aiff, .caf, .ogg, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .txt, .zip, .rar"},a.a.createElement(a.a.Fragment,null,e.nodeId&&!e.disabledSend?a.a.createElement("div",{className:e.relative?le.editorRelative:le.editor,style:Object(d.a)(Object(d.a)({},e.editorStyle?e.editorStyle:{}),{},{backgroundColor:"#F0F0F0"})},a.a.createElement("div",{className:le.textEditor},V&&!G&&a.a.createElement("div",{className:le.urlPreview,style:{width:"100%",height:"150px"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},a.a.createElement(nn.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},a.a.createElement(nn.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10})))),e.draft&&e.draft.reply||k&&k.length>0?a.a.createElement("div",{style:{position:"absolute",right:0,left:0,height:"auto",padding:7,bottom:ie+4,backgroundColor:"#f0f0f0",display:"flex",justifyContent:"space-between"}},e.draft&&e.draft.reply?a.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),display:"flex",alignItems:"center"}},a.a.createElement(ae.a,{icon:"reply",color:Object(S.d)("menu"),size:"22px"}),a.a.createElement("span",{style:{marginLeft:10}},Object(S.r)("$__reply")))),a.a.createElement("div",{style:{display:"flex",margin:"auto",padding:15,alignItems:"center",width:"77%",backgroundColor:"rgba(250,250,250,0.33)",borderRadius:5,borderLeft:"5px solid ".concat(Object(S.d)("menu"))}},a.a.createElement(ia,{storie:c.a.getState().timeline[e.nodeId][e.draft.reply],hideCards:!0,db:e.db,nodeId:e.nodeId,showUserName:!0,noReactions:!0}),a.a.createElement("div",{style:{position:"absolute",top:0,right:0}},a.a.createElement(E.a,{title:Object(S.r)("$__cancelReply"),color:"red",icon:"cancel",size:"17px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts[e.nodeId]||{}),{},{reply:null})))}))},transparent:!0})))):a.a.createElement(a.a.Fragment,null),k&&k.length>0?a.a.createElement("div",{style:{position:"relative",maxHeight:"100%",width:"100%"}},a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(S.r)("$__clearFiles",1),text:Object(S.r)("$__clearFiles"),color:"gray",icon:"clear_all",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmClearFiles",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t;L([]),e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},(null===(t=c.a.getState().chats.drafts)||void 0===t?void 0:t[e.nodeId])||{}),{},{files:null})))}))}})},size:"25px"})),a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,overflow:"auto",display:"flex"}},k.map((function(e,t){var n=e.name.split("."),o="attachment";return r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(o=r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(e)),a.a.createElement("div",{key:t,title:e.name,style:{position:"relative",padding:7,width:"100px",justifyContent:"center"}},a.a.createElement("div",{style:{position:"relative",width:"50px",height:"50px",margin:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?a.a.createElement(ae.a,{icon:o,size:"50px"}):a.a.createElement("img",{src:o,style:{width:"100%",height:"100%"}})),a.a.createElement("div",{style:{position:"relative",margin:"auto",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"calc(100% - 30px)",overflow:"hidden"}},e.name),a.a.createElement("div",{style:{position:"absolute",top:0,right:3,display:"flex"}},T&&T.length>0&&T[t]?a.a.createElement(ae.a,{icon:"cloud_done",color:"green"}):g?a.a.createElement(a.a.Fragment,null):a.a.createElement(ae.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(k);t.splice(e,1),L(t)}(t)}})),M&&M.fi===t?a.a.createElement(E.a,{title:Object(S.r)("$__uploadFiles",1),text:Object(S.r)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){ye({comment:M.options.comment},M.fi,T),B(null)},size:"25px"}):A&&String(A[t])&&A[t]<100?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{minWidth:177}},a.a.createElement(_r.a,{variant:"buffer",className:le.progressBar,value:A[t]<90?A[t]:90,valueBuffer:A[t]})),a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:10,marginLeft:15}},A[t]<90?A[t]:90,"%"))):a.a.createElement(a.a.Fragment,null))})))):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),G&&a.a.createElement(un,{style:{marginBottom:15,backgroundColor:"#f0f0f0",padding:7}},a.a.createElement("div",{style:{position:"absolute",right:"20px"}},a.a.createElement(E.a,{title:Object(S.r)("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){H(null),q(!1)}})),G.img&&a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(G.img?G.img:Le.a),alt:G.title||G.link})),a.a.createElement(fn,{xs:12,sm:6,md:8,lg:9,xl:10},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("menu"),fontWeight:"bold"}},G.title),G.site&&a.a.createElement("div",{style:{fontSize:"12px"}},G.site),G.contentSnippet&&a.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},G.contentSnippet),a.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:G.link,target:"_blank"},Object(S.r)("$__openLink","*")))),M?a.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},a.a.createElement(E.a,{title:Object(S.r)("$__fileSendErrorClickToReSend",1),text:Object(S.r)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){ye({comment:M.options.comment},M.fi,T),B(null)},size:"25px"})):g?a.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},Object(S.r)("$__sending",1),a.a.createElement(_r.a,{className:le.progressBar})):a.a.createElement("div",{ref:ue,style:{position:"relative",height:"auto",borderRadius:"7px",display:"flex",alignItems:"center",padding:"3px 0px 4px 0px"}},a.a.createElement(Zr.b,{id:"sendingInput_".concat(e.nodeId),value:l.trim().length>0?l:"",inputRef:he,onChange:function(e){_e(e.target.value),ue.current&&ue.current.clientHeight&&ce(ue.current.clientHeight)},onBlur:function(t){t.target.value&&e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts[e.nodeId]||{}),{},{message:t.target.value})))}))},onPaste:function(e){xe(e.clipboardData.files)},placeholder:Object(S.r)("$__writeMessage"),style:Object(d.a)(Object(d.a)({},an),{},{position:"relative",width:"calc(100% - 130px)",margin:"7px",maxHeight:"150px",paddingRight:"7px",background:"none",border:"none",overflow:"auto !important"}),onKeyDown:function(e){13==e.keyCode&&(e.shiftKey?e.stopPropagation():l.length>0&&l.trim()&&l.trim().length>0?ge():s(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},a.a.createElement(Zr.a,{trigger:"@",data:Oe,renderSuggestion:function(t,n,o){var i=r.users[t.id]?r.users[t.id]:t;if(t&&t.id)return a.a.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},a.a.createElement(Se.a,{style:{position:"relative",width:"25px",height:"25px",marginRight:"7px"},src:t.image?t.image:r.cards&&e.nodeId&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[t.id]&&r.cards[e.nodeId]._users[t.id].image?r.cards[e.nodeId]._users[t.id].image:r.users[t.id]&&r.users[t.id].image?r.users[t.id].image:null}),a.a.createElement("div",null,a.a.createElement("div",null,o),i&&i._parent&&c.a.getState().db.users[i._parent]&&c.a.getState().db.users[i._parent].name?a.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},c.a.getState().db.users[i._parent].name):a.a.createElement(a.a.Fragment,null)),i&&i._parent&&c.a.getState().db.users[i._parent]&&c.a.getState().db.users[i._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(c.a.getState().db.users[i._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null))},style:{backgroundColor:Object(S.d)("color",.5),lineHeight:"17px",borderRadius:"7px",padding:"3px 2px",marginLeft:"-4px",fontWeight:"bold",maxHeight:250,overflow:"auto"}})),a.a.createElement("div",{style:{cursor:"pointer",zIndex:100,display:"flex",alignItems:"center"}},a.a.createElement(rn,{title:Object(S.r)("$__emojis",1),icon:te?"highlight_off":"sentiment_very_satisfied",color:Object(S.d)("medium"),onClick:function(){re(!te)}}),!g&&a.a.createElement("div",{className:le.actionButton},a.a.createElement("input",{className:"input-text-timeline",style:{position:"absolute",marginRight:"3em",height:"24px",fontSize:"0",left:"0px",width:"24px",cursor:"pointer",border:"none",opacity:"0"},onChange:function(e){return xe(e.target.files)},multiple:!0,type:"file",accept:".png, .jpg, .jpeg, .bpm, .svg, .gif, .pdf, .mp4, .3gp, .ts, .mkv, .avi, .mov, .mts, m2ts, .mxf, .aac, aiff, .caf, .ogg, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx"}),a.a.createElement(ae.a,{icon:"attachment",color:Object(S.d)("medium"),size:"22px"})),!g&&(l.trim().length>0||k.length>0)&&a.a.createElement(rn,{title:Object(S.r)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(S.d)("menu"),onClick:function(){return ge()}}),e.closeOption&&a.a.createElement(ae.a,{title:Object(S.r)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(S.d)("color"),onClick:function(){return e.onClose()}}),te&&a.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},a.a.createElement(en.a,{onEmojiClick:function(e,t){s("".concat(l," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):a.a.createElement("div",{className:e.relative?le.editorRelative:le.editor,style:{backgroundColor:"#f0f0f0"}},Object(S.r)("$__avaiableForViewingOnly")),a.a.createElement("div",{className:x?le.onDropFile:le.dropFile,onDragLeave:function(){!e.disabledSend&&O(!1)}},Object(S.r)("$__dropTheFileToAttach","*"))))})),bn=Object(z.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:Object(S.d)("medium")},box:{width:"70vw",height:"80vh",backgroundColor:"#FFFFFF",boxShadow:"0 0 6px rgba(0,0,0,0.3)",padding:"30px",overflowY:"auto"},title:{fontSize:"20px",fontWeight:"bold",marginBottom:"7px"},iconList:{},list:{position:"relative",width:"100%",float:"left",marginBottom:"30px"},icon:{position:"relative",float:"left",width:"50px",height:"50px"}}}));function vn(e){var t=bn(),r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useState(e.icon?e.icon:"add_photo_alternate"),l=Object(h.a)(c,2),s=l[0],u=l[1];return a.a.useEffect((function(){u(e.icon)}),[e.icon]),a.a.createElement("div",{style:Object(d.a)({},e.style?e.style:{})},o?a.a.createElement(j.a,{className:t.backdrop,open:o,onClick:function(){return i(!1)}},a.a.createElement("div",{className:t.box},yn&&Object.keys(yn).map((function(r,n){return a.a.createElement("div",{key:n,className:t.list},a.a.createElement("div",{className:t.title},r),a.a.createElement("div",{className:t.iconList},yn[r]&&yn[r].map((function(r,n){return a.a.createElement("div",{key:n,className:t.icon},a.a.createElement(ae.a,{icon:r,size:"30px",color:e.color?e.color:Object(S.d)("color"),onClick:function(){u(r),i(!1),e.callBack&&e.callBack(r),e.onChange&&e.onChange(r)}}))}))))})))):a.a.createElement(ae.a,{icon:s,color:e.color?e.color:Object(S.d)("color"),size:e.size||"30px",onClick:function(){e.onChange&&i(!0)}}))}var yn={Action:["3d_rotation","accessibility","accessibility_new","accessible","accessible_forward","account_balance","account_balance_wallet","account_box","account_circle","add_shopping_cart","addchart","admin_panel_settings","alarm","alarm_add","alarm_off","alarm_on","all_inbox","all_out","analytics","anchor","android","announcement","api","app_blocking","arrow_circle_down","arrow_circle_up","arrow_right_alt","article","aspect_ratio","assessment","view_comfy","view_comfy_ind","view_comfy_late","view_comfy_return","view_comfy_returned","view_comfy_turned_in","autorenew","backup","backup_table","batch_prediction","book","bookmark","bookmark_border","bookmarks","bug_report","build","build_circle","cached","calendar_today","calendar_view_day","camera_enhance","cancel_schedule_send","card_giftcard","card_membership","card_travel","change_history","check_circle","check_circle_outline","chrome_reader_mode","class","close_fullscreen","code","comment_bank","commute","compare_arrows","contact_support","contactless","copyright","credit_card","dashboard","date_range","delete","delete_forever","delete_outline","description","dns","done","done_all","done_outline","donut_large","donut_small","drag_indicator","dynamic_form","eco","eject","euro_symbol","event","event_seat","exit_to_app","explore","explore_off","extension","face","fact_check","favorite","favorite_border","feedback","filter_alt","find_in_page","find_replace","fingerprint","flaky","flight_land","flight_takeoff","flip_to_back","flip_to_front","g_translate","gavel","get_app","gif","grade","grading","group_work","help","help_center","help_outline","highlight_alt","highlight_off","history","history_toggle_off","home","horizontal_split","hourglass_disabled","hourglass_empty","hourglass_full","http","https","important_devices","info","input","integration_instructions","invert_colors","label","label_important","label_off","language","launch","leaderboard","line_style","line_weight","list","lock","lock_open","login","loyalty","markunread_mailbox","maximize","mediation","minimize","model_training","next_plan","not_accessible","not_started","note_add","offline_bolt","offline_pin","online_prediction","opacity","open_in_browser","open_in_full","open_in_new","open_with","outlet","pageview","pan_tool","payment","pending","pending_actions","perm_camera_mic","perm_contact_calendar","perm_data_setting","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","pets","picture_in_picture","picture_in_picture_alt","plagiarism","play_for_work","polymer","power_settings_new","pregnant_woman","preview","print","privacy_tip","query_builder","question_answer","quickreply","receipt","record_voice_over","redeem","remove_shopping_cart","reorder","report_problem","restore","restore_from_trash","restore_page","room","rounded_corner","rowing","rule","schedule","search","search_off","settings","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_voice","shop","shop_two","shopping_bag","shopping_basket","shopping_cart","smart_button","source","speaker_notes","speaker_notes_off","spellcheck","star_rate","stars","sticky_note_2","store","subject","subtitles_off","supervised_user_circle","supervisor_account","support","swap_horiz","swap_horizontal_circle","swap_vert","swap_vertical_circle","sync_alt","system_update_alt","tab","tab_unselected","table_view","text_rotate_up","text_rotate_vertical","text_rotation_angledown","text_rotation_angleup","text_rotation_down","text_rotation_none","theaters","thumb_down","thumb_up","thumbs_up_down","timeline","toc","today","toll","touch_app","tour","track_changes","translate","trending_down","trending_flat","trending_up","turned_in","turned_in_not","update","upgrade","verified","verified_user","vertical_split","view_agenda","view_array","view_carousel","view_column","view_day","view_headline","view_list","view_module","view_quilt","view_sidebar","view_stream","view_week","visibility","visibility_off","voice_over_off","watch_later","wifi_protected_setup","work","work_off","work_outline","wysiwyg","youtube_searched_for","zoom_in","zoom_out"],Alert:["add_alert","auto_delete","error","error_outline","notification_important","warning"],Av:["4k","5g","add_to_queue","airplay","album","art_track","av_timer","branding_watermark","call_to_action","closed_caption","closed_caption_disabled","control_camera","equalizer","explicit","fast_forward","fast_rewind","featured_play_list","featured_video","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","forward_10","forward_30","forward_5","games","hd","hearing","hearing_disabled","high_quality","library_add","library_add_check","library_books","library_music","loop","mic","mic_none","mic_off","missed_video_call","movie","music_video","new_releases","not_interested","note","pause","pause_circle_filled","pause_circle_outline","play_arrow","play_circle_filled","play_circle_outline","playlist_add","playlist_add_check","playlist_play","queue","queue_music","queue_play_next","radio","recent_actors","remove_from_queue","repeat","repeat_one","replay","replay_10","replay_30","replay_5","shuffle","skip_next","skip_previous","slow_motion_video","snooze","sort_by_alpha","speed","stop","stop_circle","subscriptions","subtitles","surround_sound","video_call","video_label","video_library","video_settings","videocam","videocam_off","volume_down","volume_mute","volume_off","volume_up","web","web_asset"],Communication:["add_ic_call","alternate_email","business","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","cancel_presentation","chat","chat_bubble","chat_bubble_outline","clear_all","comment","contact_mail","contact_phone","contacts","desktop_access_disabled","dialer_sip","dialpad","domain_disabled","domain_verification","duo","email","forum","forward_to_inbox","hourglass_bottom","hourglass_top","import_contacts","import_export","invert_colors_off","list_alt","live_help","location_off","location_on","mail_outline","mark_chat_read","mark_chat_unread","mark_email_read","mark_email_unread","message","mobile_screen_share","more_time","nat","no_sim","pause_presentation","person_add_disabled","person_search","phone","phone_disabled","phone_enabled","phonelink_erase","phonelink_lock","phonelink_ring","phonelink_setup","portable_wifi_off","present_to_all","print_disabled","qr_code","qr_code_scanner","read_more","ring_volume","rss_feed","screen_share","sentiment_satisfied_alt","speaker_phone","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","stop_screen_share","swap_calls","textsms","unsubscribe","voicemail","vpn_key","wifi_calling"],Content:["add","add_box","add_circle","add_circle_outline","amp_stories","archive","backspace","ballot","biotech","block","calculate","clear","contant_copy","content_cut","content_paste","create","delete_sweep","drafts","dynamic_feed","file_copy","filter_list","flag","font_download","foward","gesture","how_to_reg","how_to_vote","inbox","insights","link","link_off","low_priority","mail","markunread","move_to_inbox","next_week","outlined_flag","policy","push_pin","redo","remove","remove_circle","remove_circle_outline","reply","reply_all","report","report_off","save","save_alt","select_all","send","sort","square_foot","text_format","unarchive","undo","waves","weekend","where_to_vote"],Device:["access_alarm","access_time","ad_units","add_alarm","add_to_home_screen","airplanemode_active","airplanemode_inactive","battery_alert","battery_charging_full","battery_full","battery_std","battery_unknown","bluetooth","bluetooth_connected","bluetooth_disabled","bluetooth_searching","brightness_auto","brightness_high","brightness_low","brightness_medium","data_usage","developer_mode","devices","dvr","gps_fixed","gps_not_fixed","gps_off","graphic_eq","location_disabled","location_searching","mobile_friendly","mobile_off","nfc","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","sd_storage","settings_system_daydream","signal_cellular_4_bar","signal_cellular_alt","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_null","signal_cellular_off","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_off","storage","usb","wallpaper","widgets","wifi_lock","wifi_tethering"],Editor:["add_comment","attach_file","attach_money","bar_chart","border_all","border_bottom","border_clear","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","bubble_chart","drag_handle","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_reset","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_numbered","format_list_numbered_rtl","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underlined","functions","height","highlight","horizontal_rule","insert_chart","insert_chart_outlined","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_photo","linear_scale","merge_type","mode_comment","monetization_on","money_off","multiline_chart","notes","pie_chart","post_add","publish","scatter_plot","score","short_text","show_chart","space_bar","strikethrough_s","subscript","superscript","table_chart","table_rows","text_fields","title","vertical_align_bottom","vertical_align_center","vertical_align_top","wrap_text"],File:["attach_email","attachment","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_quere","cloud_upload","create_new_folder","folder","folder_open","folder_shared","request_quote","rule_folder","snippet_folder","text_snippet","topic"],Hardware:["browser_not_supported","cast","cast_connected","cast_for_education","computer","desktop_mac","desktop_windows","developer_board","device_hub","device_unknown","devices_other","dock","gamepad","headset","headset_mic","keyboard","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_hide","keyboard_return","keyboard_tab","keyboard_voice","laptop","laptop_chromebook","laptop_mac","laptop_windows","memory","mouse","phone_android","phone_iphone","phonelink","phonelink_off","point_of_sale","power_input","router","scanner","security","sim_card","smartphone","speaker","speaker_group","tablet","tablet_android","tablet_mac","toys","tv","videogame_asset","watch"],Home:["sensor_door","sensor_window"],Image:["add_a_photo","add_photo_alternate","add_to_photos","adjust","assistant","assistant_photo","audiotrack","bedtime","blur_circular","blur_linear","blur_off","blur_on","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","broken_image","brush","burst_mode","camera","camera_alt","camera_front","camera_rear","camera_roll","center_focus_strong","center_focus_weak","collections","collections_bookmark","color_lens","colorize","compare","control_point","control_point_duplicate","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","dehaze","details","edit","euro","exposure","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_none","filter_tilt_shift","filter_vintage","flare","flash_auto","flash_off","flash_on","flip","flip_camera_android","flip_camera_ios","gradient","grain","grid_off","grid_on","hdr_off","hdr_on","hdr_strong","hdr_weak","healing","image","image_aspect_ratio","image_not_supported","image_search","iso","landscape","leak_add","leak_remove","lens","linked_camera","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loupe","monochrome_photos","motion_photos_on","motion_photos_paused","movie_creation","movie_filter","music_note","music_off","nature","nature_people","navigate_before","navigate_next","palette","panorama","panorama_fish_eye","panorama_horizontal","panorama_vertical","panorama_wide_angle","photo","photo_album","photo_camera","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","picture_as_pdf","portrait","receipt_long","remove_red_eye","rotate_90_degrees_ccw","rotate_left","rotate_right","shutter_speed","slideshow","straighten","style","switch_camera","switch_video","tag_faces","texture","timelapse","timer","timer_10","timer_3","timer_off","tonality","transform","tune","view_comfy","view_compact","vignette","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_sunny"],Maps:["360","add_business","add_location","add_location_alt","add_road","agriculture","alt_route","atm","beenhere","bike_scooter","category","cleaning_services","compass_calibration","departure_board","design_services","directions","directions_bike","directions_boat","directions_bus","directions_car","directions_railway","directions_run","directions_subway","directions_transit","directions_walk","edit_attributes","edit_location","edit_road","electric_bike","electric_car","electric_moped","electric_scooter","electrical_services","ev_station","fastfood","flight","handyman","home_repair_service","hotel","hvac","layers","layers_clear","local_activity","local_airport","local_atm","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_fire_department","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_police","local_post_office","local_printshop","local_see","local_shipping","local_taxi","map","maps_ugc","medical_services","menu_book","miscellaneous_services","money","moped","multiple_stop","museum","my_location","navigation","near_me","near_me_disabled","no_meals","no_transfer","not_listed_location","pedal_bike","person_pin","person_pin_circle","pest_control","pest_control_rodent","pin_drop","place","plumbing","rate_review","restaurant","restaurant_menu","run_circle","satellite","set_meal","store_mall_directory","streetview","subway","terrain","traffic","train","tram","transfer_within_a_station","transit_enterexit","trip_origin","two_wheeler","wine_bar","wrong_location","zoom_out_map"],Navigation:["app_settings_alt","apps","arrow_back","arrow_back_ios","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_forward_ios","arrow_left","arrow_right","arrow_upward","campaign","cancel","check","chevron_left","chevron_right","close","double_arrow","east","expand_less","expand_more","first_page","fullscreen","fullscreen_exit","home_work","last_page","legend_toggle","menu","menu_open","more_horiz","more_vert","north","north_east","north_west","payments","refresh","south","south_east","south_west","subdirectory_arrow_left","subdirectory_arrow_right","switch_left","switch_right","unfold_less","unfold_more","west"],Notification:["account_tree","adb","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","bluetooth_audio","confirmation_number","directions_off","disc_full","drive_eta","enhanced_encryption","event_available","event_busy","event_note","folder_special","live_tv","mms","more","network_check","network_locked","no_encryption","ondemand_video","personal_video","phone_bluetooth_speaker","phone_callback","phone_forwarded","phone_in_talk","phone_locked","phone_missed","phone_paused","power","power_off","priority_high","sd_card","sms","sms_failed","support_agent","sync","sync_disabled","sync_problem","system_update","tap_and_play","time_to_leave","tv_off","vibration","voice_chat","vpn_lock","wc","wifi","wifi_off"],Places:["ac_unit","airport_shuttle","all_inclusive","apartment","baby_changing_station","backpack","bathtub","beach_access","bento","business_center","carpenter","casino","charging_station","checkroom","child_care","child_friendly","corporate_fare","countertops","do_not_step","do_not_touch","dry","elevator","escalator","escalator_warning","family_restroom","fence","fire_extinguisher","fitness_center","food_bank","foundation","free_breakfast","golf_course","grass","hot_tub","house","house_siding","kitchen","meeting_room","microwave","night_shelter","no_cell","no_drinks","no_flash","no_food","no_meeting_room","no_photography","no_stroller","pool","rice_bowl","roofing","room_preferences","room_service","rv_hookup","smoke_free","smoking_rooms","soap","spa","sports_bar","stairs","storefront","stroller","tapas","tty","umbrella","wash","water_damage","wheelchair_pickup"],Social:["6_ft_apart","architecture","book_online","cake","clean_hands","connect_without_contact","construction","coronavirus","deck","domain","elderly","emoji_emotions","emoji_events","emoji_flags","emoji_food_beverage","emoji_nature","emoji_objects","emoji_people","emoji_symbols","emoji_transportation","engineering","fireplace","follow_the_signs","group","group_add","history_edu","king_bed","leave_bags_at_home","location_city","masks","military_tech","mood","mood_bad","nights_stay","notifications","notifications_active","notifications_none","notifications_off","notifications_paused","outdoor_grill","pages","party_mode","people","people_alt","people_outline","person","person_add","person_add_alt_1","person_outline","person_remove","plus_one","poll","psychology","public","public_off","reduce_capacity","sanitizer","school","science","self_improvement","sentiment_dissatisfied","sentiment_satisfied","sentiment_very_dissatisfied","sentiment_very_satisfied","share","sick","single_bed","sports","sports_baseball","sports_basketball","sports_cricket","sports_esports","sports_football","sports_golf","sports_handball","sports_hockey","sports_kabaddi","sports_mma","sports_motorsports","sports_rugby","sports_soccer","sports_tennis","sports_volleyball","thumb_down_alt","thumb_up_alt","whatshot"],Toggle:["check_box","check_box_outline_blank","indeterminate_check_box","radio_button_checked","radio_button_unchecked","star","star_border","star_half","star_outline","toggle_off","toggle_on"]},xn={header:Object(d.a)(Object(d.a)({},W.l),{},{display:"flex",width:"100%",justifyContent:"space-between"}),content:{position:"relative",width:"100%",height:"100%",display:"flex"},info:{display:"flex",width:"100%",alignItems:"center"},headerIcon:{display:"contents",alignItems:"center"},headerTitle:{width:"calc(100% - 33px)",overflowX:"hidden",overflowY:"hidden",fontWeight:"bold",paddingTop:"3px"},actionButtons:{right:0,display:"flex"},cancelButton:{right:"4px",position:"absolute",cursor:"pointer"},saveButton:{right:"33px",position:"absolute",cursor:"pointer"},button:{padding:"3px auto",cursor:"pointer",alignItems:"center",display:"flex",opacity:1},parent:{width:"100%",padding:"0 5px","& .title":{color:Object(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("color"),fontWeight:"500",alignItems:"center"}}};function _n(){_n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var On=Object(z.a)(xn);var wn=Object(s.b)((function(e){return{users:e.db.users,groups:e.db.groups}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.session,n=t.functions.socket,o=On(),i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(!1),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(e.title?e.title.trim():""),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(e.icon||null),w=Object(h.a)(O,2),j=w[0],k=w[1],L=a.a.useState(e.icon||null),C=Object(h.a)(L,2),I=(C[0],C[1],a.a.useState(!1)),T=Object(h.a)(I,2),F=T[0],N=T[1],D=a.a.useState(!1),A=Object(h.a)(D,2),P=A[0],$=A[1],z=e.customButtons&&e.customButtons.filter((function(e){return!1!==e}));a.a.useEffect((function(){s||(!e.title&&e.editable&&N(!0),u(!0))}));var M=function(){var t=Object(p.a)(_n().mark((function t(){return _n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&n.emit("data",{module:"node",method:"put",action:"update",noLog:!0},{_id:e._id,name:x}),e.onEdit&&e.onEdit(Object(d.a)({name:x},j?{icon:j}:{}),e._id?e._id:null)}catch(r){console.log(r)}N(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:o.header,style:Object(d.a)({minHeight:"30px",display:"flex",alignItems:"center"},e.style),onMouseEnter:function(){return b(!0)},onMouseLeave:function(){P||b(!1)}},a.a.createElement("div",{className:o.content},a.a.createElement("div",{className:o.info},e.searchText?a.a.createElement("div",{style:{marginLeft:"7px"}},Object(S.b)(e.title?e.title:"",e.searchText)):a.a.createElement("div",{className:o.headerTitle,style:{fontSize:e.fontSize?e.fontSize:"16px",color:e.color?e.color:Object(S.d)("colorText"),paddingRight:"7px",marginLeft:e.icon?"7px":"none",width:"100%"},onDoubleClick:function(){e.onEdit&&e.editable&&(_(e.title?e.title.trim():""),N(!0))}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center"}},e.icon||e.permitIcon||e.iconOnEditable&&F?a.a.createElement(vn,{icon:e.icon||"perm_media",color:e.color?e.color:Object(S.d)("colorText"),onChange:e.onChangeIcon||e.editable&&e.permitIcon?function(t){e.onChangeIcon&&e.onChangeIcon(t),e.onEdit&&e.onEdit(Object(d.a)({name:x},t?{icon:t}:{})),k(t)}:null,size:"calc(".concat(e.fontSize," + 4px)")||!1,style:{marginRight:7}}):a.a.createElement(a.a.Fragment,null),F?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:e.placeholder?e.placeholder:Object(S.r)("$__nameOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){_(e.target.value)},onKeyDown:function(t){13===t.keyCode&&x&&M(),27===t.keyCode&&(N(!1),_(e.title?e.title.trim():""))}},value:x,placeholder:e.placeholder?e.placeholder:Object(S.r)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),(F||e.onSave)&&a.a.createElement(E.a,{title:Object(S.r)("$__save",1),color:"green",icon:"save",onClick:function(){F?e.noCancel?x&&M():M():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),(F||e.onCancel)&&a.a.createElement(E.a,{title:Object(S.r)("$__close",1),color:Object(S.d)("colorText"),icon:"cancel",onClick:function(){F&&(e.onCancel?x&&N(!1):N(!1)),e.onCancel&&e.onCancel()},size:e.actionsSize||"25px",transparent:!0})):a.a.createElement(Ge.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},a.a.createElement("div",{style:Object(d.a)({},e.expanded?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})},"".concat(e.showOrder?"".concat(e.showOrder,". "):"").concat(e.title&&e.title.indexOf("$__")>-1?Object(S.r)(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):"")))))),e.periodFilter&&r&&r.period&&a.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap",marginRight:7}},Object(S.r)(r.period),a.a.createElement(Qe,{style:{color:Object(S.d)("menu"),height:"20px",width:"20px"}})),a.a.createElement("div",{className:o.actionButtons,style:Object(d.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},e.actionsButtons&&e.onSave&&a.a.createElement(E.a,{title:Object(S.r)("$__save",1),color:"green",icon:"save",onClick:function(){F?e.noCancel?x&&M():M():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),e.actionsButtons&&e.onCancel&&a.a.createElement(E.a,{title:Object(S.r)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){F?e.noCancel?x&&N(!1):N(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!F&&e.timelineMessage&&g&&a.a.createElement("div",{className:o.button,style:{opacity:g?"1":"0"}},a.a.createElement(Oe.a,{overlap:"rectangular",onClick:function(){return $(!0)},icon:"add_comment",size:"20px",tooltipprops:P?{open:P,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,PopperProps:{disablePortal:!0},interactive:!0}:{},title:P?a.a.createElement("div",{style:{position:"relative",minWidth:"220px"}},a.a.createElement(gn,{nodeId:e._id,onSending:function(){b(!1),$(!1)},onClose:function(){$(!1),b(!1)},relative:!0,closeOption:!0})):"$__addComment"})),!F&&z&&z.map((function(e,t){return e&&e.component?e.component:e&&!1!==e&&null!==e&&(g||"hover"!==e.show)&&a.a.createElement("div",Object.assign({key:t,className:o.button},e.provided),a.a.createElement(E.a,{title:e.title?Object(S.r)(e.title,1):Object(S.r)(e.name,1),color:Object(S.d)(e.color||"colorText"),icon:e.icon,onClick:function(t){e.onClick&&e.onClick(t)},onMouseLeave:function(){P||b(!1)},onClose:e.onClose?function(){e.onClose&&e.onClose(),b(!1)}:null,size:e.actionsSize||"16px",transparent:!0,badgeContent:e.count?e.count:null}))})),e.children)))})),jn=(r(1260),function(){return{root:{},viewer:{alignItems:"center",justifyContent:"center",display:"flex"},image:{width:"100%",backgroundRepeat:"no-repeat",backgroundSize:"cover"},avatarImage:{marginTop:"7px",width:"170px",height:"170px",borderRadius:"50%",boxShadow:"0px 0px 7px 7px rgba(0,0,0,0.2)"},addImage:{width:"100%",padding:"15px","&:hover":{}},cropper:{overflow:"hidden","& .cropper-container":{width:"100% !important",overflow:"hidden !important"}},circleCropper:{overflow:"hidden","& .cropper-container":{width:"100% !important",overflow:"hidden !important"},"& .cropper-view-box":{borderRadius:"50%"}}}});function En(){En=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Sn=a.a.createRef(null);var kn=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(jn)((function(e){var t=a.a.useState(null),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(h.a)(i,2),l=c[0],s=c[1],u=a.a.useState(null),d=Object(h.a)(u,2),f=d[0],m=d[1],g=a.a.useState([]),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useRef(null),_=e.classes;a.a.useEffect((function(){O()}),[]),a.a.useEffect((function(){O()}),[e.files,e.img]);var O=function(){var t=v;e.files&&(Object.keys(e.files).map((function(r){0===t.filter((function(e){return e._id===r})).length&&t.push(e.files[r])})),y(t))},w=function(){var t=Object(p.a)(En().mark((function t(r){var n,a,i,c,l,u;return En().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Sn.current.getCroppedCanvas().toDataURL(),o(n),m(null),s(!1),a=x.current.files[0].name,i=x.current.files[0].type,t.next=8,j(n,a,i);case 8:return c=t.sent,{maxSizeMB:.5,maxWidthOrHeight:e.maxWidthOrHeight?e.maxWidthOrHeight:600,useWebWorker:!0},t.prev=10,l=new Promise((function(t){return Kr.a.imageFileResizer(c,e.maxWidthOrHeight?e.maxWidthOrHeight:600,e.maxWidthOrHeight?e.maxWidthOrHeight:600,c.type.replace("image/",""),50,0,(function(e){t(j(e,a,i))}))})),t.next=14,l.then((function(e){return e}));case 14:(u=t.sent)&&e.onChange&&e.onChange(n,u),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(10),console.log(t.t0);case 21:case"end":return t.stop()}}),t,null,[[10,18]])})));return function(e){return t.apply(this,arguments)}}(),j=function(e,t,r){return fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:r})}))};return a.a.createElement("div",{className:_.root},a.a.createElement("div",{className:_.viewer,style:{}},!n&&!e.img&&e.avatar&&e.avatarIcon&&a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},a.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(ae.a,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!n&&!e.img?e.avatar&&(n||e.img)?a.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(S.d)("AvatarBackground"),backgroundImage:'url("'.concat(n||e.img,'")'),backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",display:"flex",alignItems:"center",justifyContent:"center"}}):a.a.createElement(a.a.Fragment,null):a.a.createElement("img",{className:e.avatar?_.avatarImage:_.image,src:"".concat(n||e.img),style:{cursor:"pointer"},onError:function(t){return t.target.src=n||e.img},width:"100%",alt:"",onClick:function(){!function(){if(v&&v.length>0){var t=v.filter((function(t){return e.img&&e.img.indexOf(t.file)>-1}));t.length>0&&e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:t,file:t[0]._id})}}()}})),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.onChange?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{padding:"7px"},onClick:function(){x.current.click()}},a.a.createElement(Ee,{text:Object(S.r)(n||e.img?"$__changeImage":"$__addImage",1),icon:n||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),a.a.createElement("input",{type:"file",onChange:function(e){!function(e){s(!0);var t=new FileReader;if(null!=e.files[0]){var r=e.files[0];t.onloadend=function(){m(t.result),s(!0)},t.readAsDataURL(r)}else s(!1)}(e.target)},ref:x,id:"file-picker",name:"image",accept:e.accept||".jpg,.jpeg,.png,.gif",style:{display:"none"}})):a.a.createElement(a.a.Fragment,null),e.onDelete&&(n||e.img)?a.a.createElement("div",{style:{padding:"7px"},onClick:function(){e.onDelete()}},a.a.createElement(Ee,{text:Object(S.r)("$__removeImage",1),icon:"hide_image",textColor:"color",iconColor:"color"})):a.a.createElement(a.a.Fragment,null)),a.a.createElement(Yt.a,{fullWidth:!0,onClose:function(){return s(!1)},"aria-labelledby":"simple-dialog-title",open:l},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px",display:"flex"}},a.a.createElement(wn,{title:Object(S.r)("$__cropImage",1),icon:"crop",onSave:function(){w()},onCancel:function(){s(!1)},actionsButtons:!0,actionButtonsStyle:{top:0,height:45,display:"flex",alignItems:"center"}})),a.a.createElement(qr.a,{className:e.avatar?_.circleCropper:_.cropper,ref:Sn,src:f||null,style:{height:"50vh",width:"100%",margin:"auto",padding:"0px"},aspectRatio:e.ignoreAspect?null:e.aspectRatio?e.aspectRatio:e.avatar?1:16/9,guides:!e.noGuides,viewMode:String(e.viewMode)?e.viewMode:2,checkOrientation:e.checkOrientation||!1})))})));function Ln(){Ln=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Cn,In=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Br)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=(t.session,t.timeline,t.functions,a.a.useState({})),o=Object(h.a)(n,2),l=o[0],s=o[1];a.a.useEffect((function(){s(Object(d.a)(Object(d.a)(Object(d.a)({},e.toTemplate&&r.cards[e.cardId].name?{name:"".concat(Object(S.r)("$__template")," - ").concat(r.cards[e.cardId].name)}:{}),e.toTemplate&&r.cards[e.cardId].description?{description:r.cards[e.cardId].description}:{}),e.toTemplate&&r.cards[e.cardId].image?{image:r.cards[e.cardId].image}:{}))}),[]);var u=a.a.useState({}),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(0),v=Object(h.a)(b,2),y=v[0],x=v[1],_=c.a.getState().db.cards[e.cardId]&&c.a.getState().db.cards[e.cardId].type?r.dataType.filter((function(t){return t.name===c.a.getState().db.cards[e.cardId].type}))[0]:{},O=function(){var t=Object(p.a)(Ln().mark((function t(){var n,a;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!l||l.name){t.next=4;break}g(Object(d.a)(Object(d.a)({},m),{},{name:!0})),t.next=15;break;case 4:return x(1),t.prev=5,n=Object(d.a)(Object(d.a)(Object(d.a)({},r.cards[e.cardId]),l),{},{templateId:r.cards[e.cardId]._id,created_at:null,isTemplate:!!e.toTemplate||null,order:null,updated_at:null,_id:null,_planId:null}),t.next=9,Object(st.G)(e,!0,n);case 9:(a=t.sent)&&a._id&&(x(2),setTimeout((function(){w(a._id)}),1500)),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(5);case 15:case"end":return t.stop()}}),t,null,[[5,13]])})));return function(){return t.apply(this,arguments)}}(),w=function(){var t=Object(p.a)(Ln().mark((function t(r){return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(st.j)(e,e.cardId,r);case 3:t.sent&&(x(3),setTimeout((function(){j(r)}),1500)),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=Object(p.a)(Ln().mark((function t(r){var n,a;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.b)(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,Object(Ke.b)(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(x(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?i.a.push("sp#tab/templates"):i.a.push("sp#".concat(r,"/dashboard"))}),500));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return y>0?a.a.createElement(Ye.a,{style:{padding:"7px"}},a.a.createElement(at,{title:"".concat(l.name?l.name:r.cards[e.cardId].name," "),icon:_&&_.icon?_.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:Object(S.d)("medium"),fontSize:"16px"}),1===y&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",clear:"both"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.r)("$__installingTemplate")),a.a.createElement(Or,null)),2===y&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.r)("$__templateInstalled")),a.a.createElement(ae.a,{icon:"done_all",color:"green"})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.r)("$__copyingData")),a.a.createElement(Or,null))),3===y&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.r)("$__templateInstalled")),a.a.createElement(ae.a,{icon:"done_all",color:"green"})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",marginTop:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.r)("$__copiedData")),a.a.createElement(ae.a,{icon:"done_all",color:"green"})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.r)("$__preparingToRedirect")),a.a.createElement(Or,null))),4===y&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{position:"relative",float:"left",padding:"15px",display:"flex",justifyContent:"center",borderRadius:"50%",border:"solid 1px green"}},a.a.createElement(ae.a,{icon:"done_all",color:"green",size:"50px"}))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(Ye.a,{style:{padding:"7px"}},a.a.createElement(at,{title:"".concat(Object(S.r)("$__template",1),": ").concat(r.cards[e.cardId].name),icon:_&&_.icon?_.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:Object(S.d)("medium"),fontSize:"16px"}),a.a.createElement("div",null,a.a.createElement(kn,{img:e.toTemplate&&r.cards[e.cardId].image?r.cards[e.cardId].image:null,onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{image:e,file:t}))},placeholder:""}),a.a.createElement(tt,{error:m&&m.name,helperText:Object(S.r)("$__youMustDefineAName"),label:"".concat(Object(S.r)("$__customName",1)),variant:Object(S.d)("fieldVariant"),name:"name",defaultValue:e.toTemplate&&r.cards[e.cardId].name?"".concat(Object(S.r)("$__template")," - ").concat(r.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{name:e.target.value})),m&&m.name&&g(Object(d.a)(Object(d.a)({},m),{},{name:!1}))}},placeholder:Object(S.r)(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),a.a.createElement(tt,{label:"".concat(Object(S.r)("$__customDescription",1)),variant:Object(S.d)("fieldVariant"),name:"description",defaultValue:e.toTemplate&&r.cards[e.cardId].description?r.cards[e.cardId].description:null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{icon:"toc"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{description:e.target.value}))}},placeholder:Object(S.r)(e.toTemplate?"$__templateDescription_placeholder":"$__planDescription_placeholder",1),multiline:!0})),a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"#4caf50",marginTop:"7px",cursor:"pointer"},onClick:function(e){O(),e.stopPropagation()}},a.a.createElement(Ee,{text:Object(S.r)("$__ready","*"),icon:"done_all",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"lightgrey",cursor:"pointer"},onClick:function(t){e.onComplete(),t.stopPropagation()}},a.a.createElement(Ee,{text:Object(S.r)("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})));function Tn(){Tn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Fn=Object(z.a)(Br),Nn=w.default.div(Cn||(Cn=Object(u.a)(["\n minWidth:200px;\n background-color:#fff;\n marginBottom:7px;\n\n ","\n ","\n ","\n ","\n ","\n ","\n width:calc(100%) !important;\n\n ","\n ","\n "])),(function(e){return e.separator?"marging-top:30px;":""}),(function(e){return e.selectable&&e.selected?"\n opacity:1;":e.selectable?"\n opacity:0.5;":""}),(function(e){return e.locked?"cursor:no-drop !important;":"cursor:pointer;"}),(function(e){return e.selected?"border-bottom:solid 5px ".concat(Object(S.d)("color")," !important;"):""}),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88;\n max-width:320px;\n border:solid 10px red;":""}),(function(e){return e.inLine?"position:relative;\n float:left;\n margin:3.5px;\n width:calc(20% - 7px);\n // maxWidth:320px;\n ":"\n width:calc(100%) !important;\n margin:7px 0px 12px 0px;\n "}),(function(e){return e.priority?"border-left:5px solid ".concat(e.priority," !important;"):""}),(function(e){return e.isCombining?"border:solid 3px ".concat(Object(S.d)("menu")," !important;"):""})),Dn=Object(s.b)((function(e){return{cardsExpanded:e.db.cardsExpanded,showPrivate:e.controls.lockPrivate,cards:e.db.cards,unlockedPrivates:e.controls.unlockedPrivates,controls:e.controls}}),(function(e){return Object(I.b)(C,e)}))((function e(t){var r,o,l,s,u,m,g=Fn(),b=c.a.getState(),v=b.db,y=b.session,x=t.data,O=a.a.useState(!1),w=Object(h.a)(O,2),j=w[0],k=w[1],L=a.a.useState(t.cardsExpanded),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(!1),N=Object(h.a)(F,2),D=N[0],A=N[1],P=a.a.useState(!1),$=Object(h.a)(P,2),z=$[0],M=$[1],B=a.a.useState(!1),Y=Object(h.a)(B,2),R=Y[0],G=Y[1],H=a.a.useState(t.cardColorPicker?Object(st.r)(x):{}),W=Object(h.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(h.a)(q,2),K=X[0],J=X[1],Z=Object(n.useRef)({});Object(n.useEffect)((function(){if(Z.current&&t.onResize){var e=Z.current.clientHeight;t.separator&&(e+=55),t.onResize(e,j),Z.current.addEventListener("DOMNodeInserted",(function(){var e=Z.current.clientHeight;t.separator&&(e+=55),t.onResize(e,j)}))}}),[Z,j,t.manualExpanded,K]),Object(n.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&J(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&K&&J(!1)}),[null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor]),a.a.useEffect((function(){var e=!0;return e&&"0"===String(t.unlockedPrivates)&&R&&G(!1),function(){e=!1}}),[t.unlockedPrivates]),a.a.useEffect((function(){var e=!0;return e&&T(t.cardsExpanded),function(){e=!1}}),[t.cardsExpanded]),a.a.useEffect((function(){t.onExpand&&t.onExpand(I)}),[I]);var Q=window.location.hash.split("/");if(Q[0]=Q[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&t.cardColorPicker&&Q&&"overview"===Q[1]&&(V(Object(st.r)(x)),e=!1),function(){e=!1}}),[t.cards]),x==={}||!x)return a.a.createElement(a.a.Fragment,null);var ee=Object(S.j)(),te=Object(st.t)(x._id);if(!x||!t.data||!t.data._id)return null;var re=function(){var e=Object(p.a)(Tn().mark((function e(){var r,n,a;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(v.cards).filter((function(e){return v.cards[e]&&!v.cards[e].deleted&&(v.cards[e]._planId===Q[0]||v.cards[e]._parent===Q[0])})).map((function(e){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,v.cards[e]))})),n=Object(d.a)({},c.a.getState().db.cards),a=!x._selected,"swot"!==v.dataType.filter((function(e){return e.name===x.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==x._id&&r[e].type&&r[e].type===x.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),x.type.indexOf("guideline")>-1&&Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),x.type.indexOf("objective")>-1&&Object.keys(r).filter((function(e){return"goal"===r[e].type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)(Object(d.a)({},n),r),{},Object(f.a)({},x._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[x._id]),r[x._id]),{},{_selected:a})))})),"swot"===c.a.getState().db.dataType.filter((function(e){return e.name===x.type}))[0].module&&Object(st.H)(t),a&&"matrix"===c.a.getState().db.dataType.filter((function(e){return e.name===x.type}))[0].module&&Object(st.I)(t,x._id);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=Object(p.a)(Tn().mark((function e(){var r,n=arguments;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.length>0&&void 0!==n[0]?n[0]:"cardEdit",t.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:t.db,id:x._id,module:"cardEdit",activeModule:c.a.getState().db.dataType.filter((function(e){return e.name===x.type}))[0].iniModule||r,data:x}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=Object(p.a)(Tn().mark((function e(){var r;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x._hasStep&&lr(Object(d.a)(Object(d.a)({},t),{},{nodeId:x._id})),x._hasStep){e.next=6;break}return e.next=4,dt.a.post("/Card_Count",{id:x._id});case 4:r=e.sent,parseInt(r.data)>0?Object(S.c)({message:Object(S.r)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.r)("$__concludeAll"),text:Object(S.r)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){Object(st.P)(Object(d.a)(Object(d.a)({},t),{},{data:{_id:x._id}}),{status:"completed"===x.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&Object(st.f)(t,x._id,"completed"===x.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(Object(st.P)(Object(d.a)(Object(d.a)({},t),{},{data:{_id:x._id}}),{status:"completed"===x.status?"inProgress":"completed"}),r&&parseInt(r.data)>0&&Object(st.f)(t,x._id,"completed"===x.status?"inProgress":"completed"));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=Object(p.a)(Tn().mark((function e(t){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(te)>2||ee.owner||ee.plan&&(ee.planAdmin||ee.planModerate)?i.a.push("sp#".concat(t,"/dashboard")):ne("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=Object(p.a)(Tn().mark((function e(){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(st.p)(t,{_id:x._id},!1),t.directDeletion||t.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=Object(p.a)(Tn().mark((function e(){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(st.F)(t,{_id:x._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&!0===c.a.getState().db.cards[e]._selected&&c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e].type.indexOf("guideline")>-1})).length>0,se=!t.noExpanded&&(j||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||x._expanded||t.cardsExpanded)),ue=!!(ee&&(ee.owner||ee.plan&&(ee.planAdmin||ee.planModerate))||te>2),de={button:!1,date:null};return de=x&&x._users&&Object.keys(x._users).filter((function(e){return e===y._id})).length>0&&v.dataType.filter((function(e){return e.name===x.type})).length>0&&v.dataType.filter((function(e){return e.name===x.type}))[0].modules.indexOf("myDay")>-1?x._users[Object.keys(x._users).filter((function(e){return e===y._id}))[0]].myDay?{button:!0,date:x._users[Object.keys(x._users).filter((function(e){return e===y._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},x&&x.private&&(!x._users||x._users&&!x._users[y._id])?a.a.createElement(a.a.Fragment,null):D?a.a.createElement(In,{cardId:x._id,toTemplate:!x.isTemplate,onComplete:function(){A(!1)}}):a.a.createElement(Nn,{ref:Z,separator:t.separator||!1,plan:!(!se||"plan"!==x.type),isDragging:t.snapshot&&t.snapshot.isDragging,isDragDisable:x.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===x.type||!t.inLine),className:t.noShadow?g.containerNoShadow:g.container,selectable:t.showSelected,selected:x._selected,priority:x.priority&&v.priority.filter((function(e){return String(e.value)===String(x.priority)})).length>0?v.priority.filter((function(e){return String(e.value)===String(x.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){M(!0)},onMouseLeave:function(){setTimeout((function(){M(!1)}),100)},onClick:function(e){t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&le||t.selectable)?re():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==x.type?t.locked||ne():oe(x._id):t.onClick())},onContextMenu:function(e){}},("completed"===x.status||t.cardColorPicker&&U.color)&&a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},a.a.createElement("div",{style:{position:"absolute",backgroundColor:t.cardColorPicker&&U.color?U.color:"rgba(0,0,0,1)",opacity:U.color?.2:.1,top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}})),a.a.createElement(a.a.Fragment,null,t.snapshot&&t.snapshot.combineTargetFor&&a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Object(S.r)("$__dropHereToLink")),a.a.createElement(at,{private:!(!x.private&&!x.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r})),G(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:"".concat((null===x||void 0===x?void 0:x.name)||Object(S.r)("$__new",1)," "),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:(null===x||void 0===x?void 0:x.icon)||x.type&&v&&v.dataType&&v.dataType.filter((function(e){return e.name===x.type}))[0]&&v.dataType.filter((function(e){return e.name===x.type}))[0].icon||"$__topic",iconTitle:"$__".concat(x.type),color:Object(S.d)("medium"),editable:!(x.name||t.onlyOption&&!t.editable),_id:x._id,locked:!("link"!==x.type&&!t.locked),colorPicker:ue&&t.cardColorPicker&&U&&!U.parent?function(e){(!U.color&&e||U.color&&U.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},x._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[x._id]),{},{color:e})))}))}:null,onEdit:"completed"!==x.status&&te&&parseInt(te)>1||ee&&ee.plan&&(ee.owner||ee.planAdmin||ee.planEdit||ee.planModerate)?function(e){t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},x._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[x._id]),{},{name:e})))}))}:null,moreButton:z,options:x.deleted?[{name:Object(S.r)("$__restoreThis",1),icon:"restore_from_trash",onClick:function(){ce()},show:"hover",color:Object(S.d)("medium")}]:t.onlyOption||t.showSelected||t.locked?[]:[Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&"step"===c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e]._parent===x._id})).length>0&&{name:"$__openTaskList",icon:"schema",show:"fixed",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:x._id}))}},x.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(x.url,"_blank")}},!x.archived&&!x.isTemplate&&"plan"===x.type&&{name:x._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:x._isFavorite?"favorite":"favorite_border",color:Object(S.d)("medium"),onClick:function(){var e=Object(p.a)(Tn().mark((function e(){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.g)(t,x._id,!!x._isFavorite),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},x._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[x._id]),{},{_isFavorite:!x._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!x.archived&&"completed"!==x.status&&de&&de.button&&{name:_()(new Date(1e3*de.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:_()(new Date(1e3*de.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:_()(new Date(1e3*de.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(de&&de.date&&(!de||!de.date||_()(new Date(1e3*de.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")));Object(st.K)(t,{_id:x._id,userId:y._id,option:e}),t.myDayClick&&t.myDayClick()}},!x.archived&&!t.onlyOption&&(te&&parseInt(te)>1||ee.owner||ee.planAdmin||ee.planEdit||ee.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),ne()},show:"hover"},!x.archived&&!x.isTemplate&&x._users&&"completed"!==x.status&&x._users[y._id]&&(!x._kpiTimer||0===Object.keys(x._kpiTimer).length||x._kpiTimer&&Object.keys(x._kpiTimer).length>0&&0===Object.keys(x._kpiTimer).filter((function(e){return y&&y._id&&e&&x._kpiTimer[e]&&x._kpiTimer[e].userId&&x._kpiTimer[e].userId===y._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(st.w)(t,x._id),!(de&&de.date&&(!de||!de.date||_()(new Date(1e3*de.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")))&&Object(st.K)(t,{_id:x._id,userId:y._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},x._users&&"completed"!==x.status&&x._users[y._id]&&{name:x._hasStep?"$__completeStep":"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(p.a)(Tn().mark((function e(){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ae();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!x.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&(x.type.indexOf("guideline")>-1||x.type.indexOf("objective")>-1||x.type.indexOf("goal")>-1)&&{name:x._selected?"$__removeSelection":"$__selectThis",icon:x._selected?"visibility_off":"visibility",hide:!0,onClick:function(){re()}},{name:"$__duplicate",icon:"content_copy",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:x._id}))}},!x.isTemplate&&"plan"===x.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){A(!0)}},x&&!x.isTemplate&&"plan"===x.type&&!x.archived&&(x._users&&x._users[y._id]&&x._users[y._id].access&&5===parseInt(x._users[y._id].access)||ee&&ee.planAdmin)&&{name:Object(S.r)("$__shelve"),icon:"archive",onClick:function(){Object(st.N)(t,{_id:x._id,archived:!0})}},(te&&5===parseInt(te)||ee.owner||ee.planAdmin||ee.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||x.archived||0===v.dataType.filter((function(e){return e.name===x.type})).length||v.dataType.filter((function(e){return e.name===x.type})).length>0&&"swot"===v.dataType.filter((function(e){return e.name===x.type}))[0].module?ie():ne("delete"),t.onAction&&t.onAction()},show:"hover"},x&&!x.isTemplate&&"plan"===x.type&&x.archived&&(x._users&&x._users[y._id]&&x._users[y._id].access&&parseInt(5===x._users[y._id])||ee&&ee.planAdmin)&&{name:Object(S.r)("$__unarchive"),icon:"archive",onClick:function(){Object(st.N)(t,{_id:x._id,archived:null})}},!x.isTemplate&&!x.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==x.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==x.status?"lightgray":"green",onClick:function(){var e=Object(p.a)(Tn().mark((function e(){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ae();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:!t.noExpanded&&se,noExpanding:t.expanded||c.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!se),t.expanded||c.a.getState().db.cardsExpanded||k((function(e){return!e}))},onClick:function(e){}}),x&&(x._cardCode||x.value)?a.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},x&&x._cardCode?a.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",x._cardCode):a.a.createElement(a.a.Fragment,null),x&&x.value?a.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",x.value):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),(("insight"===x.type||"link"===x.type)&&x._createdBy&&v.users[x._createdBy._id]||x._createdBy&&x._createdBy.channel&&x._createdBy._id&&x._createdBy._id!==y._id)&&a.a.createElement("div",{style:{width:"calc(100% - 0px)",alignItems:"center",padding:"7px",display:"inline-flex",borderBottom:"solid 1px rgba(0,0,0,0.03)"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},a.a.createElement(Ge.a,{title:x._createdBy.name||v.users[x._createdBy._id].name},a.a.createElement(Se.a,{alt:x._createdBy.name||v.users[x._createdBy._id].name,src:(null===(o=v.users[x._createdBy._id])||void 0===o?void 0:o.image)||null,size:"12px",style:{width:16,height:16}},(null===(l=x._createdBy)||void 0===l||null===(s=l.name)||void 0===s?void 0:s.substr(0,1))||v.users[x._createdBy._id].name.substr(0,1)))),a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold"}},a.a.createElement("span",{style:{fontSize:10,color:"gray"}},Object(S.r)("$__createdBy","*")),": ",(null===(u=x._createdBy)||void 0===u||null===(m=u.name)||void 0===m?void 0:m.split(" ")[0])||v.users[x._createdBy._id].name.split(" ")[0]),a.a.createElement("div",null,_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*x.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*x.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*x.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*x.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(1e3*x.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))),x._kpiTimer&&Object.keys(x._kpiTimer).length>0&&0!==Object.keys(x._kpiTimer).filter((function(e){return x._kpiTimer[e].userId===y._id})).length&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Xt,{data:x})),!t.noExpanded&&se&&(!x.private||x.private&&(R||c.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ur,Object.assign({},t,{private:!!x.private,expanded:!0,onClick:function(e){},Resume:!0})),a.a.createElement("div",null,t.searchText&&x.description&&a.a.createElement("div",{className:g.description},Object(S.b)(x.description,t.searchText)))):se?a.a.createElement(a.a.Fragment,null,a.a.createElement(Jt,null)):a.a.createElement(a.a.Fragment,null),x.isTemplate?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"}},x.startDate&&_()(x.startDate).isValid()||x.endDate&&_()(x.endDate).isValid()?a.a.createElement("div",{style:Object(d.a)({position:"relative",display:"flex",width:"100%"},se?{height:"45px"}:{})},a.a.createElement("div",{className:x.endDate&&_()(new Date(1e3*x.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<_()().format("YYYY-MM-DD")?g.lateDates:g.dates},x.startDate&&_()(x.startDate).isValid()&&a.a.createElement("div",{className:g.dateInfo},a.a.createElement(Oe.a,{overlap:"rectangular",className:g.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*x.startDate)instanceof Date&&!isNaN(new Date(1e3*x.startDate))?_()(new Date(1e3*x.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):_()(x.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),x.endDate&&_()(x.endDate).isValid()?a.a.createElement("div",{className:g.dateInfo},a.a.createElement(Oe.a,{overlap:"rectangular",className:g.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*x.endDate)instanceof Date&&!isNaN(new Date(1e3*x.endDate))?_()(new Date(1e3*x.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):_()(x.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null)),x._tags&&x._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{style:{marginBottom:33}},a.a.createElement(Fe.a,{options:x._tags,expanded:!!(t.showTags||se&&"plan"!==x.type&&"link"!==x.type&&"insight"!==x.type)})):a.a.createElement(a.a.Fragment,null),x._recurrenceId&&a.a.createElement("div",{style:{position:"absolute",width:"100%",bottom:"3px",left:"3px",display:"flex",fontSize:"11px",color:"lightgrey",alignItems:"center"}},a.a.createElement(Oe.a,{overlap:"rectangular",className:g.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(S.r)("$__recurrence")).concat(x.recurrenceCreatedDate?": ".concat(_()(x.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(S.r)("$__recurrentActivityFrom"),":",a.a.createElement(e,{db:"cards",data:v.cards[x._recurrenceId],Avatar:!0,ignoreList:!0,onlyOption:!0}))}),x.recurrenceCreatedDate?_()(x.recurrenceCreatedDate).format("DD/MM/YYYY"):""),x._users&&Object.keys(x._users).filter((function(e){return null!==String(e)})).length>0&&(!x._users[y._id]||x._users[y._id]&&Object.keys(x._users).length>1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:se?37:7}},a.a.createElement("div",{className:g.usersContent},a.a.createElement("div",{className:g.users},a.a.createElement(Dt,{_id:x._id,data:x,permission:ue,transparent:!0,myDay:!0,limit:3})))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(a.a.Fragment,null)),x.isTemplate&&a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Object(S.d)("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),A(!0)}},a.a.createElement(Ee,{text:Object(S.r)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),!z&&"completed"===x.status&&a.a.createElement("div",{style:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",height:"2px",left:0,right:0,top:"20px"}},a.a.createElement("div",{style:{position:"absolute",right:0,bottom:-12,color:"#FFF",fontSize:10,padding:3,backgroundColor:"rgba(0,0,0,0.66)"}},Object(S.r)("$__completeDate"),":",Object(S.k)(x.completed_at||x.updated_at))),"plan"!==x.type&&x.deleted?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},a.a.createElement("div",{style:{position:"absolute",backgroundColor:"#71389da6",top:0,left:0,right:0,bottom:0,paddingRight:7,display:"flex",alignItems:"center",cursor:"pointer",justifyContent:"right"}},a.a.createElement(E.a,{title:Object(S.r)("$__restoreThis",1),text:Object(S.r)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){ce()},size:"17px",textSize:"17px",transparent:!0}))):a.a.createElement(a.a.Fragment,null),a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}}))})),An=Object(de.a)((function(e){return{badge:{backgroundColor:"#44b700",color:"#44b700",boxShadow:"0 0 0 2px ".concat(e.palette.background.paper),"&::after":{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",animation:"$ripple 1.2s infinite ease-in-out",border:"1px solid currentColor",content:'""'}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.4)",opacity:0}}}}))(Ae.a),Pn=Object(de.a)((function(e){return{badge:{backgroundColor:"#ffb100",color:"#ffb100",boxShadow:"0 0 0 2px ".concat(e.palette.background.paper),"&::after":{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",animation:"$ripple 1.2s infinite ease-in-out",border:"1px solid currentColor",content:'""'}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.4)",opacity:0}}}}))(Ae.a),$n=Object(z.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));var zn=Object(s.b)((function(e,t){return{status:e.usersStatus&&e.usersStatus.users&&e.usersStatus.users[t.userId]&&e.usersStatus.users[t.userId].status?e.usersStatus.users[t.userId].status:null}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=$n(),r=a.a.useState(e.status),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useState(e.userId),l=Object(h.a)(c,2);return l[0],l[1],a.a.useEffect((function(){return e.status!==o&&i(e.status),function(){}}),[e.status]),a.a.createElement("div",{className:t.root},e.status&&"online"!==e.status?a.a.createElement(Pn,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children):a.a.createElement(An,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children))})),Mn=function(e){return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:"0px",padding:"0",width:"-webkit-fill-available","&:before":{left:"15px"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 0",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"15px",paddingBottom:"33px",position:"relative",paddingLeft:"15px",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:{color:W.O,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",left:"50%",marginLeft:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadge:{left:"7px"},timelineBadgeInverted:{color:W.O,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",right:"50%",marginRight:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadgeInverted:{right:"7px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.b)+", 0.4)"},info:{backgroundColor:W.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.u[0])+", 0.4)"},success:{backgroundColor:W.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.G[0])+", 0.4)"},danger:{backgroundColor:W.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.j[0])+", 0.4)"},warning:{backgroundColor:W.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.N[0])+", 0.4)"},primary:{backgroundColor:W.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:{maxWidth:"calc(100% - 70px)",float:"right",padding:"7px",marginBottom:"5px",marginRight:"40px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:Object(S.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:"0px",display:"flex",alignItems:"center"},timelineDate:{display:"flex",alignItems:"center",padding:"5px",backgroundColor:"#CCCCCC"},timelineBody:{overflowWrap:"anywhere",fontSize:"12px",lineHeight:"21px",position:"relative",width:"100%",float:"left"},timelineLog:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:Object(f.a)({position:"absolute",bottom:"0px",padding:"10px",height:"auto",width:"calc(100% - 0px)",zIndex:10},"padding","7px"),files:{display:"inline-table",position:"relative"},textEditorIcon:{cursor:"pointer",color:Object(S.d)("color")},progressBar:{backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"30px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"relative",float:"left",marginBottom:"33px","& img":{maxWidth:"20%",minWidth:"177px",height:"auto",marginTop:"30px",marginRight:"7px"},"& .data":{"& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}},Bn=r(592),Yn=r.n(Bn),Rn=r(593),Gn=r.n(Rn),Hn=r(594),Wn=r.n(Hn),Un=r(1014),Vn=r.n(Un),qn=r(595),Xn=r.n(qn),Kn=r(1825),Jn=function(e){return{popperClose:{pointerEvents:"none",display:"none !important"},popperNav:Object(f.a)({},e.breakpoints.down("sm"),{position:"static !important",left:"unset !important",top:"unset !important",transform:"none !important",willChange:"unset !important","& > div":{boxShadow:"none !important",marginLeft:"0rem",marginRight:"0rem",transition:"none !important",marginTop:"0px !important",marginBottom:"0px !important",padding:"0px !important",backgroundColor:"transparent !important","& ul li":{color:W.O+" !important",margin:"10px 15px 0!important",padding:"10px 15px !important","&:hover":{backgroundColor:"hsla(0,0%,78%,.2)",boxShadow:"none"}}}}),manager:{"& > div > button:first-child > span:first-child, & > div > a:first-child > span:first-child":{width:"100%"}},innerManager:{"& > div > button,& > div > a":{margin:"0px !important",color:"inherit !important",padding:"10px 20px !important","& > span:first-child":{width:"100%",justifyContent:"flex-start"}}},target:{"& > button:first-child > span:first-child, & > a:first-child > span:first-child":{display:"inline-block"},"& $caret":{marginLeft:"0px"}},dropdown:{borderRadius:"3px",border:"0",boxShadow:"0 2px 5px 0 rgba("+Object(W.r)(W.b)+", 0.26)",top:"100%",zIndex:"1000",minWidth:"160px",padding:"5px 0",margin:"2px 0 0",fontSize:"12px",textAlign:"left",listStyle:"none",backgroundColor:W.O,backgroundClip:"padding-box"},menuList:{padding:"0"},popperResponsive:Object(f.a)({zIndex:"1200"},e.breakpoints.down("sm"),{zIndex:"1640",position:"static",float:"none",width:"auto",marginTop:"0",backgroundColor:"transparent",border:"0",boxShadow:"none",color:"black"}),dropdownItem:Object(d.a)(Object(d.a)({},W.l),{},{fontSize:"13px",padding:"10px 20px",margin:"0 5px",borderRadius:"2px",position:"relative",transition:"all 150ms linear",display:"block",clear:"both",fontWeight:"400",height:"100%",color:W.q[7],whiteSpace:"nowrap",minHeight:"unset"}),darkHover:{"&:hover":{boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.q[16])+", 0.4)",backgroundColor:W.q[16],color:W.O}},primaryHover:{"&:hover":Object(d.a)({backgroundColor:W.z[0],color:W.O},W.x)},infoHover:{"&:hover":Object(d.a)({backgroundColor:W.u[0],color:W.O},W.s)},successHover:{"&:hover":Object(d.a)({backgroundColor:W.G[0],color:W.O},W.E)},warningHover:{"&:hover":Object(d.a)({backgroundColor:W.N[0],color:W.O},W.L)},dangerHover:{"&:hover":Object(d.a)({backgroundColor:W.j[0],color:W.O},W.h)},roseHover:{"&:hover":Object(d.a)({backgroundColor:W.D[0],color:W.O},W.B)},dropdownItemRTL:{textAlign:"right"},dropdownDividerItem:{margin:"5px 0",backgroundColor:"rgba("+Object(W.r)(W.b)+", 0.12)",height:"1px",overflow:"hidden"},buttonIcon:{width:"20px",height:"20px"},caret:{transition:"all 150ms ease-in",display:"inline-block",width:"0",height:"0",marginLeft:"4px",verticalAlign:"middle",borderTop:"4px solid",borderRight:"4px solid transparent",borderLeft:"4px solid transparent"},caretActive:{transform:"rotate(180deg)"},caretDropup:{transform:"rotate(180deg)"},caretRTL:{marginRight:"4px"},dropdownHeader:{display:"block",padding:"0.1875rem 1.25rem",fontSize:"0.75rem",lineHeight:"1.428571",color:W.q[1],whiteSpace:"nowrap",fontWeight:"inherit",marginTop:"10px",minHeight:"unset","&:hover,&:focus":{backgroundColor:"transparent",cursor:"auto"}},noLiPadding:{padding:"0"}}},Zn=Object(z.a)(Jn);function Qn(e){var t,r,n,o=a.a.useState(null),i=Object(h.a)(o,2),c=i[0],l=i[1],s=Zn(),u=function(e){c.contains(e.target)||l(null)},d=function(t){l(null),e&&e.onClick&&e.onClick(t)},p=e.buttonText,m=e.buttonIcon,g=e.dropdownList,b=e.buttonProps,v=e.dropup,x=e.dropdownHeader,_=e.caret,O=e.hoverColor,w=e.dropPlacement,j=e.rtlActive,E=e.noLiPadding,S=e.innerDropDown,k=e.navDropdown,L=y()((t={},Object(f.a)(t,s.caret,!0),Object(f.a)(t,s.caretDropup,v&&!c),Object(f.a)(t,s.caretActive,Boolean(c)&&!v),Object(f.a)(t,s.caretRTL,j),t)),C=y()((r={},Object(f.a)(r,s.dropdownItem,!0),Object(f.a)(r,s[O+"Hover"],!0),Object(f.a)(r,s.noLiPadding,E),Object(f.a)(r,s.dropdownItemRTL,j),r)),I=a.a.createElement(Be.a,{role:"menu",className:s.menuList},void 0!==x?a.a.createElement(Me.a,{onClick:function(){return d(x)},className:s.dropdownHeader},x):null,g.map((function(e,t){return e.divider?a.a.createElement(Kn.a,{key:t,onClick:function(){return d("divider")},className:s.dropdownDividerItem}):void 0!==e.props&&"multi"===e.props["data-ref"]?a.a.createElement(Me.a,{key:t,className:C,style:{overflow:"visible",padding:0}},e):a.a.createElement(Me.a,{key:t,onClick:function(){return d(e)},className:C},e)})));return a.a.createElement("div",{className:S?s.innerManager:s.manager},a.a.createElement("div",{className:void 0!==p?"":s.target},a.a.createElement(X,Object.assign({"aria-label":"Notifications","aria-owns":c?"menu-list":null,"aria-haspopup":"true"},b,{onClick:function(e){c&&c.contains(e.target)?l(null):l(e.currentTarget)}}),void 0!==m?a.a.createElement(e.buttonIcon,{className:s.buttonIcon}):null,void 0!==p?p:null,_?a.a.createElement("b",{className:L}):null)),a.a.createElement(Re.a,{open:Boolean(c),anchorEl:c,transition:!0,disablePortal:!0,placement:w,className:y()((n={},Object(f.a)(n,s.popperClose,!c),Object(f.a)(n,s.popperResponsive,!0),Object(f.a)(n,s.popperNav,Boolean(c)&&k),n))},(function(){return a.a.createElement($e.a,{in:Boolean(c),id:"menu-list",style:v?{transformOrigin:"0 100% 0"}:{transformOrigin:"0 0 0"}},a.a.createElement(Ye.a,{className:s.dropdown},S?I:a.a.createElement(Pe.a,{onClickAway:u},I)))})))}Qn.defaultProps={caret:!0,dropup:!1,hoverColor:"primary"};Yn.a,Gn.a,Wn.a,Xn.a,Yn.a,Gn.a,Wn.a,Xn.a;var ea=[{inverted:!0,badgeColor:"danger",badgeIcon:Yn.a,title:"Some Title",titleColor:"danger",body:a.a.createElement("p",null,"Wifey made the best Father","'","s Day meal ever. So thankful so happy so blessed. Thank you for making my family We just had fun with the \u201cfuture\u201d theme !!! It was a fun night all together ... The always rude Kanye Show at 2am Sold Out Famous viewing @ Figueroa and 12th in downtown."),footerTitle:"11 hours ago via Twitter"},{badgeColor:"success",badgeIcon:Gn.a,title:"Another One",titleColor:"success",body:a.a.createElement("p",null,"Thank God for the support of my wife and real friends. I also wanted to point out that it\u2019s the first album to go number 1 off of streaming!!! I love you Ellen and also my number one design rule of anything I do from shoes to music to homes is that Kim has to like it....")},{inverted:!0,badgeColor:"info",badgeIcon:Wn.a,title:"Another Title",titleColor:"info",body:a.a.createElement("div",null,a.a.createElement("p",null,"Called I Miss the Old Kanye That\u2019s all it was Kanye And I love you like Kanye loves Kanye Famous viewing @ Figueroa and 12th in downtown LA 11:10PM"),a.a.createElement("p",null,"What if Kanye made a song about Kanye Roy\xe8re doesn","'","t make a Polar bear bed but the Polar bear couch is my favorite piece of furniture we own It wasn\u2019t any Kanyes Set on his goals Kanye")),footer:a.a.createElement(Qn,{buttonIcon:Xn.a,buttonProps:{round:!0,style:{marginBottom:"0"},color:"info"},dropdownList:["Action","Another action","Something else here",{divider:!0},"Separated link"]})},{badgeColor:"warning",badgeIcon:Vn.a,title:"Another One",titleColor:"warning",body:a.a.createElement("p",null,"Tune into Big Boy","'","s 92.3 I","'","m about to play the first single from Cruel Winter also to Kim\u2019s hair and makeup Lorraine jewelry and the whole style squad at Balmain and the Yeezy team. Thank you Anna for the invite thank you to the whole Vogue team")}],ta=new Date,ra=ta.getFullYear(),na=ta.getMonth(),aa=ta.getDate(),oa=(new Date(ra,na,1),new Date(ra,na,1),new Date(ra,na,aa-1,10,30),new Date(ra,na,aa-1,11,30),new Date(ra,na,aa+7,12,0),new Date(ra,na,aa+7,14,0),new Date(ra,na,aa-2),new Date(ra,na,aa-2),new Date(ra,na,aa+1,19,0),new Date(ra,na,aa+1,22,30),new Date(ra,na,21),new Date(ra,na,22),new Date(ra,na,21),new Date(ra,na,22),Object(z.a)(Mn)),ia=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t,r=oa(),o=c.a.getState(),i=o.db,l=o.session,s=o.functions,u=o.timeline,p=s.socket,m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),O=x[0],w=x[1],j=a.a.useState(null),k=Object(h.a)(j,2),L=k[0],C=k[1],I=a.a.useState(null),T=Object(h.a)(I,2),F=T[0],N=T[1],D=a.a.useState(!1),A=Object(h.a)(D,2),P=A[0],$=A[1],z=a.a.useState(!1),M=Object(h.a)(z,2),B=M[0],Y=M[1],R=a.a.useState(null),G=Object(h.a)(R,2),H=G[0],W=G[1],U=e.storie,V=Object(n.useRef)(),q=Object(n.useRef)({});Object(n.useEffect)((function(){})),Object(n.useLayoutEffect)((function(){if(V.current){var t=new ResizeObserver((function(){e.onResize&&(q.current&&q.current===V.current.clientHeight||(q.current=V.current.clientHeight,e.onResize(V.current.clientHeight)))}));return t.observe(V.current),function(){return t.disconnect()}}}),[V]),Object(n.useEffect)((function(){V.current&&e.onResize&&(e.onResize(V.current.clientHeight),V.current.addEventListener("DOMNodeInserted",(function(){q.current&&q.current===V.current.clientHeight||(q.current=V.current.clientHeight,e.onResize(V.current.clientHeight))})))}),[V]);var X=null;if(U&&U._parent&&i.cards[U._parent]?U._parent:U&&U.idRel&&i.cards[U.idRel]&&U.idRel,U.filesCount&&U.filesCount>0&&ea.user&&ea.user._id&&ea.user._id!==l._id&&(!ea.files||ea.files&&ea.files.length<U.filesCount))return a.a.createElement(a.a.Fragment,null);var K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];w(!0),e&&clearTimeout(X)},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;X=setTimeout((function(){w(!1)}),e)},Z=function(t){var r=e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,n={chatId:c.a.getState().chat.id,react:t,user:l._id,db:e.db,nodeId:r,message:e.storie._id};kr(e,n),p.emit("data",{module:"timeline",method:"post",action:"interact"},n)};if(!U)return null;var Q="";"timer"===U.type&&String(U.ini)&&String(U.fin)&&(Q=U.fin-U.ini);var ee=null;U.urlPreview&&(ee=JSON.parse(U.urlPreview));var te,re=Object(S.r)(function(e){var t,r;if(U&&U._parent&&i.cards[U._parent]?t=U._parent:U&&U.idRel&&i.cards[U.idRel]&&(t=U.idRel),r=e,e){var n=e.split("@[");n.length>0&&n.map((function(e){if(e){var n="@[".concat(e.split(")")[0],")"),a=e.split("](")[1];if(a)if((a=a.split(")")[0])&&36===a.length&&i.cards[t]&&i.cards[t]._users&&i.cards[t]._users[a]){var o=i.cards[t]._users&&i.cards[t]._users[a]&&i.cards[t]._users[a].name||i.cards[t]._users&&i.cards[t]._users[a]&&i.cards[t]._users[a].name?i.cards[t]._users[a].name:e.split("](")[0];r=r.replace(n,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(o,"</b></span>"))}else if(a&&36===a.length&&i.users[a]){var c=i.users[a]&&i.users[a].name?i.users[a].name:e.split("](")[0];r=r.replace(n,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(c,"</b></span>"))}else{var l=e.split("](")[0];r=r.replace(n,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(l,"</b></span>"))}}return!0}))}return r}(U.message));U._reactions&&Object.keys(U._reactions).length>0&&Object.keys(U._reactions).map((function(e){Object.keys(U._reactions[e]).length>0&&Object.keys(U._reactions[e]).map((function(t){t===l._id&&(te=e)}))}));var ne=!1;e.storie&&e.storie.user&&e.storie.user._id===l._id&&(ne=!0);var oe=function(){Object(S.c)({message:Object(S.r)("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Tr(e,{id:U._id,idRel:U.idRel,deletedReason:L,deleted:!0}),U.deleted=!0,N(!1),C(null)}})};if(!U.filesCount&&""===U.message&&U.cardId&&U.cardId!==e.nodeId&&!c.a.getState().db.cards[U.cardId])return null;var ie=function(t){var r=t.name.split("."),n=r[r.length-1],o="attachment";i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&(o=i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].icon||"https://fl.machen.ai/?arq=".concat(t.file.replace("&","||MCH-ECOM||"),"&name=").concat(t.name.replace("&","||MCH-ECOM||")));var c="img";return i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer&&(c=i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer),a.a.createElement("div",{key:t._id,style:Object(d.a)({position:"relative",display:"flex",marginBottom:"5px",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer",overflow:"hidden",padding:"7px",zIndex:"10 !important",borderRadius:"15px",alignItems:"center",justifyContent:"center"},"audio"===c?{width:"350px",height:"50px"}:"movie"===c?{width:"350px",height:"280px"}:{width:"150px",height:"150px"}),onClick:function(r){e.openLightBox&&e.openLightBox(t._id),r.preventDefault()},title:t.name},("img"===c||"movie"!==c&&"audio"!==c&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")||"movie"!==c&&"audio"!==c&&!("img"===c&&o&&o.indexOf("svg")>-1))&&a.a.createElement(Ge.a,{title:t.name},a.a.createElement("div",{style:{position:"absolute",bottom:"7px",left:"7px",right:"7px",padding:"3px",background:"rgba(0,0,0,0.8)",color:"#FFFFFF",borderRadius:"0px 0px 15px 15px",overflow:"hidden",textOverflow:"ellipsis"}},t.name)),"img"===c&&"attachment"===o&&a.a.createElement(ae.a,{icon:o,size:"50px"}),"img"===c&&"string"===typeof o&&o.indexOf("https")>-1&&-1===o.indexOf("svg")&&a.a.createElement("img",{src:"".concat(o),style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"},onError:function(e){U.created_at&&"string"===typeof U.created_at&&parseInt(U.created_at)>_()().unix("X")-60&&(e.target.src=o)}}),"movie"!==c&&"img"!==c&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?a.a.createElement(ae.a,{icon:o,size:"50px"}):"movie"===c||"img"===c||"img"===c&&o&&o.indexOf("svg")>-1?a.a.createElement(a.a.Fragment,null):a.a.createElement("img",{src:o,style:{width:"100%",height:"100%"}}),"img"===c&&o&&o.indexOf(".svg")>-1?a.a.createElement("img",{src:he.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}):a.a.createElement(a.a.Fragment,null),"movie"===c&&a.a.createElement("video",{style:{width:"100%"},controlsList:"nodownload",src:"https://machen.azureedge.net/".concat(t.file)}),"audio"===c&&a.a.createElement(le.a,{src:"https://machen.azureedge.net/".concat(t.file),controls:!0}),a.a.createElement("div",{style:{clear:"both"}}))};return a.a.createElement("div",{style:Object(d.a)(Object(d.a)({maxWidth:"calc(100% - 15px)",marginLeft:"7px"},e.messageClick?{cursor:"pointer"}:{}),e.boxStyle?e.boxStyle:{}),onClick:e.messageClick?function(t){e.messageClick(),t.preventDefault()}:null,ref:V},a.a.createElement("div",{className:"message",style:Object(d.a)(Object(d.a)({position:"relative",maxWidth:"calc(88% - 15px)",float:ne?"right":"left"},ne?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){J(1e3)},onMouseOver:function(){e.isReply||K(!0)},onClick:function(){e.isReply||K(!0)}},e.showUserName&&!ne&&a.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:Object(S.d)("menu")}},U.user.name?U.user.name:U.user.fullName),a.a.createElement("div",{style:Object(d.a)({position:"relative",float:ne?"right":"left",padding:"7px 15px",width:"100%",background:ne?"linear-gradient(33deg, rgba(237, 237, 237, 1), rgba(196, 196, 196, 1))":"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(240,240,240, 1))",borderRadius:"15px",boxShadow:"rgb(0 0 0 / 5%) 0px 2px 2px 2px"},U.approval?{border:"solid 4px ".concat(U.message.indexOf("$__approved")>-1?"green":"red")}:{})},U&&U.filesCount&&U&&U.user&&U.user._id===l._id&&parseInt(U.filesCount)>0&&U.files&&0===Object.keys(U.files).length?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",justifyContent:"center",alignItems:"center",color:"lightgray"}},Object(S.r)("$__transferringFile".concat(parseInt(U.filesCount)>1?"s":""))),a.a.createElement("div",{className:"files",style:{position:"relative",maxWidth:"calc(100% - 15px)",width:"100%",display:"flex"}},(parseInt(U.created_at),_()().unix("x"),a.a.createElement(a.a.Fragment,null)))):a.a.createElement(a.a.Fragment,null),U.files&&Object.keys(U.files).length>0?a.a.createElement("div",{className:"files",style:Object(d.a)(Object(d.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:ne?"right":"left"},ne?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:ne?"flex-end":"none",flexWrap:"wrap"})},Object.keys(U.files).map((function(e,t){return ie(U.files[e])}))):U.files&&U.files.length>0?a.a.createElement("div",{className:"files",style:Object(d.a)(Object(d.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:ne?"right":"left"},ne?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:ne?"flex-end":"none",flexWrap:"wrap"})},U.files.map((function(e,t){return ie(e)}))):a.a.createElement(a.a.Fragment,null),!e.isReply&&e.storie&&e.storie.reply&&u&&(u[e.nodeId]&&u[e.nodeId][e.storie.reply]||u[l._id]&&u[l._id][e.storie.reply])&&a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 20px)",opacity:.66,display:"flex",justifyContent:"center",marginBottom:"7px"}},a.a.createElement(ia,{isReply:!0,storie:u[e.nodeId]&&u[e.nodeId][e.storie.reply]?u[e.nodeId][e.storie.reply]:u[l._id][e.storie.reply],db:e.db,nodeId:e.nodeId,openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},messageClick:function(){e.replyClick&&e.replyClick()}})),U.deleted&&"timer"!==U.type?a.a.createElement("div",{style:{color:"lightGray",height:33,padding:7}},Object(S.r)("$__removed","*"),"*"):function(){if("comment"===U.type&&U.message)return a.a.createElement("div",null,U.urlPreview&&ee.img&&ee.title&&ee.contentSnippet?a.a.createElement(un,{style:{marginBottom:15}},!b&&ee.img&&a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(ee.img),onError:function(e){v(!0)},alt:ee.title||ee.link})),a.a.createElement(fn,{xs:12,sm:6,md:8,lg:9,xl:10},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("menu"),fontWeight:"bold"}},ee.title),ee.site&&a.a.createElement("div",{style:{fontSize:"12px"}},ee.site),ee.contentSnippet&&a.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},ee.contentSnippet),a.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:ee.link,target:"_blank"},Object(S.r)("$__openLink","*")))):a.a.createElement(a.a.Fragment,null),a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},Object(S.b)(Object(S.n)(re),e.searchText)),a.a.createElement("div",{style:{clear:"both"}}));if("comment"===U.type&&!U.message&&U.cardId!==e.nodeId&&c.a.getState().db.cards[U.cardId])return a.a.createElement(Dn,{db:"cards",data:c.a.getState().db.cards[U.cardId],Avatar:!0,expanded:!0,ignoreList:!0});if("log"===U.type){var t={};return"$__updated"===U.message?(t=JSON.parse(U.newData),a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(ae.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),U.message.indexOf("$__")>-1?Object(S.r)(U.message,1):U.message," "),U.newData&&a.a.createElement("ul",{style:{position:"relative",width:"98%"}},Object.keys(t).map((function(r,n){if("icon"===r)return a.a.createElement("li",{key:n,style:{display:"flex"}},Object(S.r)("$__icon",1),":",a.a.createElement(ae.a,{icon:t[r],color:Object(S.d)("color"),size:"17px"}));if("customColumns"===r){var o=JSON.parse(t[r]);return a.a.createElement("li",{key:n},Object(S.r)("$__customColumns",1),":",a.a.createElement("ul",null,Object.keys(o).map((function(e,t){return a.a.createElement("li",{key:t},Object(S.r)("$__".concat(e)),"=>"," ",a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.r)("".concat(o[e].name))))}))))}if("_id"===r||"id"===r||"client"===r||"planId"===r||"_parent"===r||"owner"===r||"image"===r);else{if("status"===r)return a.a.createElement("li",{key:n},Object(S.r)("$__status",1),": ",Object(S.r)("$__".concat(t[r]),1));if("note"===r)return a.a.createElement("li",{key:n},Object(S.r)("$__note",1),": ",a.a.createElement("div",null,Object(S.b)(Object(S.n)(t[r]),e.searchText)));if("kpi_type"===r||"priority"===r||"risk"===r||"complexity"===r||"impact"===r)return a.a.createElement("li",{key:n},Object(S.r)("$__".concat(r),1),": ",Object(S.r)("$__".concat(t[r]),1));if("name"===r||"description"===r)return a.a.createElement("li",{key:n},Object(S.r)("$__".concat(r),1),": ",t[r]);if("url"===r)return a.a.createElement("li",{key:n},"url",":",a.a.createElement("a",{href:t[r],target:"blank",style:{}},Object(S.b)(Object(S.n)(t[r]),e.searchText)));if("_tags"!==r&&"string"===typeof t[r]&&"kpi_ini"!==r&&"kpi_fin"!==r&&"startDate"!==r&&"endDate"!==r&&"updated_at"!==r&&"created_at"!==r&&"content"!==r)return a.a.createElement("li",{key:n},Object(S.r)("$__".concat(r),1),": ",t[r].indexOf("$__")>-1?Object(S.r)("$__".concat(t[r]),1):t[r]);if("kpi_ini"===r||"kpi_fin"===r){t.kpi_type?t.kpi_type:i.cards[U.idRel]&&i.cards[U.idRel].kpi_type&&i.cards[U.idRel].kpi_type;return a.a.createElement("li",{key:n},Object(S.r)("$__".concat(r),1),": ",Object(S.h)(t[r],U.kpi_type?U.kpi_type:"decimal"))}if("startDate"===r||"endDate"===r||"updated_at"===r||"created_at"===r)return a.a.createElement("li",{key:n},Object(S.r)("$__".concat(r),1),": ",t[r]?_()(new Date(1e3*t[r])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):Object(S.r)("$__removed"));if("boolean"===typeof t[r])return a.a.createElement("li",{key:n},Object(S.r)("$__".concat(r),1),": ",t[r]?Object(S.r)("$__enable",1):Object(S.r)("$__disable",1));if("_tags"===r)return a.a.createElement("li",{key:n},"TAGS: ",a.a.createElement(Fe.a,{options:t[r],showOptions:!0}))}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(ae.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),U.approval&&U.message.indexOf("$__approved")>-1?a.a.createElement(ae.a,{icon:"verified",color:"green"}):U.approval&&U.message.indexOf("$__rejected")>-1?a.a.createElement(ae.a,{icon:"gpp_bad",color:"red"}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{wordBreak:"break-word"}},Object(S.b)(Object(S.n)(re),e.searchText)),a.a.createElement("div",{style:{clear:"both"}})),U.cardId?a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"relative",maxWidth:"285px"},e.boxStyle&&e.boxStyle.maxWidth?{maxWidth:e.boxStyle.maxWidth}:{}),{},{width:"100%",display:"block"})},a.a.createElement(Dn,{db:"cards",data:c.a.getState().db.cards[U.cardId],ignoreList:!0,onlyOption:!0,notGlobalExpanded:!0,noExpanding:!0,disabled:!0})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}}))}if("timer"===U.type){var n=Q,o="";if(Q<60)o="".concat(n," ").concat(Object(S.r)("$__seconds",1));else if(Q>3600){var l=Math.trunc(n/3600);n-=3600*l;var s=Math.trunc(n/60)>0?Math.trunc(n/60):0,u=(n-=60*s)>0?n:0;o="".concat(l," hora").concat(l>1?"s":""," ").concat(s," ").concat(Object(S.r)("$__minutes",1)," ").concat(u," ").concat(Object(S.r)("$__seconds",1))}else{var p=Math.trunc(n/60)>0?Math.trunc(n/60):0,f=(n-=60*p)>0?n:0;o="".concat(p," ").concat(Object(S.r)("$__minutes",1)," ").concat(f," ").concat(Object(S.r)("$__seconds",1))}return F?a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},a.a.createElement(tt,{label:Object(S.r)("$__cancelReason",1),variant:Object(S.d)("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){C(e.target.value)}},placeholder:Object(S.r)("$__cancelReason_placeholder",1)})),a.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__cancel","*"),color:Object(S.d)("lightgrey"),icon:"cancel",onClick:function(){N(!1),C(null)},size:"25px"}),a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){oe()},size:"25px"})),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative"}},U&&U._toUser&&Object.keys(U._toUser).length>0&&a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ct.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(U._toUser).map((function(e){return a.a.createElement(Ge.a,{key:e,title:U._toUser[e].displayName?U._toUser[e].displayName:U._toUser[e].name},a.a.createElement(Se.a,{alt:U._toUser[e].name,src:U._toUser[e].image||null,style:{width:27,height:27,border:"none"}},U._toUser[e].name.substr(0,1)))})))),U.manualEntry?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},_()(1e3*U.ini).tz("America/Sao_Paulo").format("DD/MM/YYYY"))):a.a.createElement(a.a.Fragment,null,parseInt(_()(1e3*U.ini).tz("America/Sao_Paulo").format("YYYY"))>2021?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},_()(1e3*U.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):a.a.createElement(a.a.Fragment,null),parseInt(_()(1e3*U.fin).tz("America/Sao_Paulo").format("YYYY"))>2021?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"watch_later"}),a.a.createElement("div",{className:"text"},_()(1e3*U.fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(ae.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},o)),a.a.createElement("div",{style:{clear:"both"}}),U.deleted?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255,255,255,0.66)",display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.r)("$__cancelled")):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",null,re),U.deleted&&U.deletedReason&&a.a.createElement("div",{style:{color:"red"}},Object(S.r)("$__cancelReason",1),": ",U.deletedReason),a.a.createElement("div",{style:{clear:"both"}}),U.deleted||!O&&!_()(U.created_at).unix("x")?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px"}},a.a.createElement(We,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){N(!0)},show:"hover"}]}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))}if("kpi"===U.type){var h=U&&U.balance?U.balance:0;return a.a.createElement("div",null,U.cardId?a.a.createElement(Dn,{db:"cards",data:c.a.getState().db.cards[U.cardId],ignoreList:!0,noOptions:!0}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,re),a.a.createElement("div",{className:parseFloat(U.value)>0?r.valuePositive:r.valueNegative},Object(S.h)(U.value,U.kpi_type?U.kpi_type:"decimal")),!e.stories&&a.a.createElement("div",{className:r.lastValue},Object(S.r)("$__balance",1),": ",Object(S.h)(h,U.kpi_type?U.kpi_type:"decimal")),a.a.createElement("div",{style:{clear:"both"}}))}}()),U.user&&U.user._id&&a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},ne?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:U.user._id},a.a.createElement(Se.a,Object.assign({},U.user._id&&!(null===(t=c.a.getState().db.users[U.user._id])||void 0===t?void 0:t.deleted)?{alt:U.user.displayName?U.user.displayName:U.user.name,src:"".concat(U.user.image)}:{alt:Object(S.r)("$__deletedUser"),src:null},{alt:U.user.displayName?U.user.displayName:U.user.name,src:"".concat(U.user.image),style:{width:"22px",height:"22px"}})))),a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},ne?{left:"15px"}:{right:"15px"}),{},{bottom:"-26px",color:"rgba(0,0,0,0.77)",background:"linear-gradient(33deg, rgba(233, 233, 233, 1), rgba(211,211,211, 1))",display:"flex",padding:"1px 7px",alignItems:"center",borderRadius:"0 0 7px 7px",fontSize:"10px",width:"fit-content"})},_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*U.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*U.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*U.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*U.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(1e3*U.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),U.readedBy&&Object.keys(U.readedBy).length>0&&a.a.createElement(Ge.a,{title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(U.readedBy).sort((function(e,t){return U&&U.readedBy[e]&&U.readedBy[e].readedDate&&U.readedBy[t]&&U.readedBy[t].readedDate&&String(U.readedBy[e].readedDate.low)&&String(U.readedBy[t].readedDate.low)&&parseInt(U.readedBy[e].readedDate.low)<parseInt(U.readedBy[t].readedDate.low)?-1:U&&U.readedBy[e]&&U.readedBy[e].readedDate&&U.readedBy[t]&&U.readedBy[t].readedDate&&String(U.readedBy[e].readedDate.low)&&String(U.readedBy[t].readedDate.low)&&parseInt(U.readedBy[e].readedDate.low)>parseInt(U.readedBy[t].readedDate.low)?1:0})).map((function(e,t){return U.user._id!==e&&U.readedBy&&U.readedBy[e]&&U.readedBy[e].name&&a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:U.readedBy[e].name,src:U.readedBy[e].image||null}),a.a.createElement("span",{style:{paddingLeft:"7px"}},U.readedBy[e].displayName?U.readedBy[e].displayName:U.readedBy[e].name,U.readedBy[e].readedDate&&U.readedBy[e].readedDate.low&&" (".concat(_()(1e3*U.readedBy[e].readedDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))},a.a.createElement("div",null,a.a.createElement(ae.a,{color:"#FFFFFF",size:"14px",style:{marginLeft:"7px"}},"done_all"))),!U.deleted&&U._reactions&&Object.keys(U._reactions).length>0&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},U&&U._reactions.like&&Object.keys(U._reactions.like).length>0&&a.a.createElement(Ee,{icon:"thumb_up",iconColor:Object(S.d)("menu"),title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(U._reactions.like).sort((function(e,t){return U._reactions.like[e].reactDate&&String(U._reactions.like[e].reactDate.low)&&U._reactions.like[t].reactDate&&String(U._reactions.like[t].reactDate.low)&&parseInt(U._reactions.like[e].reactDate.low)<parseInt(U._reactions.like[t].reactDate.low)?-1:U._reactions.like[e].reactDate&&String(U._reactions.like[e].reactDate.low)&&U._reactions.like[t].reactDate&&String(U._reactions.like[t].reactDate.low)&&parseInt(U._reactions.like[e].reactDate.low)>parseInt(U._reactions.like[t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:U._reactions.like[e].name,src:U._reactions.like[e].image||Le.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},U._reactions.like[e].displayName?U._reactions.like[e].displayName:U._reactions.like[e].name,U._reactions.like[e].reactDate&&U._reactions.like[e].reactDate.low&&" (".concat(_()(1e3*U._reactions.like[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))),style:{fontSize:"12px",margin:0}}),U&&U._reactions&&U._reactions.nolike&&Object.keys(U._reactions.nolike).length>0&&a.a.createElement(Ee,{icon:"thumb_down",iconColor:Object(S.d)("medium"),style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(U._reactions.nolike).sort((function(e,t){return U._reactions.nolike[e].reactDate&&String(U._reactions.nolike[e].reactDate.low)&&U._reactions.nolike[t].reactDate&&String(U._reactions.nolike[t].reactDate.low)&&parseInt(U._reactions.nolike[e].reactDate.low)<parseInt(U._reactions.nolike[t].reactDate.low)?-1:U._reactions.nolike[e].reactDate&&String(U._reactions.nolike[e].reactDate.low)&&U._reactions.nolike[t].reactDate&&String(U._reactions.nolike[t].reactDate.low)&&parseInt(U._reactions.nolike[e].reactDate.low)>parseInt(U._reactions.nolike[t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:U._reactions.nolike[e].name,src:U._reactions.nolike[e].image||Le.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},U._reactions.nolike[e].displayName?U._reactions.nolike[e].displayName:U._reactions.nolike[e].name,U._reactions.nolike[e].reactDate&&U._reactions.nolike[e].reactDate.low&&" (".concat(_()(1e3*U._reactions.nolike[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),U&&U._reactions&&U._reactions.love&&Object.keys(U._reactions.love).length>0&&a.a.createElement(Ee,{icon:"favorite",iconColor:Object(S.d)("medium"),style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(U._reactions.love).sort((function(e,t){return U._reactions.love[e].reactDate&&String(U._reactions.love[e].reactDate.low)&&U._reactions.love[t].reactDate&&String(U._reactions.love[t].reactDate.low)&&parseInt(U._reactions.love[e].reactDate.low)<parseInt(U._reactions.love[t].reactDate.low)?-1:U._reactions.love[e].reactDate&&String(U._reactions.love[e].reactDate.low)&&U._reactions.love[t].reactDate&&String(U._reactions.love[t].reactDate.low)&&parseInt(U._reactions.love[e].reactDate.low)>parseInt(U._reactions.love[t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:U._reactions.love[e].name,src:U._reactions.love[e].image||Le.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},U._reactions.love[e].displayName?U._reactions.love[e].displayName:U._reactions.love[e].name,U._reactions.love[e].reactDate&&U._reactions.love[e].reactDate.low&&" (".concat(_()(1e3*U._reactions.love[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),U&&U._reactions&&U._reactions.approve&&Object.keys(U._reactions.approve).length>0&&a.a.createElement(Ee,{icon:"verified",iconColor:"green",style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(U._reactions.approve).sort((function(e,t){return U._reactions.approve[e].reactDate&&String(U._reactions.approve[e].reactDate.low)&&U._reactions.approve[t].reactDate&&String(U._reactions.approve[t].reactDate.low)&&parseInt(U._reactions.approve[e].reactDate.low)<parseInt(U._reactions.approve[t].reactDate.low)?-1:U._reactions.approve[e].reactDate&&String(U._reactions.approve[e].reactDate.low)&&U._reactions.approve[t].reactDate&&String(U._reactions.approve[t].reactDate.low)&&parseInt(U._reactions.approve[e].reactDate.low)>parseInt(U._reactions.approve[t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:U._reactions.approve[e].name,src:U._reactions.approve[e].image||Le.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},U._reactions.approve[e].displayName?U._reactions.approve[e].displayName:U._reactions.approve[e].name,U._reactions.approve[e].reactDate&&U._reactions.approve[e].reactDate.low&&" (".concat(_()(1e3*U._reactions.approve[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),U&&U._reactions&&U._reactions.attention&&Object.keys(U._reactions.attention).length>0&&a.a.createElement(Ee,{icon:"report_problem",iconColor:"red",style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(U._reactions.attention).sort((function(e,t){return U._reactions.attention[e].reactDate&&String(U._reactions.attention[e].reactDate.low)&&U._reactions.attention[t].reactDate&&String(U._reactions.attention[t].reactDate.low)&&parseInt(U._reactions.attention[e].reactDate.low)<parseInt(U._reactions.attention[t].reactDate.low)?-1:U._reactions.attention[e].reactDate&&String(U._reactions.attention[e].reactDate.low)&&U._reactions.attention[t].reactDate&&String(U._reactions.attention[t].reactDate.low)&&parseInt(U._reactions.attention[e].reactDate.low)>parseInt(U._reactions.attention[t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{alt:U._reactions.attention[e].name,src:U._reactions.attention[e].image||Le.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},U._reactions.attention[e].displayName?U._reactions.attention[e].displayName:U._reactions.attention[e].name,U._reactions.attention[e].reactDate&&U._reactions.attention[e].reactDate.low&&" (".concat(_()(1e3*U._reactions.attention[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),a.a.createElement("div",{style:{clear:"both"}})),!e.isReply&&a.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:"7px",marginRight:"7px"}},O&&!e.noReactions&&!U.deleted&&a.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){K(!0)},onMouseLeave:J},a.a.createElement(ae.a,{icon:te&&"like"===te?"thumb_up":"thumb_up_off_alt",iconColor:te&&"like"===te?Object(S.d)("menu"):Object(S.d)("medium"),title:Object(S.r)("$__like",1),size:"18px",onClick:function(){Z("like")},onMouseLeave:J}),a.a.createElement(ae.a,{icon:te&&"nolike"===te?"thumb_down":"thumb_down_off_alt",title:Object(S.r)("$__notlike",1),iconColor:te&&"nolike"===te?Object(S.d)("menu"):Object(S.d)("medium"),size:"18px",onClick:function(){Z("nolike")},onMouseLeave:J}),a.a.createElement(ae.a,{icon:te&&"love"===te?"favorite":"favorite_border",title:Object(S.r)("$__love",1),iconColor:te&&"love"===te?Object(S.d)("menu"):Object(S.d)("medium"),size:"18px",onClick:function(){Z("love")},onMouseLeave:J}),a.a.createElement(ae.a,{icon:"verified",title:Object(S.r)("$__approve",1),iconColor:te&&"approve"===te?"green":Object(S.d)("medium"),size:"18px",onClick:function(){Z("approve")},onMouseLeave:J}),a.a.createElement(ae.a,{icon:"report_problem",title:Object(S.r)("$__attention",1),iconColor:te&&"attention"===te?"red":Object(S.d)("medium"),size:"18px",onClick:function(){Z("attention")},onMouseLeave:J}),U&&U.user&&U.user._id===l._id&&a.a.createElement(ae.a,{icon:"forward",title:Object(S.r)("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){$(!0)},onMouseLeave:J}),a.a.createElement(ae.a,{icon:"reply",title:Object(S.r)("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts||{}),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts&&c.a.getState().chats.drafts[e.nodeId]?c.a.getState().chats.drafts[e.nodeId]:{}),{},{reply:U._id})))}))},onMouseLeave:J}),!U.deleted&&"comment"===U.type&&U.user&&U.user._id&&U.user._id===l._id&&parseInt(U.created_at)>parseInt(_()().unix("x"))-180?a.a.createElement(E.a,{id:"chat_message_delete",title:Object(S.r)("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){oe()},size:"18px",transparent:!0}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),P?a.a.createElement(Yt.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:P},a.a.createElement("div",{className:"forwardMessage"},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(at,{title:Object(S.r)("$__forwardMessage",1),icon:"forward",onCancel:function(){$(!1)}})),a.a.createElement("div",{style:{padding:15}},a.a.createElement(Ht,{hideSelected:!0,avatarSize:"33px",permission:e.permission,noLimit:!0,ignoreId:e.nodeId?e.nodeId:e.storie.idRel?e.storie.idRel:null,nodeId:e.nodeId,onSelect:function(e){W(e)}})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){$(!1),W(null)}}),H&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__forward"),text:Object(S.r)("$__forward"),icon:"forward",size:"25px",load:!!B,onClick:function(){Y(!0),function(e,t){e&&e.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket;var r=c.a.getState(),n=(r.db,r.session,Object(d.a)(Object(d.a)({},t),{},{forwardedId:t._id,_id:Object($t.a)(),created_at:"".concat(_()().tz("America/Sao_Paulo").unix("x"))}));n._reactions&&delete n._reactions,n.readedBy&&delete n.readedBy,n._reactions&&delete n._reactions,n._toUser&&delete n._toUser,t._forwardToId.map((function(t){Lr(e,{comment:Object(d.a)(Object(d.a)({},n),{},{idRel:t}),node:t}),console.log(n),ut.a.post("timeline/add",Object(d.a)(Object(d.a)({},n),{},{idRel:t}))}))}(e,Object(d.a)(Object(d.a)({},U),{},{_forwardToId:H})),setTimeout((function(){$(!1),W(null),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{db:"users",nodeId:H[0],loading:!1})),Y(!1)}),6e3)}}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}}))})));var ca=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(pe)((function(e){var t=e.classes,r=c.a.getState(),n=(r.db,r.lightBox,a.a.useState(!1)),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],p=(u[1],a.a.useState(!1)),f=Object(h.a)(p,2),m=(f[0],f[1],a.a.useState(null)),g=Object(h.a)(m,2),b=(g[0],g[1],a.a.useState(null)),v=Object(h.a)(b,2),y=(v[0],v[1],a.a.useState(!0)),x=Object(h.a)(y,2),_=(x[0],x[1],a.a.useState(.5)),O=Object(h.a)(_,2);return O[0],O[1],a.a.useEffect((function(){i||l(!0)})),c.a.getState().lightBox.miro||c.a.getState().lightBox.miroBoard?c.a.getState().lightBox.miro||c.a.getState().lightBox.miroBoard?a.a.createElement(j.a,{className:t.backdrop,open:c.a.getState().lightBox.miro},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.btClose},a.a.createElement(ae.a,{title:Object(S.r)("$__close","*"),color:Object(S.d)("light"),onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}},"close"))),a.a.createElement("div",{className:t.content,style:{zIndex:1e3}},d?a.a.createElement("div",{className:t.loader},a.a.createElement(ue.a,null)):a.a.createElement("iframe",{style:{position:"absolute",width:"100%",height:"100%"},src:"https://miro.com/app/live-embed/".concat(c.a.getState().lightBox.miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):null:a.a.createElement(a.a.Fragment,null)}))),la=r(153);var sa=function(e){return a.a.createElement("div",{id:"sideModule_closeButton",style:Object(d.a)({position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"},e.style?e.style:{})},e.saveLoader&&a.a.createElement(a.a.Fragment,null,a.a.createElement(la.a,{size:"25px"})),!e.saveLoader&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{id:"sideModule_saveOptions",style:{display:"flex"}},e.save&&a.a.createElement(E.a,{id:"sideModule_saveButton",title:Object(S.r)("$__save",1),color:Object(S.d)("color"),icon:"save",onClick:function(){e.save()},size:"25px"}),e.saveClose&&a.a.createElement(E.a,{id:"sideModule_saveAndCloseButton",title:Object(S.r)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&a.a.createElement(E.a,{title:Object(S.r)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},ua=function(){return{lock:{position:"fixed",top:"0px",left:"0px",right:"0px",bottom:"0px",height:"100vh",zIndex:"3000 !important"},backdrop:{position:"fixed",top:"0px",left:"0px",right:"440px",bottom:"0px",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)"},module:Object(d.a)(Object(d.a)({},W.l),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"30%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(d.a)(Object(d.a)({},W.l),{},{width:"70vw",position:"absolute",zIndex:"1100",left:"calc(50% - 35vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",top:"calc(50% - 40vh)",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleExpanded:Object(d.a)(Object(d.a)({},W.l),{},{width:"90vw",position:"absolute",zIndex:"1100",left:"calc(50% - 45vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleFullScreen:Object(d.a)(Object(d.a)({},W.l),{},{width:"100vw",position:"absolute",zIndex:"1100",left:"0px",backgroundColor:"rgba(255,255,255,1)",height:"100vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),menu:{position:"absolute",left:"0px",width:"45px",top:"0px",bottom:"0px",textAlign:"center"},content:{position:"absolute",top:"80px",left:"45px",bottom:"0px",right:"0px",padding:"0px",overflowY:"auto",overflowX:"hidden",zIndex:1},menuButtons_resume:{margin:"0px auto 27px auto",height:"40px"},MenuButton:{margin:"auto auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},MenuButton_arrow:{position:"absolute",right:"-8px",fontSize:"16px",transform:"rotate(180deg)"},subTitle:{position:"absolute",left:"45px",right:"0px",padding:"4px 10px",top:"47px",backgroundColor:Object(S.d)("color"),color:Object(S.d)("light")}}},da=r(58),pa=r.n(da),fa=r(266),ha=r(263),ma={messagesContainer:{height:"100%",width:"100%"}};function ga(){ga=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ba=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.messages,r=e.type,o=e.nodeId,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=Object(n.useRef)({}),x=Object(n.useRef)({}),_=Object(n.useRef)({});a.a.useLayoutEffect((function(){k(!0)}),[e.nodeId,e.type]),Object(n.useEffect)((function(){var e,r;t.length>0&&((!b||(null===x||void 0===x||null===(e=x.current)||void 0===e?void 0:e.messagesLength)&&t.length>x.current.messagesLength)&&(x.current=Object(d.a)(Object(d.a)({},x.current),{},{mounted:!0,loading:!1,messagesLength:t.length},b?{}:{length:t.length}),k(!0),(null===(r=x.current)||void 0===r?void 0:r.mounted)&&setTimeout((function(){u(!1)}),1e3)));return function(){x.current=Object(d.a)(Object(d.a)({},x.current),{},{mounted:!1,loading:!1,messagesLength:t.length},b?{}:{length:t.length})}}),[t,b]);var O=t.filter((function(e){return e.type===r&&e.user._id!==c.a.getState().session._id&&(!e.readedBy||e.readedBy&&!e.readedBy[c.a.getState().session._id])})).length,w=function(){var t=Object(p.a)(ga().mark((function t(){var n,a;return ga().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b&&!b.lock&&(null===x||void 0===x||null===(n=x.current)||void 0===n?void 0:n.length)&&O>0&&(a=c.a.getState().functions.socket,Sr(e,{readedBy:c.a.getState().session._id,id:o,db:e.db,type:r}),a.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:c.a.getState().session._id,id:o,db:e.db,type:r}),c.a.getState().chats.unreadeds[e.nodeId]&&e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{unreadeds:Object(d.a)(Object(d.a)({},c.a.getState().chats.unreadeds),{},Object(f.a)({},e.nodeId,0))})));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){var r=Object(p.a)(ga().mark((function r(){var n,a,o,i;return ga().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().db.users[e.nodeId]?"users":"cards",null===x||void 0===x||null===(n=x.current)||void 0===n?void 0:n.timelineEnd){r.next=6;break}return r.next=4,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:a,type:"comment",limit:!0,skip:t.length});case 4:(o=r.sent)&&(i=Object(d.a)(Object(d.a)({},x.current),{},{length:t.length+o.total}),o.total<20&&(i=Object(d.a)(Object(d.a)({},i),{},{timelineEnd:!0})),x.current=Object(d.a)({},i));case 6:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();function E(e){var r=t[e];return _.current[r._id]+11||83}function S(r){var n,o=r.index,i=r.style,l=t[o];return a.a.createElement("div",{style:i},a.a.createElement(ia,{storie:l,openLightBox:function(t){e.openLightBox(t)},hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId,showUserName:!!(null===(n=c.a.getState().db)||void 0===n?void 0:n.cards[e.nodeId]),onResize:function(e){!function(e,t){var r;_.current=Object(d.a)(Object(d.a)({},_.current),{},Object(f.a)({},e,t)),(null===y||void 0===y||null===(r=y.current)||void 0===r?void 0:r.resetAfterIndex)&&y.current.resetAfterIndex(0)}(l._id,e)}}))}function k(){var e,r,n,a,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=t.length-1,c="end",l=x.current.length||0,s=(null===x||void 0===x||null===(e=x.current)||void 0===e?void 0:e.visibleStopIndex)||0;!o&&b&&(null===x||void 0===x||null===(r=x.current)||void 0===r?void 0:r.lock)&&(null===x||void 0===x||null===(n=x.current)||void 0===n?void 0:n.length)&&(c="end",i=t.length-l+s+1),(null===y||void 0===y||null===(a=y.current)||void 0===a?void 0:a.scrollToItem)?y.current.scrollToItem(i,c):setTimeout((function(){k(!0)}),100)}var L=setTimeout((function(){}),15e3),C=function(e,r){var n,a,o=Object(d.a)(Object(d.a)({},x.current),e);!b&&t.length>0&&e.visibleStopIndex+1===t.length&&((null===(n=x.current)||void 0===n?void 0:n.mounted)&&v(!0));(b&&e.visibleStopIndex<t.length-2&&t.length>10&&(o=Object(d.a)(Object(d.a)({},o),{},{lock:!0})),b&&e.visibleStopIndex+1===t.length&&(o=Object(d.a)(Object(d.a)({},o),{},{lock:!1}),setTimeout((function(){w()}),100)),b&&x.current&&!s&&!x.current.loading&&e.visibleStartIndex<10)?(clearTimeout(L),(null===(a=x.current)||void 0===a?void 0:a.mounted)&&u(!0),o=Object(d.a)(Object(d.a)({},o),{},{loading:!0,lock:!0}),L=setTimeout((function(){j()}),1e3)):(e.overscanStopIndex,t.length);x.current=Object(d.a)({},o)};return a.a.createElement("div",{style:ma.messagesContainer},a.a.createElement(ha.a,{style:ma.messagesContainer},(function(e){var r=e.height,n=e.width;return a.a.createElement(fa.b,{className:"List",height:r,itemCount:t.length,itemSize:E,ref:y,width:n,onItemsRendered:C,overscanCount:33,onScroll:function(e){console.log(e)}},S)})),O>0?a.a.createElement("div",{style:{position:"absolute",bottom:"33px",right:"15px",width:"33px",height:"33px"}},a.a.createElement(Ee,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){k(!0)}})):a.a.createElement(a.a.Fragment,null))})),va={};function ya(){ya=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var xa=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){var t=a.a.useState(""),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],d=a.a.useState([]),f=Object(h.a)(d,2),m=f[0],g=f[1],b=c.a.getState(),v=(b.db,b.functions.socket,window.location.hash.split("/"));v[0]=v[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return y()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var y=function(){var t=Object(p.a)(ya().mark((function t(){var r;return ya().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,console.log({text:e.text.trim(),nodeId:e.nodeId,db:e.db,type:"comment"}),t.next=4,dt.a.post("/M_Timeline_Search",{text:e.text.trim(),nodeId:e.nodeId,db:e.db,type:"comment"});case 4:(r=t.sent)&&r.data&&(e.onFinish&&e.onFinish(),g(r.data),u(!1)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("COMPONENTS/TIMELINE/SEARCH/MESSAGES/SearchMessages():::",t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%",maxHeight:"70vh"}},a.a.createElement("div",{style:{positin:"relative",width:"100%"}},s&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Or,null)),a.a.createElement(un,null,Object.keys(m).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},Object.keys(m).map((function(t,r){return a.a.createElement("div",{key:t,style:{position:"relative",float:"left",width:"calc(100% - 20px)",marginLeft:"10px",marginRight:"10px",marginBottom:"22px",clear:"both"}},a.a.createElement(ia,{messageClick:e.onAction?function(){}:null,searchText:e.text.trim(),storie:m[t],hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))}))))))})));var _a=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){c.a.getState().db;var t,r=a.a.useState(""),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=s[1],p=a.a.useState(!1),m=Object(h.a)(p,2),g=m[0],b=m[1],v=window.location.hash.split("/");return v[0]=v[0].replace("#",""),a.a.createElement("div",{style:{position:"relative",zIndex:10,padding:10,backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"25px"}},u?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__searchInChat"),variant:Object(S.d)("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"close",color:"lightgray",onClick:function(){i(""),b(!1),d(!1)}})),onChange:function(e,t){i(e.target.value),b(!0)},onBlur:function(){""===o&&(i(""),b(!1),d(!1))}},placeholder:Object(S.r)("$__searchInChat"),value:Object(S.p)(o).toLowerCase(),autoFocus:!0})):a.a.createElement(E.a,{title:Object(S.r)("$__search",1),color:"grey",icon:"search",onClick:function(e){d((function(e){return!e}))},transparent:!0}),""!==o&&o.length>1&&g&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(Or,null)),""!==o&&o.length>1&&a.a.createElement("div",{style:(t={position:"absolute",top:"50px",right:"15px",backgroundColor:"#FFFFFF",maxHeight:"calc(100vh - 60px)",height:"auto",overflow:"hidden",overflowY:"auto",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.1)"},Object(f.a)(t,"maxHeight","90vh"),Object(f.a)(t,"maxWidth","666px"),Object(f.a)(t,"zIndex",2001),t)},a.a.createElement(xa,{nodeId:e.nodeId,db:e.db,text:o,onFinish:function(e){b(!1)},onAction:function(t){e.onAction&&e.onAction(t),i(""),b(!1),d(!1)}})))})));function Oa(){Oa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var wa=Object(z.a)(Mn),ja=Object(s.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=wa(),r=c.a.getState().session,n=a.a.useState(!1),o=Object(h.a)(n,2),i=o[0],l=o[1],s=e.timeline,u=e.type||"comment",f=e.nodeId?c.a.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{},m=c.a.getState().db.users[e.nodeId]?"users":"cards",g=[],b=[];c.a.getState().db.cards[e.nodeId]&&s[e.nodeId]&&Object.keys(s[e.nodeId]).map((function(t){return b.push(s[e.nodeId][t])}));"kpi"===u&&function e(t){Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===t&&c.a.getState().db.cards[e].kpi_useParent&&c.a.getState().db.cards[e].kpi_type===c.a.getState().db.cards[t].kpi_type})).map((function(t){c.a.getState().timeline[t]&&Object.keys(c.a.getState().timeline[t]).filter((function(e){return"kpi"===c.a.getState().timeline[t][e].type&&!c.a.getState().timeline[t][e].deleted})).map((function(e){return b.push(c.a.getState().timeline[t][e])})),e(t)}))}(e.nodeId),c.a.getState().db.users[e.nodeId]&&(s&&s[r._id]&&Object.keys(s[r._id]).filter((function(t){return s[r._id]&&s[r._id][t]&&s[r._id][t].user&&s[r._id][t].user._id===e.nodeId&&0===b.filter((function(e){return e._id===t})).length})).map((function(e){b.push(s[r._id][e])})),s&&s[e.nodeId]&&Object.keys(s[e.nodeId]).filter((function(t){return s[e.nodeId]})).map((function(t){b.push(s[e.nodeId][t])})),b=Object.keys(b).sort((function(e,t){return parseInt(b[e].created_at)<parseInt(b[t].created_at)?-1:parseInt(b[e].created_at)>parseInt(b[t].created_at)?1:0})).filter((function(t){return b[t].user&&b[t].user._id&&(b[t].user._id===r._id||b[t].user._id===e.nodeId)})).map((function(e){return b[e]}))),e.kpi_type&&(b=Object.keys(b).filter((function(t){return b[t].kpi_type===e.kpi_type||b[t].reply})).map((function(e){return b[e]})));var v=f&&f.kpi_ini?parseFloat(f.kpi_ini):0;a.a.useEffect((function(){var t=!0,r=function(){var t=Object(p.a)(Oa().mark((function t(){var r;return Oa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.type?e.type:"comment",t.next=3,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(d.a)({ids:e.nodeId,db:m,type:r},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:b.filter((function(e){return e.type===r})).length>0?b.filter((function(e){return e.type===r})).length-1:0,reqChildrens:!1}));case 3:l(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return t&&b.filter((function(e){return e.type===u})).length<10&&(l(!0),r()),function(){t=!1}}),[u,e.nodeId]);var y=Object.keys(b).length>0&&Object.keys(b).filter((function(e){if((!b[e].deleted||b[e].deleted&&b[e].user&&b[e].user._id&&b[e].user._id===r._id)&&(b[e].type===u||b[e].reply&&Object.keys(b).filter((function(t){return b[t]&&b[t]._id===b[e].reply&&b[t].type===u})).length>0))return!0})).sort((function(e,t){return b[e].created_at<b[t].created_at?-1:b[e].created_at>b[t].created_at?1:0})).map((function(e){var t=b[e];return v=parseFloat(parseFloat(v)+parseFloat(t.value)),t.balance=v,t.files&&Object.keys(t.files).length>0&&Object.keys(t.files).map((function(e,r){var n=t.files[e];g.push(n)})),t}));return a.a.createElement("div",null,a.a.createElement("div",{className:t.timeline},a.a.createElement("div",{className:e.showHeader?t.timelineSimpleWithHeader:t.timelineSimple,style:{zIndex:1}},y&&y.length>0?a.a.createElement(ba,{messages:y,hideCards:!!e.hideCards,db:e.db,type:u,nodeId:e.nodeId,openLightBox:function(t){var r;r=t,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:g,file:r})}}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),i?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250,250,250,0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10}},a.a.createElement(xe,null)):e.noSearch?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",top:0,right:0}},a.a.createElement(_a,{db:m,nodeId:e.nodeId,onAction:function(e){}}))))})),Ea=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.nodeId,r=c.a.getState().session,n=c.a.getState().db.users[t]?"users":"cards",o=!!e.disabledSend&&e.disabledSend;return t&&e.disabledSend&&(!c.a.getState().db.cards[t]||c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].onlyAdminsSendMessages&&c.a.getState().db.cards[t]._users&&c.a.getState().db.cards[t]._users[r._id]&&c.a.getState().db.cards[t]._users[r._id].access<4)&&(o=!0),"users"===n&&c.a.getState().db.users&&c.a.getState().db.users[t]&&c.a.getState().db.users[t].deleted&&(o=!0),a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto"}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:o?"0px":"70px"}},a.a.createElement($,null,a.a.createElement(ja,e))),o?c.a.getState().db.cards[t]&&"chatGroup"===c.a.getState().db.cards[t].type?a.a.createElement("div",{style:{position:"absolute",alignItems:"center",textAlign:"center",bottom:0,left:0,right:0,padding:15,backgroundColor:"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(240,240,240, 1))",justifyContent:"center",fontSize:"16px",fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.r)("$__onlyAdminsCanSendMessages",1)):a.a.createElement(a.a.Fragment,null):a.a.createElement($,null,a.a.createElement(gn,{db:e.db?e.db:"cards",nodeId:t,editorStyle:{padding:"7px"}})))})),Sa=r(1843);function ka(){ka=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var La=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=function(){var t=Object(p.a)(ka().mark((function t(r,n){var a,o,i;return ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n,o=c.a.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,a.map(function(){var t=Object(p.a)(ka().mark((function t(r,n){var i,l,s,u;return ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.value||!e.dbNode||0!==o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length){t.next=7;break}return t.next=3,ut.a.post(e.api?e.api:"node/add/".concat(e.dbNode),{name:r.trim(),secondaryParent:e.secondaryParent?e.secondaryParent:null});case 3:(i=t.sent)&&(l=i&&i.data&&i.data.id?i.data.id:i.data.value,0===o.filter((function(e){return e.value===l})).length&&(o.push({value:l,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},Object(f.a)({},e.dbNode,o)))),0===a.filter((function(e){return e.value===l})).length&&(a.splice(n,1),a.push({value:l,label:r}))),t.next=8;break;case 7:o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length>0&&(s=o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label}))[0])&&0===a.filter((function(e){return e.value===s.value})).length&&(a.splice(n,1),a.push({value:s.value,label:s.label}));case 8:return u=[],a.filter((function(e){e&&e.value&&u.push(e)})),a=Array.from(u),t.abrupt("return",a);case 12:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:i=t.sent,Promise.all(i).then((function(){e.onChange&&e.onChange(r,a)})),t.next=10;break;case 9:e.onChange&&e.onChange(r,a);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),r=Object(d.a)({},e);return String(e.dbNode)&&delete r.dbNode,String(e.onChange)&&delete r.onChange,String(e.store)&&delete r.store,String(e.ownProps)&&delete r.ownProps,String(e.reduxFunction)&&delete r.reduxFunction,String(e.ws)&&delete r.ws,String(e.add)&&delete r.add,(e.inNode||"undefined"===String(e.inNode)||"null"===String(e.inNode))&&delete r.inNode,(e.InputProps||"undefined"===String(e.InputProps)||"null"===String(e.InputProps))&&delete r.InputProps,(e.dark||"undefined"===String(e.dark)||"null"===String(e.dark))&&delete r.dark,(e.endAdornment||"undefined"===String(e.endAdornment)||"null"===String(e.endAdornment))&&delete r.endAdornment,(e.startAdornment||"undefined"===String(e.startAdornment)||"null"===String(e.startAdornment))&&delete r.startAdornment,(e.secondaryParent||"undefined"===String(e.secondaryParent)||"null"===String(e.secondaryParent))&&delete r.secondaryParent,a.a.createElement(Sa.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))})),Ca=Object(de.a)((function(e){return{root:{border:"none",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.05)","& .MuiIcon-root":{color:"rgba(250,250,250,0.33)"},"& .MuiIcon-root:hover":{color:"rgba(250,250,250,0.77)"},padding:0}}}))(Dr.a);function Ia(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1];return a.a.createElement(Ca,{style:Object(d.a)(Object(d.a)({},e.style?e.style:{}),n?{}:{paddingLeft:10,paddingRight:10}),deleteIcon:e.deleteIcon?e.deleteIcon:null,label:e.label,onMouseOver:function(){o(!0)},onMouseLeave:function(){o(!1)},onDelete:e.onDelete&&n?function(){e.onDelete()}:null,onClick:e.onClick?function(t){e.onDelete()}:null})}var Ta=Object(de.a)({root:Object(d.a)(Object(d.a)({},W.l),{},{padding:0,width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{marginTop:"-10px",fontSize:"12px",color:Object(S.d)("color")},"& label.MuiFormLabel-filled":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?0:"filled"===Object(S.d)("fieldVariant")?"-15px":0,borderRadius:Object(S.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}})})(et.a),Fa=r(747),Na={labelTop:Object(d.a)(Object(d.a)({},W.l),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{marginTop:"-10px",fontSize:"12px",color:Object(S.d)("color")},"& label.MuiFormLabel-filled":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?"0px":"filled"===Object(S.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(S.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}}),noLabel:Object(d.a)(Object(d.a)({},W.l),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{textAlign:"right",fontSize:"12px",color:Object(S.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(S.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}}),labelTopLight:Object(d.a)(Object(d.a)({},W.l),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{marginTop:"-10px",fontSize:"12px",color:Object(S.d)("color")},"& label.MuiFormLabel-filled":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?"0px":"filled"===Object(S.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}}),noLabelLight:Object(d.a)(Object(d.a)({},W.l),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px"},"& label":{textAlign:"right",fontSize:"12px",color:Object(S.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}})},Da=Object(z.a)(Na);var Aa=function(e){var t=Da(),r=a.a.useState([]),n=Object(h.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){i(e.value)}),[e.value]);var c=function(t){var r=Array.from(o);r.splice(r.findIndex((function(e){return e.value===t.value})),1),i(r),e.onChange&&e.onChange(r)};return a.a.createElement(La,{className:e.dark?e.noLabel?t.noLabel:t.labelTop:e.noLabel?t.noLabelLight:t.labelTopLight,value:o,options:e.options||[],getOptionLabel:function(e){return e&&e.label?Object(S.r)(e.label,1):""},name:"autoComplete_".concat(e.name||""),style:{width:"100%"},multiple:e.multiple||!1,limitTags:e.multiple?e.limitTags?e.limitTags:2:null,freeSolo:e.freeSolo||!1,disableClearable:e.disableClearable||!1,disabled:e.disabled,renderInput:function(t){return e.dark?a.a.createElement(Ta,Object.assign({},t,{label:Object(S.r)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(d.a)(Object(d.a)({},t.InputProps),e.InputProps)})):a.a.createElement(tt,Object.assign({},t,{label:Object(S.r)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(d.a)(Object(d.a)({},t.InputProps),e.InputProps)}))},renderOption:function(t){var r,n;return a.a.createElement("div",{style:Object(d.a)({zIndex:3e3},(null===(r=e.options.filter((function(e){return e.value===t.parent}))[0])||void 0===r?void 0:r.color)?{paddingLeft:7,borderLeft:"solid 3px ".concat(null===(n=e.options.filter((function(e){return e.value===t.parent}))[0])||void 0===n?void 0:n.color)}:{})},t.parent&&e.options.filter((function(e){return e.value===t.parent})).length>0?a.a.createElement("div",{style:{fontSize:10,color:"gray"}},e.options.filter((function(e){return e.value===t.parent}))[0].label):a.a.createElement(a.a.Fragment,null),t.label)},renderTags:function(t,r){return t.map((function(t,r){return a.a.createElement("div",{key:r},e.colorPicker&&t&&t.label?a.a.createElement(De.a,{label:t&&t.label?t.label:null,color:t.color,_id:t.value,onChange:function(r){var n=t;n.color=r,e.colorPickerCallBack&&e.colorPickerCallBack(n)}},a.a.createElement(Ia,{label:t&&t.label?t.label:null,style:{backgroundColor:t.color||"#b7b7b7",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:Object(S.q)(t.color||"#b7b7b7",!0)},deleteIcon:a.a.createElement(Fa.a,{style:{color:Object(S.q)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}})):t&&t.label?a.a.createElement(Ia,{label:t&&t.label?t.label:null,style:{backgroundColor:t.color||"#b7b7b7",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:Object(S.q)(t.color||"#b7b7b7",!0)},deleteIcon:a.a.createElement(Fa.a,{style:{color:Object(S.q)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}}):a.a.createElement(a.a.Fragment,null))}))},onChange:function(t,r){e.onChange&&e.onChange(r);var n=[];e.multiple?(r.map((function(e){e&&e.label?n.push(e):n.push({label:e})})),i(n)):i(r)},dbNode:e.dbNode?e.dbNode:"tag",add:!(!e.add||!0!==e.add),inNode:e.inNode?e.inNode:null,secondaryParent:e.secondaryParent?e.secondaryParent:null,ws:!0,api:e.api?e.api:null})},Pa={instruction:{},picture:{}};function $a(){$a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var za=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Pa)((function(e){var t,r=a.a.useState((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.values)||[]),n=Object(h.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.filter((function(e){return e.value})).map((function(e){t.push(e)})),i(t)}}),[e.data]);var c=function(){var t=Object(p.a)($a().mark((function t(r){return $a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),i(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Aa,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:e.options?e.options:[],style:{width:"100%"},name:e.name?e.name:"multInput",ws:!0,add:!0,colorPicker:!0,multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:o,placeholder:e.placeholder||null,onChange:function(e){c(e)},colorPickerCallBack:function(t){e.colorPickerCallBack&&e.colorPickerCallBack(t)}}))}))),Ma=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",display:"flex"},root:{position:"absolute",top:"0px",bottom:"0px",left:"0px",right:"0px",overflowX:"auto"},image:{width:"100%",paddingTop:"48%",backgroundPosition:"center",backgroundSize:"cover"},data:{marginTop:"10px",padding:"10px",overflowX:"auto","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")},accessDescription:{fontSize:"14px",color:Object(S.d)("medium")}}};function Ba(){Ba=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ya=Object(s.b)((function(e,t){return{tag:e.db.tag,userGroup:e.db.userGroup,sideModule:e.sideModule}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){var t=e.classes,r=c.a.getState(),o=r.sideModule,i=r.db,l=r.session,s=i.users,u=i.dataType,m=o.data,g=Object(n.useState)(m),b=Object(h.a)(g,2),v=b[0],y=(b[1],a.a.useState(!Object(S.s)(m&&m.email?m.email:""))),x=Object(h.a)(y,2),_=x[0],O=x[1],w=Object(S.j)(),j=JSON.stringify(v)!==JSON.stringify(m),E=function(t){var r=t.value,n=Object(d.a)(Object(d.a)({},m),{},Object(f.a)({},t.name,r));!r&&n[t.name]&&delete n[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:n}))},k=function(t){j&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},L=function(){var t=Object(p.a)(Ba().mark((function t(r){var n;return Ba().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,bt(m.email);case 2:if(n=t.sent,m.name){t.next=7;break}Object(S.c)({message:Object(S.r)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 7:if(-1!==u.filter((function(e){return e.name===m.type}))[0].disabledFields.indexOf("email")||!_){t.next=11;break}Object(S.c)({message:_,variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 11:if(-1!==u.filter((function(e){return e.name===m.type}))[0].disabledFields.indexOf("email")||!(!Object(S.s)(o.data.email)||s[m._id]&&m.email!==s[m._id].email&&n)){t.next=15;break}O(Object(S.r)("$__invalidEmail",1)),t.next=19;break;case 15:return t.next=17,ht(e);case 17:t.sent&&(Object(S.c)({message:Object(S.r)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&k(!0));case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=!1;return(m._id===l._id||w&&w.user&&(w.userAdmin||w.userEdit))&&(C=!0),a.a.createElement("div",null,a.a.createElement(sa,{save:C&&j?function(){return L()}:null,saveClose:C&&j?function(){return L(!0)}:null,close:function(){return k(!0)}}),C||!C&&o.data.image,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(kn,{maxWidthOrHeight:600,img:o.data&&o.data.image?o.data.image:null,onChange:C?function(e,t){E({name:"file",value:t})}:null,avatar:!0,avatarIcon:m.type&&"user"!==m.type?m.type&&"group"!==m.type?"business":"groups":"person"})),a.a.createElement("form",{className:t.data,autoComplete:"off",id:"sideModule_user_data"},a.a.createElement(tt,{id:"sideModule_user_fullName",label:Object(S.r)("$__fullName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"person"})),onChange:function(e){E(e.target)},onBlur:function(e){if(m&&!m.name){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";E({name:"name",value:t.trim()})}}},value:m&&m.fullName?m.fullName:"",placeholder:Object(S.r)("$__fullName",1),autoFocus:!0,disabled:!C}),a.a.createElement(tt,{id:"sideModule_user_displayName",label:Object(S.r)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_comfy_ind"})),onChange:function(e){E(e.target)},onBlur:function(e){E(e.target)}},value:m&&m.name?m.name:"",placeholder:Object(S.r)("$__displayName",1),disabled:!C}),-1===u.filter((function(e){return e.name===m.type}))[0].disabledFields.indexOf("email")&&a.a.createElement(tt,{id:"sideModule_user_email",label:Object(S.r)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",helperText:_,InputProps:{autoComplete:"new-password",className:!_&&m.email&&Object(S.s)(m&&m.email?m.email:"")?"":"invalid",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"alternate_email"})),onChange:function(e){O(null),E(e.target)},onBlur:function(){var e=Object(p.a)(Ba().mark((function e(t){var r;return Ba().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m._id&&"new"!==m._id&&s[m._id]&&s[m._id].email!==t.target.value||!m._id||"new"===m._id)){e.next=9;break}if(!Object(S.s)(t.target.value)||s[m._id]&&t.target.value===s[m._id].email){e.next=8;break}return e.next=4,bt(t.target.value);case 4:r=e.sent,O(r?Object(S.r)("$__emailAlreadyExists",1):null),e.next=9;break;case 8:O(Object(S.r)("$__invalidEmail",1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:m&&m.email?m.email:"",placeholder:Object(S.r)("$__email",1),disabled:!C}),C&&w&&w.user&&(w.userAdmin||w.userEdit)?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_tags"},a.a.createElement(za,{data:{values:m.tags||[],_id:m._id},options:c.a.getState().db.tag?c.a.getState().db.tag:[],placeholder:"$__tagsPlaceholder",dbNode:"tag",callBack:function(e){E({name:"tags",value:e})},secondaryParent:m._parent,colorPickerCallBack:function(e){c.a.getState().functions.socket.emit("tag.UPD",e)}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(za,{data:{values:m.groups||[],_id:m._id},options:c.a.getState().db.userGroup?c.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){E({name:"groups",value:e})},secondaryParent:m._parent,colorPickerCallBack:function(e){}}))):a.a.createElement(a.a.Fragment,null)))})));function Ra(e){var t=a.a.useState({cPassword:"",password:""}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(h.a)(i,2),l=c[0],s=c[1],u=a.a.useState(0),p=Object(h.a)(u,2),f=p[0],m=p[1],g=a.a.useState(0),b=Object(h.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){e.clear&&e.clear!==v&&(y(e.clear),o({cPassword:"",password:""}),s(!1))}));return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.r)("$__passwordTip_1")),a.a.createElement("p",null,Object(S.r)("$__passwordTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.r)("$__passwordTip_3")),a.a.createElement("li",null,Object(S.r)("$__passwordTip_4")),a.a.createElement("li",null,Object(S.r)("$__passwordTip_5")),a.a.createElement("li",null,Object(S.r)("$__passwordTip_6")),a.a.createElement("li",null,Object(S.r)("$__passwordTip_7")))),a.a.createElement(tt,{label:Object(S.r)("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},{password:e.target.value})),function(e){var t=[];t.push("[$@$!%*#?&]"),t.push("[A-Z]"),t.push("[0-9]"),t.push("[a-z]");for(var r=0,n=0;n<t.length;n++)new RegExp(t[n]).test(e)&&r++;switch(r){case 0:m(0);break;case 1:m(1);break;case 2:m(2);break;case 3:m(3);break;case 4:m(4)}e.length<8&&m(0)}(e.target.value),f>2&&n.password===e.target.value?s(!0):s(!1)}},value:n.password}),a.a.createElement(tt,{label:Object(S.r)("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{color:l?"green":"lightgray"},l?"verified":"check")),autoComplete:"new-password",onChange:function(t){o(Object(d.a)(Object(d.a)({},n),{},{cPassword:t.target.value})),f>2&&n.password===t.target.value?(s(!0),e.onConfirmed(t.target.value)):(s(!1),e.onConfirmed(null))}},value:n.cPassword}),n.password&&f>0&&a.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",marginBottom:"7px",padding:"3px 0"}},1===f?Object(S.r)("$__passwordTooWeak",1):2===f?Object(S.r)("weakPassword",1):3===f?Object(S.r)("$__goodPassword",1):4===f?Object(S.r)("$__veryGoodPassword",1):null),n.password&&a.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",height:"13px",padding:"3px 0",border:"1px solid rgba(0,0,0,0.1)"}},f>=0&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"red",margin:"0 3px"}}),f>=1&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(129,153,179)",margin:"0 3px"}}),f>=2&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(95,151,254)",margin:"0 3px"}}),f>=3&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(42,66,255)",margin:"0 3px"}}),4===f&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(38,165,45)",margin:"0 3px"}})))}var Ga=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},image:{width:"100%",backgroundColor:"rgb(0,88,0)",paddingTop:"45%"},data:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",marginTop:"10px",padding:"10px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};function Ha(){Ha=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Wa=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){var t,r=e.classes,n=c.a.getState(),o=n.sideModule,l=n.session,s=n.functions,u=n.db,m=s.socket,g=o.data,b=a.a.useState(g),v=Object(h.a)(b,2),y=v[0],x=(v[1],a.a.useState(!1)),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(null),E=Object(h.a)(j,2),k=E[0],L=E[1],C=a.a.useState(0),I=Object(h.a)(C,2),T=I[0],F=I[1],N=Object(S.j)(),D=function(t){return w(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:Object(d.a)(Object(d.a)({},o.data),{},{_access:Object(d.a)(Object(d.a)({},o.data._access),{},Object(f.a)({},t.name,t.value))})})),!0},A=function(t){var r={_id:g._id,isAdmin:t};try{c.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}},P=function(t){!t&&O?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},$=function(){var t=Object(p.a)(Ha().mark((function t(r){return Ha().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return w(!1),t.next=3,mt(e);case 3:t.sent&&(Object(S.c)({message:Object(S.r)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),A(!g._access.admin||null),r&&P(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),z=function(){var e=Object(p.a)(Ha().mark((function e(){return Ha().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m.emit("data",{module:"user",method:"post",action:"accessSendInvite"},{_id:c.a.getState().sideModule.data._id,name:c.a.getState().sideModule.data.name,email:c.a.getState().sideModule.data.email},(function(){Object(S.c)({message:Object(S.r)("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=Object(p.a)(Ha().mark((function e(){return Ha().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ut.a.post("/user/new-password",{userId:g._id,password:k});case 3:e.sent&&(L(null),Object(S.c)({message:Object(S.r)("$__passwordChanged",1),variant:null,persist:!1,horizontal:"right",confirm:null})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Object(S.c)({message:"".concat(Object(S.r)("$__invalidRequest",1)," | ").concat(Object(S.r)("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"right",confirm:null});case 10:F(T+1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),B=(u.plans[0].settings.space,u.plans[0]);l&&l.GlobalData&&String(l.GlobalData.plan)&&u.plans.filter((function(e){return e.value===l.GlobalData.plan})).length>0&&u.plans.filter((function(e){return e.value===l.GlobalData.plan}))[0].settings&&(u.plans.filter((function(e){return e.value===l.GlobalData.plan}))[0].settings.space,B=u.plans.filter((function(e){return e.value===l.GlobalData.plan}))[0]);var Y=1;B&&B.settings&&B.settings.admins&&(Y=parseInt(B.settings.admins)),l&&l.GlobalData&&l.GlobalData.customAdmins&&(Y=parseInt(l.GlobalData.customAdmins));var R=Object.keys(u.users).filter((function(e){return u.users[e]&&e!==g._id&&u.users[e]._access&&u.users[e]._access.admin&&(!u.users[e]._parent||u.users[e]._parent&&u.users[u.users[e]._parent]&&!u.users[u.users[e]._parent].independentAccount)})).length||0;return g._access&&g._access.owner&&l._id!==g._id||l._id===g._id?a.a.createElement("div",null,a.a.createElement(sa,{save:O?function(){return $()}:null,saveClose:O?function(){return $(!0)}:null,close:function(){return P(!0)}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(Ra,{onConfirmed:function(e){L(e)},clear:T})),k&&a.a.createElement("div",{style:(t={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"justifyContent","center"),Object(f.a)(t,"borderRadius","7px"),t),onClick:function(){M()}},a.a.createElement(Ee,{icon:"save",text:Object(S.r)("$__save","*"),title:!Object(S.r)("$__save","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")})))):(console.log(Y,R),a.a.createElement("div",null,a.a.createElement(sa,{save:O?function(){return $()}:null,saveClose:O?function(){return $(!0)}:null,close:function(){return P(!0)}}),a.a.createElement("div",{className:r.data},a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.enabled),onChange:function(e){D({name:"enabled",value:!g._access||!g._access.enabled})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__permitPlataformAccess",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__userAccess_PlataformAccessDescription",1)))),g._access&&"owner"===g._access?a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null," ",Object(S.r)("$__youAreAccountOwner",1)))):R<Y||g&&g._access&&g._access.admin?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{display:"flex"}},a.a.createElement("div",{style:{padding:7,width:"calc(50% - 4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:g&&g._access&&g._access.admin?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:g&&g._access&&g._access.admin?"gray":"#FFFFFF"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){D({name:"admin",value:!1})}},a.a.createElement(ae.a,{icon:"supervised_user_circle",size:"33px",color:g&&g._access&&g._access.admin?null:"#FFFFFF"}),Object(S.r)("$__guest"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:g&&g._access&&g._access.admin?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:g&&g._access&&g._access.admin?"#FFFFFF":"gray"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){D({name:"admin",value:!0})}},a.a.createElement(ae.a,{icon:"supervisor_account",size:"33px",color:g&&g._access&&g._access.admin?"#FFFFFF":null}),Object(S.r)("$__supervisorAccount")))),a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)(g&&g._access&&g._access.admin?"$__adminAccess_PlataformDescription":"$__guestAccess_PlataformDescription",1))))):a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__adminLimitReached")),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__adminLimitReachedDescription",1)),a.a.createElement("div",{style:{position:"relative",marginTop:7,color:"red",fontWeight:"bolder"}},Object(S.r)("$__usedUsers","*")," ",R," ",Object(S.r)("$__of","*")," ",Y,a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){i.a.push("acc#tab/subscriptionUpgrade")}},Object(S.r)("$__upgradeSubscription")))))),g._access&&g._access.enabled&&g._access.admin&&a.a.createElement(a.a.Fragment,null,a.a.createElement(a.a.Fragment,null,g._token&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.r)("$__unregisteredUserAlert",1)),a.a.createElement(Ee,{text:Object(S.r)("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){z()}})),g._token&&g._token._id&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.r)("$__urlToActivate",1)),a.a.createElement("input",{type:"text",value:"".concat("true"===String("true")?"https://software.machen.ai":"http://localhost:3000","/activate?token=").concat(g._token._id),onClick:function(e){e.target.select()},onChange:function(e){console.log("a")}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(hr,{checked:!(!g._access||!g._access.user),onChange:function(e){D({name:"user",value:!g._access||!g._access.user})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__users",1)),g._access&&(!g._access||g._access.user&&!1!==g._access.user)?a.a.createElement(a.a.Fragment,null,!g._access.userAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.userRead),onChange:function(e){D({name:"userRead",value:!g._access||!g._access.userRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__read",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.userInteract),onChange:function(e){D({name:"userInteract",value:!g._access||!g._access.userInteract})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__interact",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.userEdit),onChange:function(e){D({name:"userEdit",value:!g._access||!g._access.userEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__edit",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.userAdmin),onChange:function(e){D({name:"userAdmin",value:!g._access||!g._access.userAdmin})},name:"checkeduserAdmin",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__userAccess_UserAccessDescription",1)))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(hr,{checked:!(!g._access||!g._access.plan),onChange:function(e){D({name:"plan",value:!g._access||!g._access.plan})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__plan",1)),g._access&&(!g._access||g._access.plan&&!1!==g._access.plan)?a.a.createElement(a.a.Fragment,null,!g._access.planAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.planRead),onChange:function(e){D({name:"planRead",value:!g._access||!g._access.planRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__read",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.planEdit),onChange:function(e){D({name:"planEdit",value:!g._access||!g._access.planEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__edit",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.createTemplate),onChange:function(e){D({name:"createTemplate",value:!g._access||!g._access.createTemplate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__createTemplate",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.planModerate),onChange:function(e){D({name:"planModerate",value:!g._access||!g._access.planModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__moderate",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.planAdmin),onChange:function(e){D({name:"planAdmin",value:!g._access||!g._access.planAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__userAccess_StrategyAndPlansAccessDescription")))),N&&N.master&&g._isAdmin?a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(hr,{checked:!(!g._access||!g._access.feed),onChange:function(e){D({name:"feed",value:!g._access||!g._access.feed})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__feed",1)),g._access&&(!g._access||g._access.feed&&!1!==g._access.feed)?a.a.createElement(a.a.Fragment,null,!g._access.feedAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.feedEdit),onChange:function(e){D({name:"feedEdit",value:!g._access||!g._access.feedEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__edit",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.feedModerate),onChange:function(e){D({name:"feedModerate",value:!g._access||!g._access.feedModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__moderate",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!(!g._access||!g._access.feedAdmin),onChange:function(e){D({name:"feedAdmin",value:!g._access||!g._access.feedAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__feedAccess_StrategyAndPlansAccessDescription")))):a.a.createElement(a.a.Fragment,null),N&&N.masterAdmin?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:"red"}},a.a.createElement(hr,{checked:!(!g._access||!g._access.masterAdmin),onChange:function(e){D({name:"masterAdmin",value:!g._access||!g._access.masterAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__accountAdministrator",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__accountAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null),N&&N.masterAdmin&&l&&(l.email.indexOf("@sonne.global")>-1||l.email.indexOf("@machen.ai")>-1)&&(g.email.indexOf("@sonne.global")>-1||g.email.indexOf("@machen.ai")>-1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:"red"}},a.a.createElement(hr,{checked:!(!g._access||!g._access.machenAdmin),onChange:function(e){D({name:"machenAdmin",value:!g._access||!g._access.machenAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__machenAdministrator",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.r)("$__machenAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null)),y&&y._access&&y._access.admin&&g&&g._access&&!g._access.admin?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:"red",fontSize:12}},"Ao remover a permiss\xe3o de administrador do usu\xe1rio, o mesmo perder\xe1 acesso \xe0 todas as atividades que administra atualmente e passar\xe1 a ter acesso restrito \xe0s atividades da plataforma.")):a.a.createElement(a.a.Fragment,null))))})));function Ua(){Ua=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Va=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){e.classes;var t,r,o,i=c.a.getState(),l=i.sideModule,s=(i.db,i.session,i.functions.socket,l.data,a.a.useState(!1)),u=Object(h.a)(s,2),m=u[0],g=(u[1],a.a.useState((t={image:null},Object(f.a)(t,"image",null),Object(f.a)(t,"status",!1),t))),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(null),_=Object(h.a)(x,2),O=_[0],w=_[1];Object(n.useEffect)((function(){j()}),[]);var j=function(){var e=Object(p.a)(Ua().mark((function e(){var t,r;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("/M_User_TwoFactor",{action:"has"});case 2:if(!((t=e.sent)&&t.data&&t.data.result)){e.next=7;break}y(Object(d.a)(Object(d.a)(Object(d.a)({},v),t.data.result),{},{status:!0})),e.next=11;break;case 7:return e.next=9,dt.a.post("/M_User_TwoFactor",{action:"create"});case 9:(r=e.sent)&&y(Object(d.a)(Object(d.a)(Object(d.a)({},v),r.data.result),{},{status:!1}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=Object(p.a)(Ua().mark((function e(){var t;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("/M_User_TwoFactor",{action:"verify",code:O});case 2:(t=e.sent)&&t.data&&t.data.result?y(Object(d.a)(Object(d.a)({},v),{},{status:!0})):(Object(S.c)({message:Object(S.r)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),y(Object(d.a)(Object(d.a)({},v),{},{status:!1}))),w(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=Object(p.a)(Ua().mark((function e(){var t,r;return Ua().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("/M_User_TwoFactor",{action:"disable",code:O});case 2:(t=e.sent)&&t.data&&t.data.result?(y((r={image:null},Object(f.a)(r,"image",null),Object(f.a)(r,"status",!1),r)),j()):Object(S.c)({message:Object(S.r)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),w(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(sa,{close:function(){m?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),v.status?a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.r)("$__disableTokenTip_1")),a.a.createElement("p",null,Object(S.r)("$__disableTokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.r)("$__disableTokenTip_3")),a.a.createElement("li",null,Object(S.r)("$__disableTokenTip_4")),a.a.createElement("li",null,Object(S.r)("$__disableTokenTip_5")),a.a.createElement("li",null,Object(S.r)("$__disableTokenTip_6")),a.a.createElement("li",null,Object(S.r)("$__disableTokenTip_7")))),a.a.createElement(tt,{label:Object(S.r)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:O,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){w(e.target.value)}},autoComplete:"new-password",value:O,max:6}),a.a.createElement("div",{style:(o={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"red",marginTop:"15px"},Object(f.a)(o,"display","flex"),Object(f.a)(o,"alignItems","center"),Object(f.a)(o,"justifyContent","center"),Object(f.a)(o,"borderRadius","7px"),o),onClick:function(){k()}},a.a.createElement(Ee,{icon:"toggle_on",text:Object(S.r)("$__disableToken","*"),title:Object(S.r)("$__disableToken","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")}))):a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},v.image&&a.a.createElement("img",{src:v.image})),a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.r)("$__tokenTip_1")),a.a.createElement("p",null,Object(S.r)("$__tokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.r)("$__tokenTip_3")),a.a.createElement("li",null,Object(S.r)("$__tokenTip_4")),a.a.createElement("li",null,Object(S.r)("$__tokenTip_5")),a.a.createElement("li",null,Object(S.r)("$__tokenTip_6")),a.a.createElement("li",null,Object(S.r)("$__tokenTip_7")))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__token",1)),a.a.createElement(tt,{label:Object(S.r)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:O,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){w(e.target.value)}},placeholder:Object(S.r)("$__token","*"),autoComplete:"new-token",value:O,max:6})),!v.status&&O&&6===O.length&&a.a.createElement("div",{style:(r={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(f.a)(r,"display","flex"),Object(f.a)(r,"alignItems","center"),Object(f.a)(r,"justifyContent","center"),Object(f.a)(r,"borderRadius","7px"),r),onClick:function(){E()}},a.a.createElement(Ee,{icon:"check",text:Object(S.r)("$__activeToken","*"),title:!Object(S.r)("$__activeToken","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")}))))})));function qa(){qa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Xa=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){var t=e.classes,r=c.a.getState(),o=r.sideModule,i=r.db,l=a.a.useState(o.data),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(n.useState)(o.data),b=Object(h.a)(g,2),v=b[0],y=(b[1],a.a.useState(o.data&&o.data.language?o.data.language:"pt-BR")),x=Object(h.a)(y,2),_=x[0],O=x[1],w=JSON.stringify(v)!==JSON.stringify(u),j=function(t){var r=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},t.name,t.value));"language"===t.name&&O(t.value),!t.value&&r[t.name]&&delete r[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:r})),m(r)},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];w&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},k=function(){var t=Object(p.a)(qa().mark((function t(r){return qa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ht(e);case 2:t.sent&&(Object(S.c)({message:Object(S.r)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),u.language!==_&&e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{language:_})),r&&(E(!0),u.language!==_&&setTimeout((function(){window.location.reload()}),1500)));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();console.log(v,u);var L=Object(S.j)(),C=!1;return L&&L.user&&(L.userAdmin||L.userEdit)&&(C=!0),a.a.createElement("div",null,a.a.createElement(sa,{save:w?function(){return k()}:null,saveClose:w?function(){return k(!0)}:null,close:function(){return E(!0)}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__language",1)),a.a.createElement(La,{id:"combo-box-demo",options:i.languages,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:u&&u.language&&i.languages?i.languages.filter((function(e){return String(e.value)===String(u.language)}))[0]:i.languages[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__language",1),variant:Object(S.d)("fieldVariant"),value:u&&u.language&&i.languages?i.languages.filter((function(e){return String(e.value)===String(u.language)}))[0]:i.languages[0]}))},onChange:function(e,t){j({name:"language",value:t.value})}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__sessionDuration",1)),a.a.createElement("div",null,Object(S.r)("$__sessionDurationDescription",1)),a.a.createElement(La,{id:"combo-box-demo",options:i.expiresIn,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:u&&u.expiresIn&&i.expiresIn?i.expiresIn.filter((function(e){return String(e.value)===String(u.expiresIn)}))[0]:i.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:u&&u.expiresIn&&i.expiresIn?i.expiresIn.filter((function(e){return String(e.value)===String(u.expiresIn)}))[0]:i.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){j({name:"expiresIn",value:t.value})}})),c.a.getState().session.isResale&&"user"!==u.type?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},c.a.getState().db.users[u._id].independentAccount?a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.r)("$__thisIsAIndependentAccountExplain",1)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(hr,{checked:!!u.independentAccount,onChange:function(e){C&&j({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.r)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null)))}))),Ka=r(596),Ja=r.n(Ka),Za=r(1044);r(830);var Qa=a.a.forwardRef((function(e,t){return a.a.createElement("div",{style:{display:"flex",width:"100%",padding:"7px 7px",fontSize:"12px",fontWeight:400,lineHeight:1.5,color:"#212529",backgroundColor:"#fff",border:"1px solid #ced4da",borderRadius:3,transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",appearance:"none",justifyContent:"space-between"},onClick:e.onClick},a.a.createElement("label",{onClick:e.onClick,ref:t,style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.value||e.placeholder),a.a.createElement(ae.a,{size:"22px",color:Object(S.d)("color"),icon:"today",onClick:e.onClick}))})),eo=function(e){return Object(Ka.registerLocale)("pt",Za.a),a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.a)({width:"100%"},e.horizontal?{display:"flex",alignItems:"center"}:{}),e.style?e.style:{}),{},{justifyContent:"center"})},a.a.createElement("div",{style:Object(d.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},a.a.createElement(Ja.a,Object.assign({locale:"pt",placeholderText:e.placeholder?e.placeholder:Object(S.r)("$__pleaseSelectStartDate"),selected:e.startDate?e.startDate:null,onChange:e.onChangeStartDate?function(t){e.onChangeStartDate(t)}:null,selectsStart:!0,startDate:e.startDate?e.startDate:null,endDate:e.endDate?e.endDate:null,maxDate:!e.range&&e.maxDate?e.maxDate:null},e.type&&"datetime"===e.type?{timeInputLabel:Object(S.r)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:a.a.createElement(Qa,null),showYearDropdown:!0}))),e.range?a.a.createElement("div",{style:Object(d.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},a.a.createElement(Ja.a,Object.assign({locale:"pt",placeholderText:Object(S.r)("$__pleaseSelectEndDate"),selected:e.endDate?e.endDate:null,onChange:e.onChangeEndDate?function(t){e.onChangeEndDate(t)}:null,selectsEnd:!0,startDate:e.startDate?e.startDate:null,endDate:e.endDate?e.endDate:null,minDate:e.minDate?e.minDate:e.range&&e.startDate?e.startDate:null},e.type&&"datetime"===e.type?{timeInputLabel:Object(S.r)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{maxDate:e.maxDate?e.maxDate:null,customInput:a.a.createElement(Qa,null),showYearDropdown:!0}))):a.a.createElement(a.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?a.a.createElement("div",{style:Object(d.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},a.a.createElement(E.a,Object.assign({color:Object(S.d)("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:Object(S.r)("$__clearDate","*"),text:Object(S.r)("$__clearDate","*")}))):a.a.createElement(a.a.Fragment,null))};function to(){to=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ro=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){var t=e.classes,r=c.a.getState(),o=r.sideModule,i=r.db,l=Object(n.useState)(o.data),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(n.useState)(o.data),b=Object(h.a)(g,2),v=b[0],y=b[1],x=JSON.stringify(u)!==JSON.stringify(v),_=function(t){var r=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},t.name,t.value));e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:Object(d.a)(Object(d.a)({},o.data),{},Object(f.a)({},t.name,t.value))})),!t.value&&r[t.name]&&delete r[t.name],m(r)},O=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},w=function(){var t=Object(p.a)(to().mark((function t(r){return to().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ht(e);case 2:t.sent&&(Object(S.c)({message:Object(S.r)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),y(u),r&&O(!0));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=Object(S.j)(),E=!1;return j&&j.user&&(j.userAdmin||j.userEdit)&&(E=!0),a.a.createElement("div",null,a.a.createElement(sa,{save:x?function(){return w()}:null,saveClose:x?function(){return w(!0)}:null,close:function(){return O(!0)}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__limitNumberOfUsers",1)),a.a.createElement("div",null,Object(S.r)("$__limitAdminUsersExplain",1),a.a.createElement(tt,{label:Object(S.r)("$__numberOfUsers"),variant:"outlined",name:"customAdmins",type:"number",min:0,max:99999,InputLabelProps:{shrink:!0},InputProps:{type:"number",onChange:function(e){0===e.target.value?_({name:"customAdmins",value:null}):_({name:"customAdmins",value:e.target.value>0?e.target.value:0})}},value:u.customAdmins||0}))),c.a.getState().session.isResale?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},c.a.getState().db.users[u._id].independentAccount?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:"gray",fontSize:11,width:"100%"}},Object(S.r)("$__thisIsAIndependentAccountExplain",1)),a.a.createElement("ul",{style:{color:"gray",fontSize:12,width:"100%",textAlign:"initial"}},u.plan?a.a.createElement("li",null,Object(S.r)("$__signaturePlan",1),": ",Object(S.r)(i.plans.filter((function(e){return String(e.value)===String(u.plan)}))[0].label,1)):a.a.createElement(a.a.Fragment,null),u.expireAccountDate?a.a.createElement("li",null,Object(S.r)("$__expireAccountDate",1),": ",pa()(1e3*u.expireAccountDate).format("DD/MM/YYYY")):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(hr,{checked:!!u.independentAccount,onChange:function(e){E&&_({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.r)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null),(!v.independentAccount&&u.plan||!u.plan)&&u.independentAccount?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(La,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:u&&u.plan&&i.plans?i.plans.filter((function(e){return String(e.value)===String(u.plan)}))[0]:i.plans[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__demoPlanSignature",1),variant:Object(S.d)("fieldVariant"),value:u&&u.plan&&i.plans?i.plans.filter((function(e){return String(e.value)===String(u.plan)}))[0]:i.plans[0]}))},onChange:function(e,t){E&&_({name:"plan",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),u.independentAccount&&u.plan&&"p0"!==u.plan&&!v.expireAccountDate?a.a.createElement(eo,{placeholder:Object(S.r)("$__dueDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){_({name:"expireAccountDate",value:String(pa()(e).unix("X"))})},maxDate:new Date(1e3*pa()().add("days",30).unix("X")),startDate:u&&u.expireAccountDate?new Date(1e3*u.expireAccountDate):null}):a.a.createElement(a.a.Fragment,null)))}))),no=r(1016),ao=r.n(no),oo=r(1017),io=r.n(oo);function co(){co=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var lo=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){e.classes;var t,r=c.a.getState(),o=r.sideModule,i=(r.db,r.session,r.functions.socket,o.data,a.a.useState(!1)),l=Object(h.a)(i,2),s=l[0],u=(l[1],a.a.useState((t={image:null},Object(f.a)(t,"image",null),Object(f.a)(t,"status",!1),t))),d=Object(h.a)(u,2),m=(d[0],d[1],a.a.useState(null)),g=Object(h.a)(m,2);g[0],g[1],Object(n.useEffect)((function(){b()}),[]);var b=function(){var e=Object(p.a)(co().mark((function e(){return co().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(sa,{close:function(){s?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.r)("$__mobileTokenTip_1")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.r)("$__mobileTokenTip_2")),a.a.createElement("li",null,Object(S.r)("$__mobileTokenTip_3")),a.a.createElement("li",null,Object(S.r)("$__mobileTokenTip_4")))),a.a.createElement("img",{src:io.a,style:{width:"52%"}}),a.a.createElement("img",{src:ao.a,style:{width:"52%",marginTop:"33px"}})))}))),so=function(){return{lock:{position:"fixed",top:"0px",left:"0px",right:"0px",bottom:"0px",height:"100vh",zIndex:"3000 !important"},backdrop:{position:"fixed",top:"0px",left:"0px",right:"440px",bottom:"0px",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)"},module:Object(d.a)(Object(d.a)({},W.l),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"25%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(d.a)(Object(d.a)({},W.l),{},{width:"70vw",position:"absolute",zIndex:"1100",left:"calc(50% - 35vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",top:"calc(50% - 40vh)",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleExpanded:Object(d.a)(Object(d.a)({},W.l),{},{width:"90vw",position:"absolute",zIndex:"1100",left:"calc(50% - 45vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleFullScreen:Object(d.a)(Object(d.a)({},W.l),{},{width:"100vw",position:"absolute",zIndex:"1100",left:"0px",backgroundColor:"rgba(255,255,255,1)",height:"100vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),menu:{position:"absolute",left:"0px",width:"45px",top:"0px",bottom:"0px",textAlign:"center"},content:{position:"absolute",top:"80px",left:"45px",bottom:"0px",right:"0px",padding:"0px",overflowY:"auto",overflowX:"hidden",zIndex:1},menuButtons_resume:{margin:"0px auto 27px auto",height:"40px"},MenuButton:{margin:"auto auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},MenuButton_arrow:{position:"absolute",right:"-8px",fontSize:"16px",transform:"rotate(180deg)"},subTitle:{position:"absolute",left:"45px",right:"0px",padding:"4px 10px",top:"47px",backgroundColor:Object(S.d)("color"),color:Object(S.d)("light")}}},uo=Object(s.b)((function(e){return{timeline:e.timeline&&e.sideModule.id&&e.timeline[e.sideModule.id]?e.timeline[e.sideModule.id]:{},card:e.db.cards&&e.db.cards[e.sideModule.id]?e.db.cards[e.sideModule.id]:{},sideModule:e.sideModule}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(so)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=Object(st.k)(r.id)),a.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},a.a.createElement(ze.a,{onClick:function(){e.openModule(e.module)}},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},a.a.createElement(ae.a,{icon:e.icon,size:e.size,color:r.activeModule===e.module?Object(S.d)("active"):Object(S.d)("colorText"),title:e.title})),r.activeModule===e.module&&a.a.createElement(ae.a,{className:t.MenuButton_arrow,color:r.activeModule===e.module?Object(S.d)("active"):Object(S.d)("colorText"),icon:"play_arrow"})))})));function po(e){var t=Object(z.a)({root:{boxShadow:"0 2px 2px 0px rgba(0,0,0,0.2)",textTransform:"none",padding:"6px 12px",border:"1px solid",lineHeight:1.5,backgroundColor:Object(S.d)(e.color?e.color:"color"),borderColor:Object(S.d)(e.color?e.color:"color"),color:Object(S.d)("lightText"),"&:hover":{backgroundColor:Object(S.d)(e.color?e.color:"color",.8),borderColor:Object(S.d)(e.color?e.color:"color"),boxShadow:"0 0 0 0.2rem ".concat(Object(S.d)(e.color?e.color:"color",.2))},"&:active":{boxShadow:"none",backgroundColor:Object(S.d)(e.color?e.color:"color"),borderColor:Object(S.d)(e.color?e.color:"color")},"&:focus":{boxShadow:"0 0 0 0.2rem ".concat(Object(S.d)(e.color?e.color:"color",.2))}}})();return!e.color||e.color&&-1===["default","inherit","primary","secondary"].indexOf(e.color)?a.a.createElement(H.a,{className:t.root,variant:"contained",color:e.color?e.color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children):a.a.createElement(H.a,{variant:e.variant?e.variant:"contained",color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children)}function fo(){fo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ho,mo=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.sideModule,n=t.db,o=t.functions.socket,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(null),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState({}),j=Object(h.a)(w,2),E=j[0],k=j[1],L=a.a.useState(0),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(""),N=Object(h.a)(F,2),D=N[0],A=N[1],P=r.data||{},$=0;P&&"step"===P.type&&($=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===P._id&&!c.a.getState().db.cards[e].deleted})).length),a.a.useEffect((function(){return"user"===P.type?Y():v(!1),function(){}}),[]),a.a.useEffect((function(){z()}),[P._id]);var z=function(){var e=Object(p.a)(fo().mark((function e(){var t;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(st.s)(P._id);case 2:(t=e.sent)&&k(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var t=Object(p.a)(fo().mark((function t(){return fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!($>0)){t.next=3;break}return Object(S.c)({message:Object(S.r)("$__beforeRemovingYouneedToMoveAllActivitiesInTheColumn",1),variant:"warning",persist:!1,horizontal:"center"}),t.abrupt("return");case 3:Object(S.c)({message:Object(S.r)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(st.p)(e,{_id:P._id},!1),Object(S.f)(e,{_id:P._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=Object(p.a)(fo().mark((function t(){return fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(st.p)(e,{_id:P._id},!1,!0),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){var e=Object(p.a)(fo().mark((function e(){var t;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!1),e.next=3,dt.a.post("/Card_Count",{id:P._id,all:!0,rel:"INN"});case 3:(t=e.sent)&&(v(!0),T(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=Object(p.a)(fo().mark((function e(){return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0),o.emit("data",{module:"user",method:"post",action:"migrate"},{from:P._id,fromData:P,to:_,toData:n.users[_]},Object(p.a)(fo().mark((function e(){var t;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(!0),t=Object(d.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[P._id]})).map((function(e){t[e]._users[_]||(t[e]._users=Object(d.a)(Object(d.a)({},t[e]._users),{},Object(f.a)({},_,{access:t[e]._users[P._id].access,_id:_}))),delete t[e]._users[P._id]})),v(!0);case 4:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(sa,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),P._id&&n.cards[P._id]&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deleteOptions",1)),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},"chatGroup"===P.type?Object(S.r)("$__deleteThisChatGroup",1):Object(S.r)("$__deleteThisActivity",1)),a.a.createElement(po,{onClick:function(){M()}},Object(S.r)("$__delete",1))),"step"!==P.type&&Object.keys(E).length>0&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__thisActivityHasOtherLinkedsActivities",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},Object(S.r)("$__deleteAllActiviesLinkedAlert",1)),a.a.createElement(po,{onClick:function(){B()}},Object(S.r)("$__deleteAll",1))))),P._id&&n.users[P._id]&&("client"===n.users[P._id].type||"group"===n.users[P._id].type||"sic"===n.users[P._id].type||"unity"===n.users[P._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===P._id})).length>0?Object(S.r)("$__delete".concat(n.users[P._id].type,"WithUsersDescription"),1):Object(S.r)("$__delete".concat(n.users[P._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__deleteThisDescription",1)),a.a.createElement(po,{onClick:function(){M()}},Object(S.r)("$__deleteThis",1))),P._id&&n.users[P._id]&&"client"!==n.users[P._id].type&&"group"!==n.users[P._id].type&&"sic"!==n.users[P._id].type&&"unity"===n.users[P._id].type&&a.a.createElement(a.a.Fragment,null,b?a.a.createElement(a.a.Fragment,null,I>0&&!s?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__thisUserHas",1)),a.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},I," ",Object(S.r)("$__items"),a.a.createElement("br",null),Object(S.r)("$__deleteCountCardsExplain"))),_?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){O(null)}},a.a.createElement(Se.a,{alt:n.users[_].name,src:n.users[_].image||null,style:{marginRight:"15px"}},n.users[_].name.substr(0,1)),a.a.createElement("span",null,n.users[_].name)),a.a.createElement(po,{onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.r)("$__confirm"),text:Object(S.r)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){R()}},{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.r)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.r)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(tt,{label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:D,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(e){A(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==P._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!P._parent&&!n.users[e]._parent||P._parent&&n.users[e]._parent===P._parent)&&(!D||D&&n.users[e].name.toLowerCase().indexOf(D.toLowerCase().trim())>-1)})).sort((function(e,t){var r=n.users[e].name.toLowerCase(),a=n.users[t].name.toLowerCase();return r<a?-1:r>a?1:0})).map((function(e){return a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){O(e)},key:e},a.a.createElement(Se.a,{alt:n.users[e].name,src:n.users[e].image||null,style:{marginRight:"15px"}},n.users[e].name.substr(0,1)),a.a.createElement("span",null,n.users[e].name))}))),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__deactivateWhithoutMigration",1)),a.a.createElement(po,{onClick:function(){M()}},Object(S.r)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__deactivateUserDescription",1)),a.a.createElement(po,{onClick:function(){M()}},Object(S.r)("$__deactivateThis",1)))):a.a.createElement(a.a.Fragment,null),b?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(la.a,null)):a.a.createElement(a.a.Fragment,null)))}));w.default.div(ho||(ho=Object(u.a)(["\n background-color:none\n ","\n "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""}));var go=Object(s.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=(t.db,t.session,a.a.useState("")),n=Object(h.a)(r,2),o=n[0],i=n[1];return a.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px"}},a.a.createElement("div",{style:{width:"100%",backgroundColor:"#FFFFFF",padding:3,borderRadius:7}},a.a.createElement(tt,{label:Object(S.r)("$__ApprovalOrRejectReason",1),variant:Object(S.d)("fieldVariant"),name:"reason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"toc"})),onChange:function(e){i(e.target.value)}},value:o,placeholder:Object(S.r)("$__ApprovalOrRejectReason",1)})),a.a.createElement("div",{style:{display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(E.a,{reverse:!0,title:Object(S.r)("$__indorse"),text:Object(S.r)("$__indorse"),color:"green",textColor:"green",icon:"approval",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmApproveItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){lr(Object(d.a)(Object(d.a)({},e),{},{reason:o,approval:!0,approved:!0}))}})},size:"25px",style:{padding:12}}),a.a.createElement(E.a,{reverse:!0,title:Object(S.r)("$__reject"),text:Object(S.r)("$__reject"),color:"red",textColor:"red",icon:"backspace",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmRejectItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){lr(Object(d.a)(Object(d.a)({},e),{},{reason:o,approval:!0}))}})},size:"25px",style:{padding:12}}))))})),bo=r(122),vo=r(566),yo=r.n(vo),xo=["currencySymbol"],_o=["classes","currencySymbol","inputProps","InputProps"],Oo=function(e){Object(A.a)(r,e);var t=Object(P.a)(r);function r(e){var n;return Object(N.a)(this,r),(n=t.call(this,e)).getValue=n.getValue.bind(Object(bo.a)(n)),n.callEventHandler=n.callEventHandler.bind(Object(bo.a)(n)),n}return Object(D.a)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.currencySymbol,Object(G.a)(e,xo));this.autonumeric=new yo.a(this.input,this.props.value,Object(d.a)(Object(d.a)(Object(d.a)({},this.props.preDefined),t),{},{digitGroupSeparator:".",decimalCharacter:",",decimalCharacterAlternative:".",onChange:void 0,onFocus:void 0,onBlur:void 0,onKeyPress:void 0,onKeyUp:void 0,onKeyDown:void 0,watchExternalChanges:!1}))}},{key:"componentWillUnmount",value:function(){this.autonumeric.remove()}},{key:"componentWillReceiveProps",value:function(e){this.props.value!==e.value&&this.getValue()!==e.value&&this.autonumeric.set(e.value)}},{key:"getValue",value:function(){if(this.autonumeric){return{string:function(e){return e.getNumericString()},number:function(e){return e.getNumber()}}[this.props.outputFormat](this.autonumeric)}}},{key:"callEventHandler",value:function(e,t){this.props[t]&&this.props[t](e,this.getValue())}},{key:"render",value:function(){var e=this,t=this.props,r=(t.classes,t.currencySymbol),n=t.inputProps,o=t.InputProps,i=(Object(G.a)(t,_o),{});return["id","label","className","autoFocus","variant","style","error","disabled","type","name","defaultValue","tabIndex","fullWidth","rows","rowsMax","select","required","helperText","unselectable","margin","SelectProps","multiline","size","FormHelperTextProps","placeholder"].forEach((function(t){return i[t]=e.props[t]})),a.a.createElement(et.a,Object.assign({inputRef:function(t){return e.input=t},onChange:function(t){return e.callEventHandler(t,"onChange")},onFocus:function(t){return e.callEventHandler(t,"onFocus")},onBlur:function(t){return e.callEventHandler(t,"onBlur")},onKeyPress:function(t){return e.callEventHandler(t,"onKeyPress")},onKeyUp:function(t){return e.callEventHandler(t,"onKeyUp")},onKeyDown:function(t){return e.callEventHandler(t,"onKeyDown")},InputProps:Object(d.a)({startAdornment:a.a.createElement(lt.a,{position:"start"},r)},o),inputProps:Object(d.a)({},n)},i))}}]),r}(a.a.Component);Oo.defaultProps={type:"text",variant:"standard",currencySymbol:"$",outputFormat:"number",textAlign:"right",maximumValue:"10000000000000",minimumValue:"-10000000000000"};var wo=Oo,jo=(yo.a.getPredefinedOptions(),r(1826)),Eo=r(1018),So=r.n(Eo);function ko(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useRef(null),c=a.a.useState(0),l=Object(h.a)(c,2),s=l[0],u=l[1];a.a.useEffect((function(){u(e.value?e.value:e.defaultValue?e.defaultValue:0)}),[e.value]);var d=function(){o((function(e){return!e}))},p=function(e){i.current&&i.current.contains(e.target)||o(!1)};return a.a.createElement(a.a.Fragment,null,a.a.createElement(jo.a,{variant:"text",ref:i,"aria-label":"split button"},a.a.createElement(H.a,{onClick:function(){u(s),e.onChange&&e.onChange(s)}},e.options.filter((function(e){return e.value===s})).length>0&&e.options.filter((function(e){return e.value===s}))[0].label),a.a.createElement(H.a,{size:"small","aria-controls":n?"split-button-menu":void 0,"aria-expanded":n?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:d},a.a.createElement(So.a,null))),a.a.createElement(Re.a,{open:n,anchorEl:i.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement($e.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:p},a.a.createElement(Be.a,{id:"split-button-menu"},e.options.map((function(t,r){return a.a.createElement(Me.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var Lo=Object(z.a)((function(e){return{root:{position:"relative",width:"100%"},options:{position:"relative",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"solid 1px rgba(0,0,0,0.05)",marginTop:"7px"},custom:{position:"relative",width:"100%",padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",marginTop:"7px"},margin:{height:e.spacing(3)}}})),Co={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var Io=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({recurrence:"0"}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=Lo();a.a.useEffect((function(){o({recurrence:e.data&&e.data.recurrence?e.data.recurrence:"0",recurrenceRepeatDays:e.data&&e.data.recurrenceRepeatDays?e.data.recurrenceRepeatDays:null,recurrenceEndDate:e.data&&e.data.recurrenceEndDate?e.data.recurrenceEndDate:null,recurrenceLimit:e.data&&e.data.recurrenceLimit?e.data.recurrenceLimit:null,recurrenceMyDay:e.data&&e.data.recurrenceMyDay?e.data.recurrenceMyDay:null,recurrenceOnlyCompleted:e.data&&e.data.recurrenceOnlyCompleted?e.data.recurrenceOnlyCompleted:null,recurrenceDuplicateCard:e.data&&e.data.recurrenceDuplicateCard?e.data.recurrenceDuplicateCard:null})}),[]),a.a.useEffect((function(){}),[e.data.startDate]);var c=function(t){var r=t;isNaN(t.recurrence)&&"custom"!==t.recurrence||(r=function(t){var r=t.recurrence;"custom"===t.recurrence&&(r=t.recurrenceRepeatDays);var n=_()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD");return _()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").unix("X")<_()().tz("America/Sao_Paulo").unix("X")&&(n=_()().tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD")),Object(d.a)(Object(d.a)({},t),{},{recurrenceNextDate:n})}(t)),t.recurrence&&parseInt(t.recurrence)>0&&parseInt(t.recurrence)<31&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(parseInt(t.recurrence),"days").format("YYYY-MM-DD")})),"everyFriday"===t.recurrence&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(5).format("YYYY-MM-DD")})),"everyMonday"===t.recurrence&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(1).format("YYYY-MM-DD")})),"everyFirstMonthDay"===t.recurrence&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"month").format("YYYY-MM-01")})),o(r),e.onChange&&e.onChange(r)};return a.a.createElement("div",{id:"RecurrencySettings",className:i.root},a.a.createElement("div",{className:i.options},Object(S.r)("$__recurrence"),a.a.createElement(ko,{options:[{value:"0",label:Object(S.r)("$__nonrecurrence")},{value:"1",label:Object(S.r)("$__everyDay")},{value:"7",label:Object(S.r)("$__weekly")},{value:"15",label:Object(S.r)("$__every15days")},{value:"30",label:Object(S.r)("$__every30days")},{value:"everyFirstMonthDay",label:Object(S.r)("$__everyFirstMonthDay")},{value:"everyMonday",label:Object(S.r)("$__everyMonday")},{value:"everyFriday",label:Object(S.r)("$__everyFriday")},{value:"custom",label:Object(S.r)("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(d.a)(Object(d.a)({},Co),{},{recurrence:null,recurrenceRepeatDays:null}):"custom"!==e?{recurrence:"".concat(e),recurrenceRepeatDays:null}:Object(d.a)(Object(d.a)({},n),{},{recurrence:"".concat(e),recurrenceNextDate:null,recurrenceRepeatDays:1}))}})),n&&n.recurrence&&"0"!==String(n.recurrence)&&a.a.createElement("div",{className:i.custom},Object(S.r)("$__preffers",1),n&&"custom"===n.recurrence&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.r)("$__repeatEvery",1),a.a.createElement(tt,{style:{width:"100px"},variant:Object(S.d)("standard"),name:"recurrenceRepeatDays",type:"number",min:"1",InputLabelProps:{shrink:!0},InputProps:{min:1,autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"replay_10"}),Object(S.r)("$__days").toLowerCase()),onChange:function(e){parseInt(e.target.value)>0&&c(Object(d.a)(Object(d.a)({},n),{},{recurrenceRepeatDays:e.target.value}))}},defaultValue:n.recurrenceRepeatDays?n.recurrenceRepeatDays:1})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.r)("$__limitDate",1),a.a.createElement(tt,{style:{width:"200px"},variant:Object(S.d)("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"clear",onClick:function(){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceEndDate:null}))}})):null,autoComplete:"new-password",onBlur:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceEndDate:e.target.value?_()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))},onChange:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceEndDate:e.target.value?_()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))}},defaultValue:e.data.recurrenceEndDate?e.data.recurrenceEndDate:null})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.r)("$__recurrenceDuplicateCard",1),a.a.createElement(hr,{checked:!!n.recurrenceDuplicateCard,onChange:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceDuplicateCard:!n.recurrenceDuplicateCard},n.recurrenceDuplicateCard?{recurrenceCopyCatenation:!1}:{}))},name:"duplicate",inputProps:{"aria-label":"secondary checkbox"}})),n.recurrenceDuplicateCard&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.r)("$__copyCatenation",1),a.a.createElement(hr,{checked:!!n.recurrenceCopyCatenation,onChange:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceCopyCatenation:!n.recurrenceCopyCatenation}))},name:"recurrenceCopyCatenation",inputProps:{"aria-label":"secondary checkbox"}}))))}));function To(){To=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Fo=Object(s.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Pa)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],i=Object(S.j)();a.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.map((function(e){c.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),o(t)}}),[e.data]);var l=function(){var t=Object(p.a)(To().mark((function t(r){return To().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),o(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Aa,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:c.a.getState().db.tag?c.a.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:Object(S.r)("$__tags"),api:"tag/add",add:!0,colorPicker:!(!i||!i.plan||!i.planAdmin&&!i.planModerate),multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:n,placeholder:e.placeholder||null,onChange:function(e){l(e)},colorPickerCallBack:function(e){c.a.getState().functions.socket.emit("tag.UPD",e)}}))}))),No=r(124),Do=r.n(No);function Ao(){Ao=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Po=Object(s.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id],cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){var t,r=e.classes,n=e.sideModule,o=c.a.getState(),l=o.db,s=o.session,u=l.planType,m=a.a.useState({}),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState({}),x=Object(h.a)(y,2),O=x[0],w=x[1],j=a.a.useState(!1),k=Object(h.a)(j,2),L=k[0],C=k[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],N=T[1],D=a.a.useState(!1),A=Object(h.a)(D,2),P=A[0],$=A[1],z=a.a.useState(!1),M=Object(h.a)(z,2),B=M[0],Y=M[1],R=a.a.useState(null),G=Object(h.a)(R,2),H=G[0],W=G[1],U=a.a.useState(null),V=Object(h.a)(U,2),q=V[0],X=V[1],K=a.a.useState(!1),J=Object(h.a)(K,2),Z=J[0],Q=J[1],ee=a.a.useState(0),te=Object(h.a)(ee,2),re=te[0],ne=te[1],oe=a.a.useState(!1),ie=Object(h.a)(oe,2),ce=ie[0],le=ie[1],se=Object(S.j)(),ue=Object(st.t)(n.id);a.a.useEffect((function(){b._id!==n.data._id&&(v(n.data),C(!1)),B||(n.data.startDate&&W(n.data&&n.data.startDate?n.data.startDate:null),n.data.endDate&&X(n.data&&n.data.endDate?n.data.endDate:null),v(n.data),C(!1),"link"!==b.type||b.name||me(),Y(!0),de()),n.data.name&&""!==n.data.name.trim()&&"link"===n.data.type&&"new"===n.data._id&&(C(!0),e.reqSave&&e.reqSave(!0))}),[n.data,b]),a.a.useEffect((function(){!b.name||b.name&&""===b.name.trim?C(!1):C(!0)}),[O]),a.a.useEffect((function(){e.cards[b._id]&&(e.cards[b._id]._requireApproval&&!b._requireApproval||!e.cards[b._id]._requireApproval&&b._requireApproval)&&v(Object(d.a)(Object(d.a)({},b),{},{_requireApproval:!e.cards[b._id]._requireApproval}))}),[e.cards]);var de=function(){var t=Object(p.a)(Ao().mark((function t(){return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{idRel:[n.data._id],cardLoad:"parents"});case 2:t.sent&&le(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),pe=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!n.data[t.name]&&!b[t.name]||n.data[t.name]&&n.data[t.name]!==t.value||a)&&e.reqSave&&e.reqSave(!0);var o=Object(d.a)(Object(d.a)({},b),{},Object(f.a)({},t.name,t.value));r&&r.name&&r.value&&(o=Object(d.a)(Object(d.a)(Object(d.a)({},b),o),{},Object(f.a)({},r.name,r.value))),v(o),w(Object(d.a)(Object(d.a)({},O),{},Object(f.a)({},t.name,t.value),r&&r.name&&r.value?Object(f.a)({},r.name,r.value):{}))},fe=function(t){L&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},he=function(){var t=Object(p.a)(Ao().mark((function t(){var r,a=arguments;return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],F){t.next=19;break}if(C(!1),e.reqSave&&e.reqSave(!1),b.status||(b.status="notStarted"),"new"===n.id&&n.data&&v(Object(d.a)(Object(d.a)({},b),n.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:b})),b.name&&(!b.name||""!==b.name.trim())){t.next=12;break}N(!1),Object(S.c)({message:Object(S.r)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(st.G)(Object(d.a)(Object(d.a)({},e),{},{store:Object(d.a)(Object(d.a)({},e.store),{},{db:Object(d.a)({},c.a.getState().db)})}),r,b);case 14:t.sent&&(O&&O.status&&(Object(st.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:b._id}}),{status:O.status}),Object(st.f)(e,b._id,O.status)),N(!1),Object(S.c)({message:Object(S.r)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),C(!1),e.reqSave&&e.reqSave(!1),r&&fe(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),me=function(){var t=Object(p.a)(Ao().mark((function t(){var r;return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ut.a.post("/link/content",{url:b.url});case 2:r=t.sent,v(Object(d.a)(Object(d.a)({},b),{},{content:r.data.article})),C(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ge=n.data&&n.data.type?l.dataType.filter((function(e){return e.name===n.data.type}))[0]:{},be=null;if(b._parent&&(be=c.a.getState().db.cards[b._parent]),!b)return null;var ve=c.a.getState().db.cards[b._id]&&c.a.getState().db.cards[b._id]._users&&c.a.getState().db.cards[b._id]._users[s._id]&&c.a.getState().db.cards[b._id]._users[s._id].myDay?c.a.getState().db.cards[b._id]._users[s._id].myDay:null,ye=!!(!ve||ve&&ve&&_()(new Date(1e3*ve)).format("YYYY/MM/DD")!==_()().format("YYYY/MM/DD")),xe=b.isTemplate?b.isTemplate:Object(st.R)(b._id),_e=!!e.permission&&e.permission;!b||!b._planId||l.cards[b._planId]&&Object(st.C)(b._planId)||(_e=!1),!_e&&parseInt(ue)>=4&&(_e=!0),!_e&&Object(st.C)(b._planId)&&se&&se.admin&&se.plan&&(se.planAdmin||se.planModerate)&&(_e=!0);var Oe=!1,we=a.a.createElement(a.a.Fragment,null);if(b&&b.url&&b.url.indexOf(".youtube.com/watch?")>-1){var je=b.url.split("?")[1].split("v=")[1].split("&")[0];je&&(we=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(je),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),Oe=!0)}if(b&&b.url&&b.url.indexOf("//youtu.be/")>-1){var Se=b.url.split(".be/")[1];Se&&(we=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(Se),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),Oe=!0)}return a.a.createElement(a.a.Fragment,null,a.a.createElement(sa,{save:L?function(){N(!0),he()}:null,saveClose:L?function(){N(!0),he(!0)}:null,saveLoader:F,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:r.root},b._requireApproval?a.a.createElement("div",{style:{position:"relative",width:"100%",background:Object(S.d)("ColumnTitleColor"),padding:7,display:"grid"}},a.a.createElement("div",{style:{color:"red",fontWeight:"bold",fontSize:14}},Object(S.r)("$__attention",1),": ",a.a.createElement("span",{style:{color:"#FFFFFF"}},Object(S.r)("$__thisActivityRequireApproval",1))),a.a.createElement(go,{nodeId:b._id})):a.a.createElement(a.a.Fragment,null),Oe?a.a.createElement("div",{style:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%",clear:"both"}},we):a.a.createElement(a.a.Fragment,null),_e&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("imageUpload"))&&a.a.createElement(kn,{img:b?b.image:null,onChange:function(e,t){pe({name:"image",value:e}),pe({name:"file",value:t})},files:b._files?b._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===b.type,aspectRatio:"chatGroup"===b.type?null:16/9,onDelete:function(){pe({name:"image",value:null},{name:"file",value:null},!0)}}),!_e&&b.image&&a.a.createElement("div",{className:r.image,style:{backgroundImage:"url(".concat(b.image,")")}}),"plan"!==b.type||b._id?a.a.createElement(a.a.Fragment,null):a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(La,{id:"combo-box-demo",options:u,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"planType",disableClearable:!0,value:b&&b.planType?u.filter((function(e){return e.value===b.planType}))[0]:u[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:b&&b.planType?u.filter((function(e){return e.value===b.planType}))[0]:u[0]}))},onChange:function(e,t){pe({name:"planType",value:t.value})}}),u.filter((function(e){return!b.planType||b.planType&&e.value===b.planType&&!0===e.swot})).length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",color:Object(S.d)("color")}},a.a.createElement(ae.a,{icon:Do.a,color:Object(S.d)("color"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},"MATRIX SWOT"))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,Object(S.r)(u.filter((function(e){return!b.planType||b.planType&&e.value===b.planType}))[0].description,1))),a.a.createElement("div",{className:r.data},(b._parent||b._planId)&&ce?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"auto"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.r)("$__loadingdata")),a.a.createElement(Or,null)):(b._parent&&l.cards[b._parent]||b._planId&&l.cards[b._planId])&&a.a.createElement(vr,{id:b._parent?b._parent:b._planId?b._planId:null,open:function(t){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:t},"step"===c.a.getState().db.cards[t].type?{module:"columnEdit",activeModule:"columnEdit"}:{module:"cardEdit",activeModule:"cardEdit"}),{},{data:c.a.getState().db.cards[t]}))}}),a.a.createElement("div",{style:{position:"relative",alignItems:"center",clear:"both",justifyContent:"space-between",display:"flex"}},b._id&&l.cards[b._id]&&l.cards[b._id]._users&&a.a.createElement(Nt,{_id:b._id,noLimit:!0,avatarSize:"33px",permission:_e}),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"plan"===b.type&&b._id&&_e?a.a.createElement(E.a,{title:Object(S.r)("$__openPlan",1),icon:"launch",color:"lightgray",onClick:function(){i.a.push("sp#".concat(b._id,"/dashboard")),fe(!0)},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.card&&e.card._id&&"plan"===e.card.type?a.a.createElement(E.a,{title:Object(S.r)(e.card&&e.card._isFavorite?"$__removeFromFavorite":"$__addToFavorite",1),icon:e.card&&e.card._isFavorite?"favorite":"favorite_border",color:e.card&&e.card._isFavorite?"red":"lightgray",onClick:function(){Object(S.g)(e,b._id,!(!e.card||!e.card._isFavorite)),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},b._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[b._id]),{},{_isFavorite:!e.card||!e.card._isFavorite})))}))},size:"25px"}):a.a.createElement(a.a.Fragment,null),b._id&&36===b._id.length&&"chatGroup"!==b.type&&"plan"!==b.type&&a.a.createElement(E.a,{title:Object(S.r)(ve&&_()(new Date(1e3*ve)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:ve&&_()(new Date(1e3*ve)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"red":"lightblue",icon:ve&&_()(new Date(1e3*ve)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Object(st.K)(e,{_id:b._id,userId:s._id,option:ye}),e.myDayClick&&e.myDayClick()},size:"25px"}))),a.a.createElement("div",null,e.card&&"plan"!==b.type&&"chatGroup"!==b.type&&e.card._id&&e.card._users[s._id]&&"completed"!==b.status&&ue>0?a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Xt,{data:e.card})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===b.type&&b._id?Object(S.r)("$__plan ".concat(b.planType?u[1].label:u[0].label),1):Object(S.r)("$__data",1)),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:7}},a.a.createElement("div",{style:{color:"gray"}},b._cardCode?"#".concat(b._cardCode," "):""),b.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",textAlign:"right",marginLeft:10}},Object(S.r)("$__createdAt"),": ",Object(S.k)(b.created_at)):a.a.createElement(a.a.Fragment,null)),a.a.createElement(tt,{label:Object(S.r)(ge&&ge.fieldsTitle&&ge.fieldsTitle.name?ge.fieldsTitle.name:"$__titleOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){pe(e.target)}},value:b&&b.name?b.name:"",placeholder:Object(S.r)(ge&&ge.fieldsTitle&&ge.fieldsTitle.placeholder&&ge.fieldsTitle.placeholder.name?ge.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("name")>-1))}),ue>3||b.description||_e?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"toc"})),onChange:function(e){pe(e.target)}},value:b&&b.description?b.description:"",placeholder:Object(S.r)("$__descriptionOfCard_placeholder",1),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),"task"===b.type||"iniciative"===b.type?a.a.createElement(wo,{label:Object(S.r)("$__price",1),variant:"standard",currencySymbol:"$",outputFormat:"string",style:{width:"100%",marginBottom:10},value:b&&b.value?b.value:"",onChange:function(e,t){return pe({name:"value",value:t})}}):a.a.createElement(a.a.Fragment,null),(ue>3||b.url||_e)&&"chatGroup"!==b.type?a.a.createElement(tt,{label:Object(S.r)("$__URL",1),variant:Object(S.d)("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"http"})),onChange:function(e){pe(e.target)}},value:b&&b.url?b.url:"",placeholder:"https://domain.com",disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("name")>-1))}):a.a.createElement(a.a.Fragment,null),b.url?a.a.createElement("div",{style:{width:"100%",textAlign:"right"}},a.a.createElement("a",{href:b.url,target:"_blank",style:{color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.r)("$__openlink","*"))):a.a.createElement(a.a.Fragment,null)),(ue>3||b.client||_e)&&!xe&&_e&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("client"))&&(!b.client||b.client&&l.users[b.client])&&a.a.createElement(La,{id:"combo-box-demo",options:Object.keys(l.users).filter((function(e){return"client"===l.users[e].type||"group"===l.users[e].type||"sic"===l.users[e].type})).sort((function(e,t){return l.users[e].name<l.users[t].name?-1:l.users[e].name>l.users[t].name?1:0})).map((function(e){return{label:l.users[e].name,value:String(l.users[e]._id)}})),getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"client",value:b&&b.client?Object.keys(l.users).filter((function(e){return b.client&&l.users[e]._id===b.client})).map((function(e){return{label:l.users[e].name,value:String(l.users[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__account",1),variant:Object(S.d)("fieldVariant"),value:b&&b.client?Object.keys(l.users).filter((function(e){return b.client&&l.users[e]._id===b.client})).map((function(e){return{label:l.users[e].name,value:String(l.users[e]._id)}}))[0]:null}))},onChange:function(e,t){pe({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("client")>-1))}),((ue>2||b.endDate||b.startDate||_e)&&!xe&&"chatGroup"!==b.type||!(!_e&&!b.startDate&&!b.endDate)&&!xe&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("deadline")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__deadline",1)),b.endDate||b.startDate||P?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:null,autoComplete:"start-date",onChange:function(e){_()(e.target.value).isValid()&&W(_()(e.target.value).unix("X"));var t={startDate:_()(e.target.value).unix("X")};W(_()(e.target.value).unix("X")),(!q||q<_()(e.target.value).unix("X"))&&(t=Object(d.a)(Object(d.a)({},t),{},{endDate:_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X")}),X(_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),v(Object(d.a)(Object(d.a)({},b),t)),C(!0)}},value:H?_()(1e3*H).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement(tt,{label:Object(S.r)("$__endDate",1),variant:Object(S.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:!q||H?_()(1e3*H).format("YYYY-MM-DDTHH:mm"):null,autoComplete:"end-date",onChange:function(e){var t={endDate:_()(e.target.value).unix("X")};X(_()(e.target.value).unix("X")),H||(t=Object(d.a)(Object(d.a)({},t),{},{startDate:_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),W(_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),v(Object(d.a)(Object(d.a)({},b),t)),C(!0)}},value:q?_()(1e3*q).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"flex-end"}},a.a.createElement(E.a,{color:Object(S.d)("lightgray"),icon:"clear",onClick:function(){W(null),X(null),v(Object(d.a)(Object(d.a)({},b),{},{startDate:null,endDate:null,recurrence:null})),$(!1),C(!0)},size:"15px",title:Object(S.r)("$__clearDate","*"),text:Object(S.r)("$__clearDate","*")})),a.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},a.a.createElement(ko,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(Object(S.r)("$__days").toLowerCase())},{value:15,label:"15 ".concat(Object(S.r)("$__days").toLowerCase())},{value:30,label:"30 ".concat(Object(S.r)("$__days").toLowerCase())},{value:60,label:"60 ".concat(Object(S.r)("$__days").toLowerCase())},{value:90,label:"90 ".concat(Object(S.r)("$__days").toLowerCase())},{value:180,label:"180 ".concat(Object(S.r)("$__days").toLowerCase())},{value:365,label:"365 ".concat(Object(S.r)("$__days").toLowerCase())}].concat(Object(Ne.a)(be&&be.startDate&&be.endDate?[{value:"parent",label:"".concat(Object(S.r)("$__useParentDate")," ").concat(_()(1e3*be.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(_()(1e3*be.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:re||"",onChange:function(e){"parent"!==e&&0!==e?(X(_()(new Date(1e3*H)).tz("America/Sao_Paulo").add(e,"days").unix("X")),pe({name:"endDate",value:_()(new Date(1e3*H)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(be.startDate&&(W(be.startDate),pe({name:"startDate",value:be.startDate},be.endDate?{name:"endDate",value:be.endDate}:null,!0),be.endDate&&X(be.endDate)),!be.startDate&&be.endDate&&(X(be.endDate),pe({name:"endDate",value:be.endDate},null,!0))),ne(e)}})),a.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.r)("$__freeChildrenDate",1),a.a.createElement(hr,{checked:!!b.freeChildrenDate,onChange:function(e){pe({name:"freeChildrenDate",value:!b.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("freeChildrenDate")>-1))})),b.startDate&&_()(b.startDate).isValid()&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("recurrence"))&&a.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},b._recurrenceId?a.a.createElement("div",{style:{marginTop:"15px"}},Object(S.r)("$__recurrentActivityFrom"),":",a.a.createElement(Dn,(t={db:"cards",data:l.cards[b._recurrenceId]},Object(f.a)(t,"db","cards"),Object(f.a)(t,"Avatar",!0),Object(f.a)(t,"ignoreList",!0),Object(f.a)(t,"onlyOption",!0),t))):a.a.createElement("div",null,a.a.createElement(Io,{data:b,onChange:function(e){v(Object(d.a)(Object(d.a)(Object(d.a)({},b),e),{},{recurrenceNextDate:_()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),C(!0)}}),b.recurrence&&"0"!==b.recurrence&&b.recurrenceNextDate&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",null,Object(S.r)("$__NextRecurrenceDate")),a.a.createElement(eo,{placeholder:Object(S.r)("$__NextRecurrenceDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:_()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};v(Object(d.a)(Object(d.a)({},b),t)),C(!0)},startDate:b.recurrenceNextDate&&_()(b.recurrenceNextDate).isValid()?new Date(1e3*_()("".concat(b.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){v(Object(d.a)(Object(d.a)({},b),{},{recurrenceNextDate:null})),C(!0)}}))))):_e||(ue>2||b.endDate||b.startDate||_e)&&!xe?a.a.createElement(Ee,{text:Object(S.r)("$__addDeadline",1),icon:"timer",onClick:function(){$(!0),W(_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),pe({name:"startDate",value:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==re?{name:"endDate",value:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add(re,"days").unix("X")}:null),"parent"!==re&&X(_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add(re,"days").unix("X"))}}):a.a.createElement(a.a.Fragment,null)),("completed"===b.status||!_e)&&ue<3?a.a.createElement(a.a.Fragment,null,b._tags&&b._tags.length>0?a.a.createElement(Fe.a,{options:b._tags,expanded:!0}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("tags"))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__tags",1)),a.a.createElement(Fo,{data:{values:b._tags?b._tags:[]},callBack:function(e){_e&&pe({name:"_tags",value:e})},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.r)("$__selectTheOptions",1)}),b&&b.type&&("step"===b.type||"objective"===b.type||b.type.indexOf("guideline")>-1||"goal"===b.type)?a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!b.childrenAutoTag,onChange:function(e){_e&&pe({name:"childrenAutoTag",value:!b.childrenAutoTag})},name:"childrenAutoTag",inputProps:{"aria-label":"secondary checkbox"},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("childrenAutoTag")>-1))}),Object(S.r)("$__makeLinksAssumeTheSameLabelsOnAdd",1)):a.a.createElement(a.a.Fragment,null))),(!ge.hideFields||ge.hideFields&&(-1===ge.hideFields.indexOf("priority")||-1===ge.hideFields.indexOf("status")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},!xe&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("priority"))&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(La,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:b&&b.priority&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__priority",1),variant:Object(S.d)("fieldVariant"),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0].color:l.priority[0].color)})}),value:b&&b.priority&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0]:l.priority[0]}))},onChange:function(e,t){_e&&pe({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.r)(e.label,1))},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(La,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:b&&b.risk&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__risk",1),variant:Object(S.d)("fieldVariant"),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.risk?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.risk?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0].color:l.priority[0].color)})}),value:b&&b.risk&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0]:l.priority[0]}))},onChange:function(e,t){_e&&pe({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.r)(e.label,1))},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(La,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:b&&b.complexity&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__complexity",1),variant:Object(S.d)("fieldVariant"),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.complexity?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.complexity?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0].color:l.priority[0].color)})}),value:b&&b.complexity&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0]:l.priority[0]}))},onChange:function(e,t){_e&&pe({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.r)(e.label,1))},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(La,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:b&&b.impact&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__impact",1),variant:Object(S.d)("fieldVariant"),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.impact?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.impact?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0].color:l.priority[0].color)})}),value:b&&b.impact&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0]:l.priority[0]}))},onChange:function(e,t){_e&&pe({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.r)(e.label,1))},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("priority")>-1))}))),!xe&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("status"))&&a.a.createElement(La,{id:"combo-box-demo",options:l.status,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:b&&b.status&&l.status?l.status.filter((function(e){return String(e.value)===String(b.status)}))[0]:l.status[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__status",1),variant:Object(S.d)("fieldVariant"),value:b&&b.status&&l.status?l.status.filter((function(e){return String(e.value)===String(b.status)}))[0]:l.status[0]}))},onChange:function(e,t){(_e||"0"!==String(ue))&&pe({name:"status",value:t.value})},disabled:!(_e&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("status")>-1))&&"0"===String(ue)})),(ue>4||se&&se.plan&&se.planAdmin)&&"plan"===b.type&&"completed"!==b.status&&a.a.createElement(a.a.Fragment,null,Z||b.miroBoard?Z?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__MiroBoard",1)),a.a.createElement(tt,{label:Object(S.r)("$__MiroBoardCode"),variant:Object(S.d)("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"save",color:"green",onClick:function(){return Q(!1)}})),onChange:function(e,t){pe({name:"miroBoard",value:e.target.value})}},value:b&&b.miroBoard?b.miroBoard:"",placeholder:Object(S.r)("$__MiroBoardCodePlaceholder",1),disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("miroBoard")>-1))})):b.miroBoard&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__MiroBoard",1)),a.a.createElement(Ee,{text:Object(S.r)("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:b.miroBoard})}}),a.a.createElement(Ee,{text:Object(S.r)("$__editBoard",1),icon:"insert_link",onClick:function(){Q(!0)}})):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__MiroBoard",1)),a.a.createElement(Ee,{text:Object(S.r)("$__addBoard",1),icon:"developer_board",onClick:function(){Q(!0)}}))),(!b._id||b&&b._users&&s&&s._id&&b._users[s._id]&&b._users[s._id].access&&parseInt(b._users[s._id].access)>=3&&(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("private")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!b.private,onChange:function(e){_e&&pe({name:"private",value:!b.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("private")>-1))}),Object(S.r)("$__private",1))),(!ge.hideFields||ge.hideFields&&-1===ge.hideFields.indexOf("private"))&&b.private&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!b.privateChildrens,onChange:function(e){_e&&pe({name:"privateChildrens",value:!b.privateChildrens})},name:"privateChildrens",inputProps:{"aria-label":"secondary checkbox"},disabled:!(_e&&"completed"!==b.status&&!(ge&&ge.disabledFields&&ge.disabledFields.indexOf("private")>-1))}),Object(S.r)("$__privateChildrens",1))),_e&&"chatGroup"===b.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!b.onlyAdminsSendMessages,onChange:function(e){_e&&pe({name:"onlyAdminsSendMessages",value:!b.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__onlyAdminsCanSendMessage",1))),b.broadcast||c.a.getState().timeline&&(!c.a.getState().timeline[b._id]||c.a.getState().timeline[b._id]&&0===Object.keys(c.a.getState().timeline[b._id]).length)?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!b.broadcast,onChange:function(e){_e&&pe({name:"broadcast",value:!b.broadcast})},name:"broadcast",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__workAsABroadcastList",1))):a.a.createElement(a.a.Fragment,null)),se&&se.plan&&se.planAdmin&&xe&&"plan"===b.type&&s._access&&s._access.userAdmin&&s._access.machenAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(La,{id:"combo-box-demo",options:l.plans,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:b&&b.plans&&l.plans?l.plans.filter((function(e){return String(e.value)===String(b.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}},renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:b&&b.plans&&l.plans?l.plans.filter((function(e){return String(e.value)===String(b.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}}}))},onChange:function(e,t){_e&&pe({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null))))}))),$o=r(1041),zo=r(1827),Mo=r(1846),Bo=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},data:{marginTop:"0px",padding:"0 10px","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},timeline:{position:"absolute",width:"100%",top:"300px",bottom:"0px"},timelineKpiParent:{position:"absolute",width:"100%",top:"350px",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};function Yo(){Yo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ro=Object(s.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Bo)((function(e){var t=e.classes,r=c.a.getState(),n=r.timeline,o=r.db,i=r.session,l=r.sideModule,s=l.data||{},u=a.a.useState(!s.kpi_type),m=Object(h.a)(u,2),g=(m[0],m[1],a.a.useState(s.kpi_type?"timeline":"settings")),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!(!s._id||"new"!==s._id||!s.name)),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState({}),k=Object(h.a)(j,2),L=k[0];k[1],a.a.useEffect((function(){O&&e.reqSave&&e.reqSave()}),[O]);var C=Object(S.j)(),I=Object(st.t)(l.id),T=!1;(parseInt(I)>=4||C.plan&&C.planAdmin)&&(T=!0),i._id&&o.cards[s._id]&&o.cards[s._id]._users&&o.cards[s._id]._users[Object.keys(o.cards[s._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&(I=o.cards[s._id]._users[Object.keys(o.cards[s._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]);var F=window.location.hash.split("/");F[0]=F[0].replace("#","");var N=n[s._id]||{};N=Object.keys(N).filter((function(e){return"kpi"===N[e].type})).map((function(e){return N[e]}));var D=null,A=0;s._parent&&c.a.getState().db.cards[s._parent]&&c.a.getState().db.cards[s._parent].kpi_type&&"task"!==c.a.getState().db.cards[s._parent].kpi_type&&(D=c.a.getState().db.cards[s._parent],A=parseInt(D.kpi_ini)>parseInt(D.kpi_fin)?parseInt(D.kpi_ini)-parseInt(D.kpi_fin):parseInt(D.kpi_fin)-parseInt(D.kpi_ini),Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent&&c.a.getState().db.cards[e]._parent===D._id&&c.a.getState().db.cards[e].kpi_type===D.kpi_type&&c.a.getState().db.cards[e].kpi_useParent})).map((function(e){parseInt(D.kpi_ini)>parseInt(D.kpi_fin&&parseInt(c.a.getState().db.cards[e].kpi_ini))?A-=parseInt(c.a.getState().db.cards[e].kpi_ini):parseInt(c.a.getState().db.cards[e].kpi_fin)&&(A-=parseInt(c.a.getState().db.cards[e].kpi_fin))})));var P=function(t){(t.value&&!l.data[t.name]||l.data[t.name]&&l.data[t.name]!==t.value)&&w(!0);var r=Object(d.a)(Object(d.a)({},l.data),{},Object(f.a)({},t.name,t.value));r.kpi_ini||(r=Object(d.a)(Object(d.a)({},r),{},{kpi_ini:0})),r.kpi_fin||(r=Object(d.a)(Object(d.a)({},r),{},{kpi_fin:0})),!r.kpi_useParent&&"false"!==!String(r.kpi_useParent)&&D&&D.kpi_type===t.value&&(r=Object(d.a)(Object(d.a)({},r),{},{kpi_useParent:!0})),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},l),{},{data:r}))},$=function(){var t=Object(p.a)(Yo().mark((function t(){var r,n=arguments;return Yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],w(!1),"time"!==l.data.kpi_type||!(0===parseInt(l.data.kpi_fin)&&0===parseInt(l.data.kpi_ini)||parseInt(l.data.kpi_fin)>0&&parseInt(l.data.kpi_fin)<parseInt(l.data.kpi_ini))){t.next=6;break}Object(S.c)({message:Object(S.r)("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(st.G)(e,!0,l.data);case 8:t.sent&&Object(S.c)({message:Object(S.r)("$__kpiDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&e.reduxFunction("ASYNC","CLEAR_MODULE");case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=Object(p.a)(Yo().mark((function t(r){return Yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},l),{},{data:Object(d.a)(Object(d.a)({},l.data),{},{kpi_ini:null,kpi_fin:null,kpi_useParent:!!r.value||null})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),M=0;return Object.keys(o.cards).filter((function(e){return o.cards[e]&&o.cards[e]._parent&&o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).map((function(e,t){M=parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?M+parseInt(o.cards[e].kpi_ini)-parseInt(o.cards[e].kpi_fin):M+parseInt(o.cards[e].kpi_fin)-parseInt(o.cards[e].kpi_ini)})),a.a.createElement("div",null,a.a.createElement(sa,{save:O&&T?function(){$()}:null,saveClose:O&&T?function(){$(!0)}:null,close:function(){e.onClose&&e.onClose(O)}}),a.a.createElement("div",{style:{posision:"absolute",top:5,left:0,right:0}},T?a.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",flexDirection:"row-reverse"}},a.a.createElement(E.a,{title:Object(S.r)("$__changeKpiType",1),color:Object(S.d)("settings"===v?"menu":"color"),icon:"tune",onClick:function(){return y("settings")},size:"25px",transparent:!0}),a.a.createElement(E.a,{title:Object(S.r)("$__chart",1),color:Object(S.d)("chart"===v?"menu":"color"),icon:"analytics",onClick:function(){return y("chart")},size:"25px",transparent:!0}),a.a.createElement(E.a,{title:Object(S.r)("$__statement",1),color:Object(S.d)("timeline"===v?"menu":"color"),icon:"receipt",onClick:function(){return y("timeline")},size:"25px",transparent:!0})):a.a.createElement("div",null),"chart"===v?a.a.createElement(Nr,{data:s,chartShow:!0}):"settings"===v?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",null,Object(S.r)("$__measurementeType",1)),0===Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length?a.a.createElement(Mo.a,{value:s&&s.kpi_type?s.kpi_type:"task",exclusive:!0,onChange:function(e,t){P({name:"kpi_type",value:t})}},a.a.createElement(zo.a,{value:"decimal"},a.a.createElement(ae.a,{title:Object(S.r)("$__decimal",1),color:"color"},"filter_9_plus")),a.a.createElement(zo.a,{value:"currency"},a.a.createElement(ae.a,{title:Object(S.r)("$__currency",1),color:"color"},"attach_money")),a.a.createElement(zo.a,{value:"percent"},a.a.createElement(Ge.a,{title:Object(S.r)("$__percentage",1)},a.a.createElement("span",{style:{color:"".concat(Object(S.d)("color")),fontSize:"22px"}},"%"))),a.a.createElement(zo.a,{value:"time"},a.a.createElement(ae.a,{title:Object(S.r)("$__time",1),color:"color"},"hourglass_top")),a.a.createElement(zo.a,{value:"task"},a.a.createElement(ae.a,{title:Object(S.r)("$__task",1),color:"color"},"task"))):"decimal"===s.kpi_type?a.a.createElement(ae.a,{title:Object(S.r)("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===s.kpi_type?a.a.createElement(ae.a,{title:Object(S.r)("$__currency",1),color:"color"},"attach_money"):"percent"===s.kpi_type?a.a.createElement(ae.a,{title:Object(S.r)("$__percentage",1),color:"color"},"percent"):a.a.createElement(ae.a,{title:Object(S.r)("$__task",1),color:"color"},"task"),(Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length,a.a.createElement(a.a.Fragment,null)),D&&D.kpi_type&&D.kpi_type===s.kpi_type?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginTop:7}},a.a.createElement("legend",{style:{color:"gray",fontSize:12}},Object(S.r)("$__parentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginTop:3}},a.a.createElement("legend",{style:{color:"blue",fontSize:12}},D&&parseInt(D.kpi_ini)>parseInt(D.kpi_fin)?Object(S.r)("$__notAllocatedBudget",1):Object(S.r)("$__notAllocatedGoal",1)),Object(S.h)(A,"time"===D.kpi_type?"number":D.kpi_type,D.kpi_currency?D.kpi_currency:null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(hr,{checked:!!s.kpi_useParent,onChange:function(e){z({name:"kpi_useParent",value:!s.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__useParentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{color:"red"}},Object(S.r)("$__independentKPIDescription")),a.a.createElement("div",null))):a.a.createElement(a.a.Fragment,null),s&&s.kpi_type&&"task"!==s.kpi_type&&a.a.createElement(a.a.Fragment,null,"currency"!==s.kpi_type||s.kpi_useParent||0!==Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length?Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length>0?a.a.createElement("fieldset",{style:{marginTop:7}},a.a.createElement("legend",{style:{color:"gray",fontSize:12}},Object(S.r)("$__allocatedKpiActivities",1)),a.a.createElement("ul",{style:{listStyle:"none",padding:0}},Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).map((function(e,t){var r=0;r=parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?parseInt(o.cards[e].kpi_ini)-parseInt(o.cards[e].kpi_fin):parseInt(o.cards[e].kpi_fin)-parseInt(o.cards[e].kpi_ini);var i=0;return n&&n[e]&&Object.keys(n[e]).filter((function(t){return n[e][t]&&n[e][t].value})).length>0&&Object.keys(n[e]).filter((function(t){return n[e][t]&&n[e][t].value})).map((function(t){i+=parseFloat(n[e][t].value)})),a.a.createElement("li",{key:"ca-".concat(e)},a.a.createElement(Dn,{db:"cards",data:c.a.getState().db.cards[e],notGlobalExpanded:!0,ignoreList:!0}),a.a.createElement("div",{style:{width:"100%",height:22}},a.a.createElement($o.a,{data:[{ranges:[0,parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?parseInt(s.kpi_ini)-parseInt(s.kpi_fin):parseInt(s.kpi_fin)-parseInt(s.kpi_ini)],measures:[r],markers:[i]}],minValue:parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?parseInt(s.kpi_fin):parseInt(s.kpi_ini),maxValue:parseInt(s.kpi_ini)<parseInt(s.kpi_fin)?parseInt(s.kpi_fin):parseInt(s.kpi_ini),margin:{top:0,right:0,bottom:0,left:0},spacing:50,titlePosition:"after",titleAlign:"end",titleOffsetX:-70,rangeBorderColor:{from:"color",modifiers:[]},measureBorderColor:{from:"color",modifiers:[]},measureSize:1e5,markerSize:1.2,rangeColors:"purple_orange",measureColors:"seq:blue_purple",markerColors:"seq:yellow_orange_red",motionConfig:"stiff"})),a.a.createElement("div",{style:{marginTop:0,fontSize:12,color:"black",width:"100%",textAlign:"left"}},Object(S.h)(r,"time"===s.kpi_type?"number":s.kpi_type,s.kpi_currency?s.kpi_currency:null)))})))):a.a.createElement(a.a.Fragment,null):a.a.createElement(La,{id:"combo-box-demo",options:o.currency,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"currency",disableClearable:!0,value:s&&s.kpi_currency&&o.currency?o.currency.filter((function(e){return String(e.value)===String(s.kpi_currency)}))[0]:o.currency[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__currency",1),variant:Object(S.d)("fieldVariant"),value:s&&s.kpi_currency&&o.currency?o.currency.filter((function(e){return String(e.value)===String(s.kpi_currency)}))[0]:o.currency[0]}))},onChange:function(e,t){P({name:"kpi_currency",value:t.value})}}),a.a.createElement("div",{style:{display:"flex",marginTop:"14px",justifyContent:s.kpi_useParent?"center":"space-between"}},!s.kpi_useParent||s.kpi_useParent&&D&&parseInt(D.kpi_ini)>parseInt(D.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(tt,{label:s.kpi_useParent?Object(S.r)("$__budget"):"time"===s.kpi_type?Object(S.r)("$__minimumMinutes",1):Object(S.r)("$__initialValue",1),variant:"outlined",name:"kpi_ini",error:!(!L||!L.kpi_ini),helperText:L&&L.kpi_ini?Object(S.r)("$__valueExceedAllocatedValue",1):null,InputLabelProps:{shrink:!0,step:.01},InputProps:{autoComplete:"new-password",startAdornment:a.a.createElement("span",{style:{color:"lightgray",fontSize:8}},"currency"===s.kpi_type&&o.currency.filter((function(e){return s.kpi_currency&&String(e.value)===String(s.kpi_currency)||!s.kpi_currency&"BRL"===String(e.value)}))[0]?o.currency.filter((function(e){return s.kpi_currency&&String(e.value)===String(s.kpi_currency)||!s.kpi_currency&"BRL"===String(e.value)}))[0].symbol:"")},onChange:function(e){P({name:"kpi_ini",value:"time"===s.kip_type?Object(S.e)(e.target.value,0):Object(S.e)(e.target.value,2)})},value:s.kpi_ini})):a.a.createElement(a.a.Fragment,null),!s.kpi_useParent||s.kpi_useParent&&D&&parseInt(D.kpi_ini)<parseInt(D.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(tt,{label:s.kpi_useParent?Object(S.r)("$__goal"):"time"===s.kpi_type?Object(S.r)("$__maximumMinutes",1):Object(S.r)("$__finalValue",1),variant:"outlined",name:"kpi_fin",type:"number",error:!(!L||!L.kpi_fin),helperText:L&&L.kpi_fin?Object(S.r)("$__valueExceedAllocatedValue",1):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",startAdornment:a.a.createElement("span",{style:{color:"lightgray",fontSize:8}},"currency"===s.kpi_type&&o.currency.filter((function(e){return s.kpi_currency&&String(e.value)===String(s.kpi_currency)||!s.kpi_currency&"BRL"===String(e.value)}))[0]?o.currency.filter((function(e){return s.kpi_currency&&String(e.value)===String(s.kpi_currency)||!s.kpi_currency&"BRL"===String(e.value)}))[0].symbol:"")},onChange:function(e){P({name:"kpi_fin",value:"time"===s.kip_type?Object(S.e)(e.target.value,0):Object(S.e)(e.target.value,2)})},value:s.kpi_fin})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:t.switch},a.a.createElement(hr,{checked:!!s.kpi_reqMessage,onChange:function(e){P({name:"kpi_reqMessage",value:!s.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__reqDescription",1)))):a.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},a.a.createElement(Nr,{data:s,chartShow:!1}),a.a.createElement("div",{style:{position:"absolute",top:103,bottom:0,left:0,right:0}},a.a.createElement(Ea,{noSearch:!0,nodeId:s._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:s.kpi_type})))))}))),Go=function(e){return{root:{position:"relative",float:"left",width:"calc(100% - 20px)",margin:"10px"},progress:{marginLeft:"7px",width:"calc(100% - 14px)"},image:{width:"100%",paddingTop:"48%",backgroundPosition:"center",backgroundSize:"cover"}}};var Ho=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Go)((function(e){var t=e.classes,r=c.a.getState().sideModule,n=r.data||{};return a.a.createElement("div",{className:t.root},r.data.image&&a.a.createElement("div",{className:t.image,style:{backgroundImage:"url(".concat(r.data.image,")")}}),n.kpi_type&&a.a.createElement(Nr,{data:n,chartShow:!0}))})));function Wo(){Wo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Uo,Vo,qo=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.sideModule,i=(r.session,n.planType),l=o.data||{},s=a.a.useState(!1),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){y||("link"===l.type&&"new"===l._id&&g(!0),x(!0))}));var _=function(t,r){(t.value&&!o.data[t.name]||o.data[t.name]&&o.data[t.name]!==t.value)&&g(!0);var n=Object(d.a)(Object(d.a)({},o.data),{},Object(f.a)({},t.name,t.value));r&&r.name&&r.value&&(n=Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},r.name,r.value))),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:Object(d.a)(Object(d.a)({},o.data),n)}))},O=function(t){m&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},w=function(){var t=Object(p.a)(Wo().mark((function t(){var r,n=arguments;return Wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],g(!1),o.data.name){t.next=6;break}Object(S.c)({message:Object(S.r)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(st.G)(e,!0,o.data);case 8:t.sent&&Object(S.c)({message:Object(S.r)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&O(!0);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){var t=Object(p.a)(Wo().mark((function t(){return Wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(p.a)(Wo().mark((function t(){return Wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.M)(e,{cardId:l._id,_planId:l._planId});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),E=n.dataType.filter((function(e){return e.name===o.data.type}))[0];return a.a.createElement(a.a.Fragment,null,a.a.createElement(sa,{save:m?function(){w()}:null,saveClose:m?function(){w(!0)}:null,close:function(){O(!0)}}),a.a.createElement("div",{className:t.root},"plan"!==l.type?a.a.createElement(a.a.Fragment,null,Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&!n.cards[e].checklist})).length>0?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__unLinkCards",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__unLinkCardsDescription",1)),a.a.createElement(po,{onClick:function(){j()}},Object(S.r)("$__unLinkCards",1))):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!E.hideFields||E.hideFields&&-1===E.hideFields.indexOf("type"))&&a.a.createElement(La,{id:"combo-box-demo",options:n.type,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:l&&l.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(l.type)}))[0]:n.type[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__type",1),variant:Object(S.d)("fieldVariant"),value:l&&l.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(l.type)}))[0]:n.type[0]}))},onChange:function(e,t){_({name:"type",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),"plan"===l.type?a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(La,{id:"combo-box-demo",options:i,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:l&&l.planType?i.filter((function(e){return e.value===l.planType}))[0]:i[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:l&&l.planType?i.filter((function(e){return e.value===l.planType}))[0]:i[0]}))},onChange:function(e,t){_({name:"planType",value:t.value})}}),i.filter((function(e){return!l.planType||l.planType&&e.value===l.planType&&!0===e.swot})).length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",color:Object(S.d)("color")}},a.a.createElement(ae.a,{icon:Do.a,color:Object(S.d)("color"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},"MATRIX SWOT"))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,Object(S.r)(i.filter((function(e){return!l.planType||l.planType&&e.value===l.planType}))[0].description,1))):a.a.createElement(a.a.Fragment,null)))})));function Xo(){Xo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ko=w.default.div(Uo||(Uo=Object(u.a)(["\n background-color:none\n "]))),Jo=(w.default.div(Vo||(Vo=Object(u.a)(["background-color:red\n padding:7px"]))),Object(s.b)((function(e,t){return{cards:Object.keys(e.db.cards).filter((function(r){return e.db.cards[r]._parent===t.nodeId}))}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(c.a.getState().functions.socket,a.a.useState(e.name?e.name:"")),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=window.location.hash.split("/");O[0]=O[0].replace("#",""),36!==O[0].length&&(O[0]=null),a.a.useEffect((function(){return w(),function(){}}),[]);var w=function(){var t=Object(p.a)(Xo().mark((function t(){return Xo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.a)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),[e.nodeId],!1,null,"childrens");case 2:t.sent&&_(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j={};c.a.getState().db[e.db]&&c.a.getState().db[e.db][e.nodeId]&&(j=c.a.getState().db[e.db][e.nodeId]);var k=Object.keys(c.a.getState().db.cards).filter((function(t){if(!c.a.getState().db.cards[t].deleted&&!c.a.getState().db.cards[t].checklist&&!c.a.getState().db.cards[t]._recurrenceId&&c.a.getState().db.cards[t]._parent===e.nodeId&&(!c.a.getState().db.cards[t].private||c.a.getState().db.cards[t].private&&c.a.getState().db.cards[t]._users[n._id]))return!0})).map((function(e){return e})),L=function(){var e=Object(p.a)(Xo().mark((function e(){var t,r;return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.a.getState().functions.socket,r="task",j&&j.type&&(j.type.indexOf("guideline")>-1&&(r="objective"),"objective"===j.type&&(r="goal"),"goal"===j.type&&(r="task")),j.childrenAutoTag&&j._tags&&j._tags.length>0&&console.log(j),t.emit("data",{module:"cards",method:"post",action:"add"},Object(d.a)({_parent:j._id,planId:j._planId?j._planId:null,name:l,type:r,status:"notStarted"},j.childrenAutoTag&&j._tags&&j._tags.length>0?{_tags:j._tags}:{}),function(){var e=Object(p.a)(Xo().mark((function e(r){return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.emit("card.UPD",{cardId:r.id,cardData:Object(d.a)(Object(d.a)({},r.data),{},{_planId:j._planId?j._planId:null,_parent:j._id,_timeline:Object(f.a)({},r.log._id,Object(d.a)(Object(d.a)({},r.log),{},{_parent:[r.id]})),_users:Object(f.a)({},n._id,{name:c.a.getState().db.users[n._id].name?c.a.getState().db.users[n._id].name:null,displayName:c.a.getState().db.users[n._id].displayName?c.a.getState().db.users[n._id].displayName:null,image:c.a.getState().db.users[n._id].image?c.a.getState().db.users[n._id].image:null,access:5,_id:n._id})})}),s("");case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var t=Object(p.a)(Xo().mark((function t(n){var a,o,i,l,s;return Xo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(c.a.getState().db.cards).filter((function(t){if(c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].checklist&&c.a.getState().db.cards[t]._parent===e.nodeId)return!0})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return e})),o=n.destination,i=n.source,l=n.draggableId,o){t.next=4;break}return t.abrupt("return",!1);case 4:if(o.droppableId!==i.droppableId||o.id!==i.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(s=a).splice(i.index,1),s.splice(o.index,0,l),t.abrupt("return");case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var e=Object(p.a)(Xo().mark((function e(t){return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(p.a)(Xo().mark((function e(t){return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(x)return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.r)("$__loadingCatenation")),a.a.createElement(Or,null));var F=k.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){return r.cards[e].name.toLowerCase()<r.cards[t].name.toLowerCase()?-1:r.cards[e].name.toLowerCase()>r.cards[t].name.toLowerCase()?1:0})),N=k.filter((function(e){return"completed"===r.cards[e].status})).sort((function(e,t){return r.cards[e].name.toLowerCase()<r.cards[t].name.toLowerCase()?-1:r.cards[e].name.toLowerCase()>r.cards[t].name.toLowerCase()?1:0}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Zt.a,{onDragEnd:C,onDragStart:I,onDragUpdate:T},a.a.createElement(Zt.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(Ko,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),F.length>0?F.map((function(e,t){return a.a.createElement(Zt.b,{draggableId:e,index:t,key:e},(function(t,n){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(Dn,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0}))}))})):a.a.createElement(a.a.Fragment,null),N.length>0?N.map((function(n,o){return a.a.createElement("div",{key:n},a.a.createElement(Dn,{provided:e,snapshot:t,data:r.cards[n],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0}))})):a.a.createElement(a.a.Fragment,null),e.placeholder)}))),!g&&a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement("div",null,a.a.createElement(Ee,{reverse:!0,text:Object(S.r)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){b(!g)}}))),g&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(tt,{label:Object(S.r)("$__taskTitle"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onBlur:function(e){""===e.target.value&&b(!g)},onKeyDown:function(e){13===e.keyCode&&l&&L(),27===e.keyCode&&(b(!g),s(""))}},autoFocus:!0,value:l,placeholder:Object(S.r)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(E.a,{title:Object(S.r)("$__save",1),color:"green",icon:"save",onClick:function(e){L()},transparent:!0}),a.a.createElement(E.a,{title:Object(S.r)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){b(!g),s("")},transparent:!0})))))})));function Zo(){Zo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Qo=function(){var e=Object(p.a)(Zo().mark((function e(t){var r,n,a,o,i,c,l,s;return Zo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,t.searchText,n=t.page,a=void 0===n?0:n,o=t.limit,i=void 0===o?20:o,c=t.asc,void 0!==c&&c,l=t.childrens,void 0!==l&&l,e.next=3,new Promise(function(){var e=Object(p.a)(Zo().mark((function e(n,o){var c,l;return Zo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/Files_List_V2/",{ids:r,type:t.type?t.type:"cards",limit:i,skip:a*i});case 3:(c=e.sent)&&c.data&&(l=c.data,n(l)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),o(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(s=e.sent)){e.next=6;break}return e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ei=function(){var e=Object(p.a)(Zo().mark((function e(t){var r;return Zo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(p.a)(Zo().mark((function e(r,n){var a;return Zo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/Files_Folders/",{ids:t&&t.ids?t.ids:[],childrens:!(!t||!t.childrens)&&t.childrens,types:t&&t.types?t.types:null});case 3:(a=e.sent)&&a.data&&r(a.data),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),n(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 2:if(!(r=e.sent)){e.next=5;break}return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ti=function(){var e=Object(p.a)(Zo().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,f;return Zo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,n=t.search,a=t.skip,o=void 0===a?null:a,i=t.limit,c=void 0===i?null:i,l=t.asc,s=void 0!==l&&l,u=t.childrens,d=void 0!==u&&u,e.next=3,new Promise(function(){var e=Object(p.a)(Zo().mark((function e(a,i){var l,u;return Zo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/Files_Nav/",{ids:r,skip:o,limit:c,search:n,asc:s,type:t.type?t.type:"cards",childrens:d});case 3:(l=e.sent)&&l.data&&(u=l.data,a(u)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),i(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(f=e.sent)){e.next=6;break}return e.abrupt("return",f);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ri(){ri=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ni=Object(s.b)((function(e){return{showPrivate:e.controls.lockPrivate}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=(t.session,a.a.useState(null)),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(m),u=Object(h.a)(s,2),m=u[0],g=(u[1],a.a.useState([])),b=Object(h.a)(g,2),v=(b[0],b[1]),y=a.a.useState(!0),x=Object(h.a)(y,2),_=(x[0],x[1]),O=a.a.useState({}),w=Object(h.a)(O,2),j=w[0],E=w[1],k=a.a.useState(""),L=Object(h.a)(k,2),C=L[0],I=L[1],T=e.idPlan?e.idPlan:null;a.a.useEffect((function(){return F({id:T}),ei(),function(){v([]),E({}),_(!0)}}),[]);var F=function(){var t=Object(p.a)(ri().mark((function t(r,n){var a,o;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ei({ids:r&&r.id?[r.id]:[],childrens:!1,types:e&&e.types?e.types:null});case 2:(a=t.sent)&&(o=n||j,T&&(o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},T,{name:c.a.getState().db.cards[T].name,parent:c.a.getState().db.cards[T]._parent,private:null,type:"plan",_id:T,open:!0}))),a.map((function(e){o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},o[e._id]?o[e._id]:{}),e)))})),E(o));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),N=function(){var e=Object(p.a)(ri().mark((function e(t){var r,n,a,o,i,c,l=arguments;return ri().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=l.length>1&&void 0!==l[1]&&l[1],n=t.id,a=void 0===n?null:n,o=t.type,i=void 0===o?null:o,c=j,c=Object(d.a)(Object(d.a)({},c),{},Object(f.a)({},a,Object(d.a)(Object(d.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(j).filter((function(e){return j[e].parent===a})).length?F({id:a,type:i},c):E(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(t,n){return a.a.createElement("div",{key:n,style:{position:"relative",float:"left",clear:"both",cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7,width:"100%"},onClick:function(r){(!t.private||t.private&&c.a.getState().controls.lockPrivate)&&(N({id:n},!j[n]||!j[n].open),l(n),e&&e.onSelect&&e.onSelect(j[n])),r.preventDefault(),r.stopPropagation()}},a.a.createElement(wn,{title:"".concat(t.private&&!c.a.getState().controls.lockPrivate?Object(S.r)("$__private"):t.name),tooltipText:"".concat(t.private&&!c.a.getState().controls.lockPrivate?Object(S.r)("$__private"):t.name),icon:(t.private&&!c.a.getState().controls.lockPrivate?"private_connectivity":t.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===t.type}))[0].icon)||"$__topic",fontSize:"12px",color:t.private&&!c.a.getState().controls.lockPrivate?"lightgray":i&&i===n?Object(S.d)("color"):Object(S.d)("gray")}),j[n]&&j[n].open?A(n):a.a.createElement(a.a.Fragment,null))},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(j).filter((function(t){return!e||e&&j[t].parent===e})).length>0?Object.keys(j).filter((function(t){return!e||e&&j[t].parent===e})).sort((function(e,t){return console.log(j[e]),j[e].step&&j[t].step&&parseInt(j[e].step)<parseInt(j[t].step)?-1:j[e].step&&j[t].step&&parseInt(j[e].step)>parseInt(j[t].step)?1:j[e].name.toLowerCase().trim()<j[t].name.toLowerCase().trim()?-1:j[e].name.toLowerCase().trim()>j[t].name.toLowerCase().trim()?1:0})).map((function(e){return D(j[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",backgroundColor:"#FFFFFF",clear:"both",paddingTop:"15px"}},a.a.createElement("div",null,a.a.createElement("div",{style:{display:"flex",marginTop:-10}},a.a.createElement(tt,{label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:C,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){I(e.target.value)},onKeyDown:function(e){}}})),a.a.createElement("div",{style:{position:"relative",maxHeight:"40vh",overflowX:"auto",backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"solid 0.5px rgba(0,0,0,0.1)",padding:15}},Object.keys(j).filter((function(e){return"chatGroup"!==j[e].type&&((!T||T&&36!==T.length)&&!j[e].parent||T&&36===T.length&&j[e]._id===T)&&(""===C||C&&j[e].name.toLowerCase().indexOf(C.toLowerCase().trim())>-1)})).sort((function(e,t){return j[e].name.toLowerCase().trim()<j[t].name.toLowerCase().trim()?-1:j[e].name.toLowerCase().trim()>j[t].name.toLowerCase().trim()?1:0})).map((function(e){return D(j[e],e)}))))))}));function ai(){ai=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var oi=function(e){var t=c.a.getState().db;return a.a.createElement(La,{id:"combo-box-demo",options:e.ignoreValues?t.automation.filter((function(t){return-1===e.ignoreValues.indexOf(t.value)})):t.automation,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:e.name||"AutomationAction",disableClearable:!0,value:e.value?t.automation.filter((function(t){return String(t.value)===e.value}))[0]:t.automation[0],renderInput:function(r){return a.a.createElement(tt,Object.assign({},r,{label:Object(S.r)("$__action",1),variant:Object(S.d)("fieldVariant"),inputProps:Object(d.a)(Object(d.a)({},r&&r.inputProps?r.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},r&&r.inputProps&&r.inputProps.style?r.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)"})}),value:e.value?t.automation.filter((function(t){return String(t.value)===e.value}))[0]:t.automation[0]}))},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",null,Object(S.r)(e.label,1))},onChange:function(t,r){e.onChange(r.value)}})},ii=Object(s.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id],cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){var t,r=e.classes,n=e.sideModule,o=c.a.getState(),i=o.db,l=o.session,s=i.planType,u=a.a.useState({}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState({}),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState(!1),j=Object(h.a)(w,2),k=j[0],L=j[1],C=a.a.useState(!1),I=Object(h.a)(C,2),T=I[0],F=I[1],N=a.a.useState(!1),D=Object(h.a)(N,2),A=D[0],P=D[1],$=a.a.useState(null),z=Object(h.a)($,2),M=(z[0],z[1]),B=a.a.useState(null),Y=Object(h.a)(B,2),R=(Y[0],Y[1]),G=a.a.useState(!1),H=Object(h.a)(G,2),W=(H[0],H[1]),U=a.a.useState((null===(t=n.data)||void 0===t?void 0:t.onConcludedStepMoveTo)||null),V=Object(h.a)(U,2),q=V[0],X=V[1],K=Object(S.j)(),J=Object(st.t)(n.id);a.a.useEffect((function(){g._id!==n.data._id&&(b(n.data),L(!1)),A||(n.data.startDate&&M(n.data&&n.data.startDate?n.data.startDate:null),n.data.endDate&&R(n.data&&n.data.endDate?n.data.endDate:null),b(n.data),L(!1),"link"!==g.type||g.name||re(),P(!0),Z()),n.data.name&&""!==n.data.name.trim()&&"link"===n.data.type&&"new"===n.data._id&&(L(!0),e.reqSave&&e.reqSave(!0))}),[n.data,g]),a.a.useEffect((function(){!g.name||g.name&&""===g.name.trim?L(!1):L(!0)}),[x]);var Z=function(){var t=Object(p.a)(ai().mark((function t(){return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{idRel:[n.data._id],cardLoad:"parents"});case 2:t.sent&&W(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Q=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!n.data[t.name]&&!g[t.name]||n.data[t.name]&&n.data[t.name]!==t.value||a)&&e.reqSave&&e.reqSave(!0);var o=Object(d.a)(Object(d.a)({},g),{},Object(f.a)({},t.name,t.value));r&&r.name&&r.value&&(o=Object(d.a)(Object(d.a)(Object(d.a)({},g),o),{},Object(f.a)({},r.name,r.value))),b(o),O(Object(d.a)(Object(d.a)({},x),{},Object(f.a)({},t.name,t.value),r&&r.name&&r.value?Object(f.a)({},r.name,r.value):{}))},ee=function(t){k&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},te=function(){var t=Object(p.a)(ai().mark((function t(){var r,a=arguments;return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],T){t.next=19;break}if(L(!1),e.reqSave&&e.reqSave(!1),g.status||(g.status="notStarted"),"new"===n.id&&n.data&&b(Object(d.a)(Object(d.a)({},g),n.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:g})),g.name&&(!g.name||""!==g.name.trim())){t.next=12;break}F(!1),Object(S.c)({message:Object(S.r)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(st.G)(Object(d.a)(Object(d.a)({},e),{},{store:Object(d.a)(Object(d.a)({},e.store),{},{db:Object(d.a)({},c.a.getState().db)})}),r,g);case 14:t.sent&&(x&&x.status&&(Object(st.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:g._id}}),{status:x.status}),Object(st.f)(e,g._id,x.status)),F(!1),Object(S.c)({message:Object(S.r)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),L(!1),e.reqSave&&e.reqSave(!1),r&&ee(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),re=function(){var t=Object(p.a)(ai().mark((function t(){var r;return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ut.a.post("/link/content",{url:g.url});case 2:r=t.sent,b(Object(d.a)(Object(d.a)({},g),{},{content:r.data.article})),L(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ne=n.data&&n.data.type?i.dataType.filter((function(e){return e.name===n.data.type}))[0]:{};if(g._parent&&c.a.getState().db.cards[g._parent],!g)return null;var oe=c.a.getState().db.cards[g._id]&&c.a.getState().db.cards[g._id]._users&&c.a.getState().db.cards[g._id]._users[l._id]&&c.a.getState().db.cards[g._id]._users[l._id].myDay?c.a.getState().db.cards[g._id]._users[l._id].myDay:null,ie=(!oe||oe&&oe&&(_()(new Date(1e3*oe)).format("YYYY/MM/DD"),_()().format("YYYY/MM/DD")),g.isTemplate?g.isTemplate:Object(st.R)(g._id),!!e.permission&&e.permission);if(!g||!g._planId||i.cards[g._planId]&&Object(st.C)(g._planId)||(ie=!1),!ie&&parseInt(J)>=4&&(ie=!0),!ie&&Object(st.C)(g._planId)&&K&&K.admin&&K.plan&&(K.planAdmin||K.planModerate)&&(ie=!0),a.a.Fragment,g&&g.url&&g.url.indexOf(".youtube.com/watch?")>-1){var ce=g.url.split("?")[1].split("v=")[1].split("&")[0];ce&&(a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(ce),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),!0)}if(g&&g.url&&g.url.indexOf("//youtu.be/")>-1){var le=g.url.split(".be/")[1];le&&(a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(le),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),!0)}return a.a.createElement(a.a.Fragment,null,a.a.createElement(sa,{save:k?function(){F(!0),te()}:null,saveClose:k?function(){F(!0),te(!0)}:null,saveLoader:T,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:r.root},a.a.createElement("div",{className:r.data},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"step"===g.type&&g._id&&ie?a.a.createElement(E.a,{title:Object(S.r)("$__openBoard",1),icon:"launch",color:"lightgray",onClick:function(){console.log("openBoard",g._id)},size:"25px"}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===g.type&&g._id?Object(S.r)("$__plan ".concat(g.planType?s[1].label:s[0].label),1):Object(S.r)("$__data",1)),g.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",marginTop:-8,textAlign:"right"}},Object(S.r)("$__createdAt"),": ",Object(S.k)(g.created_at)):a.a.createElement(a.a.Fragment,null),a.a.createElement(tt,{label:Object(S.r)(ne&&ne.fieldsTitle&&ne.fieldsTitle.name?ne.fieldsTitle.name:"$__titleOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){Q(e.target)}},value:g&&g.name?g.name:"",placeholder:Object(S.r)(ne&&ne.fieldsTitle&&ne.fieldsTitle.placeholder&&ne.fieldsTitle.placeholder.name?ne.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(ie&&"completed"!==g.status&&!(ne&&ne.disabledFields&&ne.disabledFields.indexOf("name")>-1))}),J>3||g.description||ie?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"toc"})),onChange:function(e){Q(e.target)}},value:g&&g.description?g.description:"",placeholder:Object(S.r)("$__descriptionOfCard_placeholder",1),disabled:!(ie&&"completed"!==g.status&&!(ne&&ne.disabledFields&&ne.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!g.showSumValues,onChange:function(e){Q({name:"showSumValues",value:!g.showSumValues})},name:"showSumValues",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__showSumValues",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!g.requireValue,onChange:function(e){Q({name:"requireValue",value:!g.requireValue})},name:"requireValue",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__requireValue",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__automation",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__users",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.r)("$__automationUsersExplain",1)),a.a.createElement(oi,Object.assign({value:g.automationUsers||null,onChange:function(e){Q({name:"automationUsers",value:e})}},"0"===g.step?{ignoreValues:["remove"]}:{})),g._id&&i.cards[g._id]&&i.cards[g._id]._users&&a.a.createElement(Nt,{_id:g._id,noLimit:!0,avatarSize:"33px",permission:ie}),!g.automationUsers||"remove"!==g.automationUsers&&"replace"!==g.automationUsers?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!g.removeCreatorUser,onChange:function(e){Q({name:"removeCreatorUser",value:!g.removeCreatorUser})},name:"removeCreatorUser",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__keepUserWhoCreatedActivity",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__dueDate",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__due",1)),a.a.createElement(oi,{value:g.automationDueDateType||null,onChange:function(e){Q({name:"automationDueDateType",value:e})},ignoreValues:["replace"]}),g.automationDueDateType&&"add"===g.automationDueDateType?a.a.createElement(tt,{label:Object(S.r)("$__automationDueDate",1),variant:Object(S.d)("fieldVariant"),name:"automationDueDate",min:1,InputProps:{type:"number",min:1,autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},Object(S.r)("$__days","*")),onChange:function(e){var t=e.target.value||1;parseInt(t)<1&&(t=1),Q({name:"automationDueDate",value:t})}},value:g&&g.automationDueDate?g.automationDueDate:1}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__tags",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__tags",1)),a.a.createElement(oi,{value:g.automationTags||null,onChange:function(e){Q({name:"automationTags",value:e})}}),g.automationTags&&"doNotChange"!==g.automationTags?a.a.createElement(Fo,{data:{values:g._tags?g._tags:[]},callBack:function(e){ie&&Q({name:"_tags",value:e})},disabled:!(ie&&"completed"!==g.status&&!(ne&&ne.disabledFields&&ne.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.r)("$__selectTheOptions",1)}):a.a.createElement(a.a.Fragment,null))),Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===g._parent&&"step"===c.a.getState().db.cards[e].type&&!c.a.getState().db.cards[e].deleted})).length===parseInt(g.step)+1?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.r)("$__onConcludedStepMoveTo",1)),a.a.createElement("div",{className:r.switch},q&&q===g.onConcludedStepMoveTo?a.a.createElement(E.a,{title:Object(S.r)("$__selectTarget",1),text:Object(S.r)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){X(null)},size:"14px",textSize:"14px"}):a.a.createElement("div",null,a.a.createElement(ni,{onSelect:function(t){console.log(t),c.a.getState().db.cards[t._id]||Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"parents",idRel:t._id}),X(t._id)},ignoreTypes:["chatGroup"],types:["plan","guideline","guidelineC","guidelineD","guidelineE","guidelineR","objective","goal","step"]}),q&&q!==g.onConcludedStepMoveTo?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(E.a,{title:Object(S.r)("$__cancel",1),text:Object(S.r)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){Q({name:"onConcludedStepMoveTo",value:(null===g||void 0===g?void 0:g.onConcludedStepMoveTo)||null})}}),a.a.createElement(E.a,{title:Object(S.r)("$__save",1),text:Object(S.r)("$__save",1),color:Object(S.d)("menu"),icon:"check",onClick:function(){Q({name:"onConcludedStepMoveTo",value:q})}})):a.a.createElement(a.a.Fragment,null)),g.onConcludedStepMoveTo&&q===g.onConcludedStepMoveTo&&c.a.getState().db.cards[g.onConcludedStepMoveTo]?a.a.createElement(a.a.Fragment,null,a.a.createElement(vr,{id:g.onConcludedStepMoveTo,showLegend:!0,legend:Object(S.r)("$__target")})):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__status",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__changeStatusTo",1)),a.a.createElement(oi,{value:g.automationStatusType||null,onChange:function(e){Q({name:"automationStatusType",value:e})},ignoreValues:["add","remove"]}),g.automationStatusType&&"doNotChange"!==g.automationStatusType?a.a.createElement(La,{id:"combo-box-demo",options:i.status,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"automationStatus",disableClearable:!0,value:g&&g.automationStatus&&i.status?i.status.filter((function(e){return String(e.value)===String(g.automationStatus)}))[0]:i.status[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__status",1),variant:Object(S.d)("fieldVariant"),value:g&&g.automationStatus&&i.status?i.status.filter((function(e){return String(e.value)===String(g.automationStatus)}))[0]:i.status[0]}))},onChange:function(e,t){(ie||"0"!==String(J))&&Q({name:"automationStatus",value:t.value})}}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.r)("$__automationApprovalExplain",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!g.requireApproval,onChange:function(e){Q({name:"requireApproval",value:!g.requireApproval})},name:"requireApproval",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__requireApproval",1)),g.requireApproval?a.a.createElement(Nt,{_id:g._id,noLimit:!0,avatarSize:"33px",permission:ie,customDefine:{name:"approvalResponsible",icon:"gavel"}}):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.r)("$__showInPanel",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!g.showInPanel,onChange:function(e){Q({name:"showInPanel",value:!g.showInPanel})},name:"showInPanel",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__permitOpenTicketInPanel",1)),g.showInPanel?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(za,{data:{values:g.showGroups||[],_id:g._id},options:c.a.getState().db.userGroup?c.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){Q({name:"showGroups",value:e})}})),a.a.createElement(tt,{label:Object(S.r)("$__shortCutTitle",1),variant:Object(S.d)("fieldVariant"),name:"shortCutTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){Q(e.target)}},value:g&&g.shortCutTitle?g.shortCutTitle:"",placeholder:Object(S.r)("$__shortCutTitlePlaceholder")}),a.a.createElement(tt,{label:Object(S.r)("$__shortCutDescription",1),variant:Object(S.d)("fieldVariant"),name:"shortCutDescription",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"toc"})),onChange:function(e){Q(e.target)}},value:g&&g.shortCutDescription?g.shortCutDescription:"",placeholder:Object(S.r)("$__shortCutDescriptionPlaceholder",1)}),a.a.createElement(tt,{label:Object(S.r)("$__shortCutButtonToAdd",1),variant:Object(S.d)("fieldVariant"),name:"shortCutButtonToAdd",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){Q(e.target)}},value:g&&g.shortCutButtonToAdd?g.shortCutButtonToAdd:"",placeholder:Object(S.r)("$__shortCutButtonToAddPlaceholder")}),a.a.createElement("div",{className:r.switch},a.a.createElement(hr,{checked:!!g.requireDescription,onChange:function(e){Q({name:"requireDescription",value:!g.requireDescription})},name:"requireDescription",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__requireDescription",1))):a.a.createElement(a.a.Fragment,null))))))})));var ci=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){var t=e.classes,r=c.a.getState(),n=(r.db,r.sideModule.data||{}),o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),d=Object(h.a)(u,2),p=d[0],f=d[1];return a.a.useEffect((function(){p||("link"===n.type&&"new"===n._id&&s(!0),f(!0))})),a.a.createElement(a.a.Fragment,null,a.a.createElement(sa,{save:l?function(){}:null,saveClose:l?function(){}:null,close:function(){}}),a.a.createElement("div",{className:t.root},a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__integration",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__useIdToFeelFlowIdIntegration",1)),a.a.createElement("div",{style:{fontSize:14,fontWeight:"bold",color:"blue"}},n._id))))}))),li=Object(z.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}},sm:{width:e.spacing(3),height:e.spacing(3)},md:{width:e.spacing(5),height:e.spacing(5)},lg:{width:e.spacing(7),height:e.spacing(7)}}}));function si(e){var t=li(),r=Object(d.a)({},e);return r.title&&delete r.title,e.title?a.a.createElement(Ge.a,{title:e.title},a.a.createElement(Se.a,Object.assign({},r,{className:t[e.size]}),e.children)):a.a.createElement(Se.a,Object.assign({},r,{className:t[e.size]}),e.children)}function ui(){ui=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var di=Object(s.b)((function(e){return{history:e.db.history,showPrivate:e.controls.lockPrivate,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,l=c.a.getState().db,s=a.a.useState(e.data),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){return function(){}}),[]),a.a.useEffect((function(){0===e.unlockedPrivates&&y(!1)}),[e.unlockedPrivates]);var x=f.name.split("."),_=x[x.length-1];"blob"===f.name&&(f.name="".concat(Object(S.r)("$__coverImage","*"),".jpg"),_="jpg");var O="attachment";c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1})).length>0&&(O=c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(f.file));var w=function(){var e=Object(p.a)(ui().mark((function e(t){return ui().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{i.emit("data",{module:"node",method:"put",action:"update"},Object(d.a)({_id:f._id},t),Object(p.a)(ui().mark((function e(){return ui().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m(Object(d.a)(Object(d.a)({},f),t));case 1:case"end":return e.stop()}}),e)}))))}catch(r){console.log(r)}case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j="img";return l.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1})).length>0&&l.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].viewer&&(j=l.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].viewer),a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},f.in&&f.in.private&&!e.showPrivate&&!v?a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",justifyContent:"center",backgroundColor:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7,display:"flex"}},a.a.createElement(ae.a,{icon:"lock",size:"17px"})):a.a.createElement(a.a.Fragment,null,"string"===typeof O&&-1===O.indexOf("https")&&-1===O.indexOf("svg")?a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox()}},a.a.createElement(ae.a,{icon:O,size:"33px"})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",backgroundImage:'url("'.concat(O,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7,cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox()}})),a.a.createElement("div",{style:{display:"flex",paddingLeft:15,alignItems:"center",maxWidth:"calc(100% - 40px)"},onClick:function(t){var r=!(!f.in||!f.in.private||e.showPrivate||v);e.openLightBox&&!r&&e.openLightBox()}},f.in&&f.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===f.in.db&&f.in._id===o._id?a.a.createElement("div",null,a.a.createElement(si,{alt:f.createdBy.name,src:f.createdBy.image,style:{width:"21px",height:"21px"}},f.createdBy.name)):a.a.createElement(a.a.Fragment,null),"User"===f.in.db&&f.in._id!==o._id?a.a.createElement("div",null,a.a.createElement(si,{alt:f.in.name,src:f.in.image,style:{width:"21px",height:"21px"}},f.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(at,{private:!(!f.in||!f.in.private||c.a.getState().controls.lockPrivate),unlockedPrivates:e.unlockedPrivates,setPrivate:function(t){var r=t?1:-1;t||0!==e.unlockedPrivates||(r=0),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r}))},title:"".concat("User"===f.in.db?"".concat(Object(S.r)("$__chatWithUser","*")," - ").concat(f.in._id!==o._id?"".concat(f.in.name):"".concat(f.createdBy.name)):"chatGroup"===f.in.type?"".concat(Object(S.r)("$__chatGroup","*")," - ").concat(f.in.name):"User"!==f.in.db&&"chatGroup"!==f.in.type?"".concat(f.in.name):""),icon:"User"===f.in.db||"chatGroup"===f.in.type?null:f.in.type&&l&&l.dataType&&l.dataType.filter((function(e){return e.name===f.in.type}))[0]&&l.dataType.filter((function(e){return e.name===f.in.type}))[0].icon||"$__topic",color:Object(S.d)("medium"),style:{padding:"7px",minHeight:"21px !important",textAlign:"left"},textStyle:!0}),a.a.createElement("span",{style:{marginRight:7}},"/")),a.a.createElement(at,{private:!(!f.in||!f.in.private||c.a.getState().controls.lockPrivate),unlockedPrivates:e.unlockedPrivates,setPrivate:function(t){console.log(t,t);var r=t?1:-1;t||0!==e.unlockedPrivates||(r=0),y(!!t),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,privateTitle:Object(S.r)("$__privateFile"),title:f.name,value:f.name.replace(".".concat(_),""),searchText:e.searchText?e.searchText:null,color:e.dark?Object(S.d)("lightgray"):Object(S.d)("gray"),editable:!!e.admin,_id:f._id,dark:!!e.dark,inputStyle:e.dark?{backgroundColor:"rgba(250,250,250,0.8)",borderRadius:7}:null,textStyle:{fontSize:12,fontWeight:"normal"},searchTextStyle:Object(d.a)({fontSize:12},e.dark?{color:"#FFFFFF"}:{}),style:{minHeight:"21px !important"},onEdit:e.admin?function(e){w({name:"".concat(e,".").concat(_)})}:null}))),"audio"===j&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},a.a.createElement(le.a,{src:"https://machen.azureedge.net/".concat(f.file),controls:!0})),f.createdBy&&a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"57px",clear:"both"}},f.in&&!f.in.private?a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"lightgray",fontSize:10,marginRight:7}},Object(S.r)("$__sendedBy"),":"),a.a.createElement(si,{alt:f.createdBy.name,src:f.createdBy.image,style:{width:"15px",height:"15px"}},f.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},f.createdBy.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement("span",{style:{marginLeft:3}},Object(S.k)(f.created_at)))),e.showParent&&(f.timelineId||f.message)&&(l.cards[f.cardId]&&r[f.cardId]&&r[f.cardId][f.timelineId]||f.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(ia,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:l.cards[f.cardId]&&r[f.cardId]&&r[f.cardId][f.timelineId]?r[f.cardId][f.timelineId]:f.message,db:"cards",nodeId:f.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&f.cardId&&l.cards[f.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(Dn,{db:"cards",data:l.cards[f.cardId],showConnectedIn:!0})),a.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})))}));function pi(){pi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var fi,hi,mi=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!0),i=Object(h.a)(o,2),l=(i[0],i[1]),s=a.a.useState([]),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(""),E=Object(h.a)(j,2),k=E[0],L=E[1],C=a.a.useState(0),I=Object(h.a)(C,2),T=I[0],F=I[1],N=[];a.a.useEffect((function(){return w(!0),function(){m([]),l(!0)}}),[e.nodeId]),a.a.useEffect((function(){w(!0)}),[T]),a.a.useEffect((function(){O&&D()}),[O]);var D=function(){var t=Object(p.a)(pi().mark((function t(){var n,a;return pi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v){t.next=5;break}return t.next=3,Qo({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users",page:T});case 3:(n=t.sent)&&(n.length<20&&y(!0),a=Array.from(f),n.map((function(e){0===a.filter((function(t){return t&&t.data&&e&&e.data&&t.data._id===e.data._id})).length&&a.push(e)})),m(a),l(!1),w(!1));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:N,file:t})};return a.a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"},id:"sideModule_files"},(!k&&f.length>10||k)&&a.a.createElement("div",{style:{position:"relative",padding:"10px"}},a.a.createElement(tt,{label:Object(S.r)("$__fileNameSearch",1),variant:Object(S.d)("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"find_in_page"})),onChange:function(e){L(e.target.value)}},value:Object(S.p)(k).toLowerCase(),placeholder:Object(S.r)("$__fileNameSearch")})),a.a.createElement("div",{style:{position:"absolute",bottom:0,top:f&&f.length>10?63:0,padding:15,left:0,right:0},id:"sideModule_files_list"},a.a.createElement("legend",{style:{display:"flex",alignItems:"center",color:e.dark?Object(S.d)("color"):Object(S.d)("menu"),fontSize:14}},a.a.createElement(ae.a,{color:Object(S.d)("color"),icon:"folder_open",title:Object(S.r)("$__files","*"),size:"20px",style:{marginRight:"15px"}}),Object(S.r)("$__files","*")),a.a.createElement("ul",{id:"filesList_".concat(e.nodeId),style:{listStyle:"none",padding:"0px",position:"absolute",bottom:0,top:33,overflowY:"auto",overflowX:"hidden",left:15,right:15},onScroll:e.horizontal?null:function(t){!function(t){var r=document.getElementById("filesList_".concat(e.nodeId));r.scrollTop+window.innerHeight+150>r.scrollHeight&&!O&&F(T+1)}()}},f&&f.length>0&&f.filter((function(e){return!k||""===k||k&&e.data.name.toLowerCase().indexOf(k.toLocaleLowerCase())>-1})).sort((function(e,t){return parseInt(e.data.created_at)<parseInt(t.data.created_at)})).map((function(t,o){N.push(t.data);var i=Object(d.a)(Object(d.a)({},t.data),{},{createdBy:t.createdBy}),c=!1;return(i.createdBy&&i.createdBy._id===n._id||e.nodeId&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[n._id]&&r.cards[e.nodeId]._users[n._id].access>2)&&(c=!0),a.a.createElement("li",{key:t.data._id,onClick:c?null:function(e){A(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},a.a.createElement(di,{data:i,resume:!0,dark:!!e.dark,admin:c,searchText:k,openLightBox:function(){A(t.data._id)}}))})),(f.length>0||O)&&!v?a.a.createElement("li",{style:{width:"100%",textAlign:"center",position:"relative",float:"left",color:e.dark?Object(S.d)("color"):Object(S.d)("menu")}},a.a.createElement(Or,null),Object(S.r)("$__checkingFiles","*")):0!==f.length||O?a.a.createElement(a.a.Fragment,null):Object(S.r)("$__hasNoFiles","*"))))}));function gi(){gi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var bi=w.default.div(fi||(fi=Object(u.a)(["\n background-color:none;\n "]))),vi=(w.default.div(hi||(hi=Object(u.a)(["background-color:red;\n padding:7px;"]))),Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=(t.session,c.a.getState().functions.socket),o=a.a.useState(e.name?e.name:""),i=Object(h.a)(o,2),l=(i[0],i[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=(s[0],s[1],window.location.hash.split("/"));u[0]=u[0].replace("#",""),36!==u[0].length&&(u[0]=null),c.a.getState().db[e.db]&&c.a.getState().db[e.db][e.nodeId]&&c.a.getState().db[e.db][e.nodeId];var m=Object.keys(c.a.getState().db.cards).filter((function(t){if(!c.a.getState().db.cards[t].deleted&&!c.a.getState().db.cards[t].checklist&&c.a.getState().db.cards[t]._recurrenceId&&c.a.getState().db.cards[t]._parent===e.nodeId)return!0})).map((function(e){return e})),g=function(){var t=Object(p.a)(gi().mark((function t(a){var o,i,l,s,u,p;return gi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(c.a.getState().db.cards).filter((function(t){if(c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].checklist&&c.a.getState().db.cards[t]._parent===e.nodeId)return!0})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return e})),i=a.destination,l=a.source,s=a.draggableId,i){t.next=4;break}return t.abrupt("return",!1);case 4:if(i.droppableId!==l.droppableId||i.id!==l.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(u=o).splice(l.index,1),u.splice(i.index,0,s),n.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),p={},u.map((function(e,t){return p=Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},e,r.cards[e])),p=Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},p[e]),{},{order:{low:"".concat(t+1)}}))),!0})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),p)})),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),b=function(){var e=Object(p.a)(gi().mark((function e(t){return gi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=Object(p.a)(gi().mark((function e(t){return gi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Zt.a,{onDragEnd:g,onDragStart:b,onDragUpdate:v},a.a.createElement(Zt.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(bi,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),m.sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e,t){return a.a.createElement(Zt.b,{draggableId:e,index:t,key:e},(function(t,n){return a.a.createElement(Dn,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))}))),yi=r(1838),xi=function(e){return{root:Object(f.a)({height:"auto",transform:"translateZ(0px)",flexGrow:1,zIndex:1e3},"height","100vh"),speedDial:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2),"& .MuiFab-root":{backgroundColor:Object(S.d)("color"),color:Object(S.d)("lightText"),display:"flex",alignItems:"center",justifyContent:"center"}},speedDialInvisible:{right:e.spacing(2),bottom:"-60px",position:"absolute","& .MuiFab-root":{backgroundColor:Object(S.d)("color"),color:Object(S.d)("lightText"),display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiButtonBase-root":{}}}};function _i(){_i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Oi=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(xi)((function(e){var t=e.classes,r=(c.a.getState().functions.socket,a.a.useState({name:"plan"})),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(""),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(""),g=Object(h.a)(m,2),b=g[0],v=(g[1],a.a.useState(null)),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(0),w=Object(h.a)(O,2),j=w[0],E=w[1],k=c.a.getState(),L=k.db,C=k.session,I=L.cards,T=c.a.getState().sideModule.data;a.a.useEffect((function(){Object(p.a)(_i().mark((function t(){return _i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.a)(e,null,!1,null,"plans",!1);case 2:case"end":return t.stop()}}),t)})))()}),[]);var F=a.a.useRef(null),N=[];L.dataType.filter((function(e){return e.sendTo})).map((function(e){N.push({name:e.name})}));var D=L.users[Object.keys(L.users).find((function(e){return e.indexOf(C._id)>-1}))]._access,A=0;C._id&&L.cards[T._id]&&L.cards[T._id]._users&&L.cards[T._id]._users[Object.keys(L.cards[T._id]._users).find((function(e){return e.indexOf(C._id)>-1}))]&&(A=L.cards[T._id]._users[Object.keys(L.cards[T._id]._users).find((function(e){return e.indexOf(C._id)>-1}))]);var P=window.location.hash.split("/");P[0]=P[0].replace("#","");var $=I;$=Object.keys($).filter((function(e){if(!$[e].archived&&!$[e].deleted&&($[e]._users&&$[e]._id!==T._id&&$[e]._users[C._id]&&parseInt($[e]._users[C._id].access)>2||D&&(D.owner||D.planAdmin||D.planModerate)||A&&A.access&&parseInt(A.access)>2))return!0})).map((function(e){return $[e]})),u&&($=Object.keys($).filter((function(e){if($[e]&&$[e].name&&$[e].name.toLowerCase().indexOf(u.toLowerCase())>-1)return!0})).map((function(e){return $[e]}))),o&&($=Object.keys($).filter((function(e){if($[e]&&$[e].type&&$[e].type===o.name)return!0})).map((function(e){return $[e]}))),$=Object.keys($).filter((function(e){return T.type&&$[e].type&&L.dataType.filter((function(e){return e.name===T.type}))&&L.dataType.filter((function(e){return e.name===T.type})).length>0&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn&&(L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.copy.indexOf($[e].type)>-1||L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.attach.indexOf($[e].type)>-1||L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.shared.indexOf($[e].type)>-1)})).map((function(e){return $[e]}));var z=function(){var t=Object(p.a)(_i().mark((function t(){var r;return _i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={_id:Object($t.a)(),cardId:T._id,idRel:x,_parent:x,type:"comment",message:b||"",shared:!0},Lr(e,Object(d.a)(Object(d.a)({},r),{},{user:Object(d.a)({},L.users[C._id]),files:{}})),ut.a.post("timeline/add",r),_(null),i({name:"plan"});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=Object(p.a)(_i().mark((function t(){return _i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmMoveCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t={cardId:T._id,newRel:x,planId:L.cards[x]._planId?L.cards[x]._planId:"plan"===L.cards[x].type?x:null,oldRel:T._parent};Object(st.e)(e,t)&&(_(null),i({name:"plan"}))}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:t.root},a.a.createElement("div",{style:{width:"100%",padding:"15px"},ref:F},x&&L.cards[x]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Dn,{db:"cards",data:L.cards[x],onlyOption:!0}),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.r)("$__action")),L.dataType.filter((function(e){return e.name===T.type})).length>0&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.shared&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.shared.indexOf(L.cards[x].type)>-1&&a.a.createElement(po,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return z()}},Object(S.r)("$__share","*"))),L.dataType.filter((function(e){return e.name===T.type})).length>0&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.attach&&L.dataType.filter((function(e){return e.name===T.type}))[0].sharedIn.attach.indexOf(L.cards[x].type)>-1&&a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.r)("$__AttachInCard")),a.a.createElement(po,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return M()}},Object(S.r)("$__Attach","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(po,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){_(null)}},Object(S.r)("$__cancel","*"))))),a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(La,{dbNode:"typeFilter",options:N,getOptionLabel:function(e){return Object(S.r)("$__".concat(e.name),1)},style:{width:"100%"},name:"typeFilter",disableClearable:!0,value:o,renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__cardType",1),variant:Object(S.d)("outlined")}))},onChange:function(e,t){i(t)}})),a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(tt,{label:Object(S.r)("$__search",1),variant:"outlined",name:"search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){f(e.target.value),E(0)}},value:u})),a.a.createElement("div",{style:{maxWidth:"100%"}},Object.keys($).length>25&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(yi.a,{count:Object.keys($).length,size:"small",page:j,onChange:function(e,t){E(t)}})),Object.keys($).filter((function(e){return!x||(!(!x||$[e]._parent!==x&&$[e]._planId!==x)||void 0)})).map((function(e,t){if(t<=25*(j+1)&&t>=25*j)return a.a.createElement(Dn,{db:"cards",key:t,data:$[e],notGlobalExpanded:!0,onlyOption:!0,onClick:function(t){_($[e]._id),E(0),F.current.scrollIntoView()}})}))))}))),wi=r(272),ji=r(275),Ei=r.n(ji);var Si=function(e){var t=Ei.a.ExcelFile,r=Ei.a.ExcelFile.ExcelSheet,n=Ei.a.ExcelFile.ExcelColumn,o=e.data,i=[],l=[],s=0,u=0,p=0,h=0;if(o&&Object.keys(o).length>0){Object.keys(o).map((function(e){var t=[];o[e]._times&&Object.keys(o[e]._times>0)&&Object.keys(o[e]._times).map((function(r){var n=c.a.getState().db.cards[o[e]._times[r].cardId],a=parseInt(o[e]._times[r].fin)-parseInt(o[e]._times[r].ini);s+=a;var l=a,u="",d=0,p=0,f=0;a<60?u="".concat(l," ").concat(Object(S.r)("$__seconds",1)):a>3600?(l-=3600*(d=Math.trunc(l/3600)),f=(l-=60*(p=Math.trunc(l/60)>0?Math.trunc(l/60):0))>0?l:0,u="".concat(d," ").concat(Object(S.r)("$__hour",1)).concat(d>1?"s":""," ").concat(p," ").concat(Object(S.r)("$__minutes",1)," ").concat(f," ").concat(Object(S.r)("$__seconds",1))):(f=(l-=60*(p=Math.trunc(l/60)>0?Math.trunc(l/60):0))>0?l:0,u="".concat(p," ").concat(Object(S.r)("$__minutes",1)," ").concat(f," ").concat(Object(S.r)("$__seconds",1))),i.push({name:o[e].name,type:Object(S.r)("$__".concat(n.type),1),card:n.name,description:o[e]._times[r].message,iniData:_()(1e3*o[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:_()(1e3*o[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:u,hours:d,minutes:p,seconds:f,calc:(parseInt(o[e]._times[r].fin)-parseInt(o[e]._times[r].ini))/3600}),t.push({name:o[e].name,type:Object(S.r)("$__".concat(n.type),1),card:n.name,description:o[e]._times[r].message,iniData:_()(1e3*o[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:_()(1e3*o[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:u,hours:d,minutes:p,seconds:f,calc:(parseInt(o[e]._times[r].fin)-parseInt(o[e]._times[r].ini))/3600})})),console.log(o[e]),t.push({name:"",email:"",type:"",card:"",description:"",iniData:"",finalData:"",total:o[e].timerText,hours:"",minutes:"",seconds:"",calc:parseInt(o[e].totalTimer)/3600}),l=Object(d.a)(Object(d.a)({},l),{},Object(f.a)({},e,t))}));var m=s,g="";s<60?(h=m,g="".concat(m," ").concat(Object(S.r)("$__seconds",1))):s>3600?(m-=3600*(u=Math.trunc(m/3600)),h=(m-=60*(p=Math.trunc(m/60)>0?Math.trunc(m/60):0))>0?m:0,g="".concat(u," ").concat(Object(S.r)("$__hour",1)).concat(u>1?"s":""," ").concat(p," ").concat(Object(S.r)("$__minutes",1)," ").concat(h," ").concat(Object(S.r)("$__seconds",1))):(h=(m-=60*(p=Math.trunc(m/60)>0?Math.trunc(m/60):0))>0?m:0,g="".concat(p," ").concat(Object(S.r)("$__minutes",1)," ").concat(h," ").concat(Object(S.r)("$__seconds",1))),i.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:g,hours:"",minutes:"",seconds:"",calc:""})}return a.a.createElement(t,{filename:"".concat(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_timeSheet"),element:a.a.createElement(E.a,{title:Object(S.r)("$__export"),text:Object(S.r)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:i,name:"timeSheet"},a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__name",1)),value:"name"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__type",1)),value:"type"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__card",1)),value:"card"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__description",1)),value:"description"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__initialTimer",1)),value:"iniData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__finalTimer",1)),value:"finalData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__totalTime",1)),value:"total"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__hours",1)),value:"hours"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__minutes",1)),value:"minutes"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__seconds",1)),value:"seconds"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__valueForCalculation",1)),value:"calc"})),l&&Object.keys(l).length>0&&Object.keys(l).map((function(e,t){var o=l[e][0].name;return a.a.createElement(r,{data:l[e],name:o,key:e},a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__name",1)),value:"name"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__type",1)),value:"type"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__card",1)),value:"card"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__description",1)),value:"description"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__initialTimer",1)),value:"iniData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__finalTimer",1)),value:"finalData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__totalTime",1)),value:"total"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__hours",1)),value:"hours"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__minutes",1)),value:"minutes"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__seconds",1)),value:"seconds"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__valueForCalculation",1)),value:"calc"}))})))},ki={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:W.O,width:"100%",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",position:"relative",display:"flex",flexDirection:"column",minWidth:"0",wordWrap:"break-word",fontSize:".875rem"},cardPlain:{background:"transparent",boxShadow:"none"},cardProfile:{marginTop:"30px",textAlign:"center"},cardBlog:{marginTop:"60px"},cardRaised:{boxShadow:"0 16px 38px -12px rgba("+Object(W.r)(W.b)+", 0.56), 0 4px 25px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.b)+", 0.2)"},cardBackground:{backgroundPosition:"center center",backgroundSize:"cover",textAlign:"center","&:after":{position:"absolute",zIndex:"1",width:"100%",height:"100%",display:"block",left:"0",top:"0",content:'""',backgroundColor:"rgba("+Object(W.r)(W.b)+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+Object(W.r)(W.O)+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+Object(W.r)(W.b)+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:W.q[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+Object(W.r)(W.q[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:W.q[2]},"& h1":{marginTop:"30px"},"& h1 small":{display:"inline-flex",height:0,fontSize:"18px"},"& h1 small:first-child":{position:"relative",top:"-16px",fontSize:"26px"},"& ul li svg, & ul li .fab,& ul li .fas,& ul li .far,& ul li .fal,& ul li .material-icons":{position:"relative",top:"7px"}},cardPricingColor:{"& ul li":{color:W.O,borderColor:"rgba("+Object(W.r)(W.O)+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:W.O,fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+W.z[1]+","+W.z[4]+")","& h1 small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"},color:W.O},info:{background:"linear-gradient(60deg,"+W.u[1]+","+W.u[4]+")","& h1 small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"},color:W.O},success:{background:"linear-gradient(60deg,"+W.G[1]+","+W.G[4]+")","& h1 small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"},color:W.O},warning:{background:"linear-gradient(60deg,"+W.N[1]+","+W.N[4]+")","& h1 small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"},color:W.O},danger:{background:"linear-gradient(60deg,"+W.j[1]+","+W.j[4]+")","& h1 small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"},color:W.O},rose:{background:"linear-gradient(60deg,"+W.D[1]+","+W.D[4]+")","& h1 small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"},color:W.O},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+Object(W.r)(W.b)+")",transition:"all 300ms linear"}},Li=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],Ci=Object(z.a)(ki);function Ii(e){var t,r=Ci(),n=e.className,o=e.children,i=e.plain,c=e.profile,l=e.blog,s=e.raised,u=e.background,d=e.pricing,p=e.color,h=e.product,m=e.testimonial,g=e.chart,b=e.login,v=Object(G.a)(e,Li),x=y()((t={},Object(f.a)(t,r.card,!0),Object(f.a)(t,r.cardPlain,i),Object(f.a)(t,r.cardProfile,c||m),Object(f.a)(t,r.cardBlog,l),Object(f.a)(t,r.cardRaised,s),Object(f.a)(t,r.cardBackground,u),Object(f.a)(t,r.cardPricingColor,d&&void 0!==p||d&&void 0!==u),Object(f.a)(t,r[p],p),Object(f.a)(t,r.cardPricing,d),Object(f.a)(t,r.cardProduct,h),Object(f.a)(t,r.cardChart,g),Object(f.a)(t,r.cardLogin,b),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:x},v),o)}var Ti={cardBody:{padding:"0.9375rem 20px",flex:"1 1 auto",WebkitBoxFlex:"1",position:"relative"},cardBodyBackground:{position:"relative",zIndex:"2",minHeight:"280px",paddingTop:"40px",paddingBottom:"40px",maxWidth:"440px",margin:"0 auto"},cardBodyPlain:{paddingLeft:"5px",paddingRight:"5px"},cardBodyFormHorizontal:{paddingLeft:"15px",paddingRight:"15px","& form":{margin:"0"}},cardPricing:{padding:"15px!important",margin:"0px!important"},cardSignup:{padding:"0px 30px 0px 30px"},cardBodyColor:{borderRadius:"6px","& h1,& h2,& h3":{"& small":{color:"rgba("+Object(W.r)(W.O)+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},Fi=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],Ni=Object(z.a)(Ti);function Di(e){var t,r=Ni(),n=e.className,o=e.children,i=e.background,c=e.plain,l=e.formHorizontal,s=e.pricing,u=e.signup,d=e.color,p=e.profile,h=e.calendar,m=Object(G.a)(e,Fi),g=y()((t={},Object(f.a)(t,r.cardBody,!0),Object(f.a)(t,r.cardBodyBackground,i),Object(f.a)(t,r.cardBodyPlain,c),Object(f.a)(t,r.cardBodyFormHorizontal,l),Object(f.a)(t,r.cardPricing,s),Object(f.a)(t,r.cardSignup,u),Object(f.a)(t,r.cardBodyColor,d),Object(f.a)(t,r.cardBodyProfile,p),Object(f.a)(t,r.cardBodyCalendar,h),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:g},m),o)}var Ai={cardHeader:{padding:"0.75rem 1.25rem",marginBottom:"0",borderBottom:"none",background:"transparent",zIndex:"3 !important","&$cardHeaderPlain,&$cardHeaderImage,&$cardHeaderContact,&$cardHeaderSignup,&$cardHeaderIcon,&$cardHeaderStats,&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader, &$customCardHeader":{margin:"0 15px",padding:"0",position:"relative",color:W.O},"&:first-child":{borderRadius:"calc(.25rem - 1px) calc(.25rem - 1px) 0 0"},"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{"&:not($cardHeaderIcon):not($cardHeaderImage):not($cardHeaderText)":{borderRadius:"3px",marginTop:"-20px",padding:"15px"}},"&$cardHeaderStats svg":{fontSize:"36px",lineHeight:"56px",textAlign:"center",width:"36px",height:"36px",margin:"10px 10px 4px"},"&$cardHeaderStats .fab,&$cardHeaderStats .fas,&$cardHeaderStats .far,&$cardHeaderStats .fal,&$cardHeaderStats .material-icons":{fontSize:"36px",lineHeight:"56px",width:"56px",height:"56px",textAlign:"center",overflow:"unset",marginBottom:"1px"},"&$cardHeaderStats$cardHeaderIcon":{textAlign:"right"},"&$cardHeaderImage":{marginLeft:"15px",marginRight:"15px",marginTop:"-30px",borderRadius:"6px"},"&$cardHeaderText":{display:"inline-block"}},cardHeaderPlain:{marginLeft:"0px",marginRight:"0px","&$cardHeaderImage":{margin:"0 !important"}},cardHeaderImage:{position:"relative",padding:"0",zIndex:"1","& img":{width:"100%",borderRadius:"6px",pointerEvents:"none",boxShadow:"0 5px 15px -8px rgba("+Object(W.r)(W.b)+", 0.24), 0 8px 10px -5px rgba("+Object(W.r)(W.b)+", 0.2)"},"& a":{display:"block"}},cardHeaderContact:{margin:"0 15px",marginTop:"-20px"},cardHeaderSignup:{marginLeft:"20px",marginRight:"20px",marginTop:"-40px",padding:"20px 0",width:"100%",marginBottom:"15px"},cardHeaderStats:{"& $cardHeaderIcon":{textAlign:"right"},"& h1,& h2,& h3,& h4,& h5,& h6":{margin:"0 !important"}},cardHeaderIcon:{"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{background:"transparent",boxShadow:"none"},"& .fab,& .fas,& .far,& .fal,& .material-icons":{width:"33px",height:"33px",textAlign:"center",lineHeight:"33px"},"& svg":{width:"24px",height:"24px",textAlign:"center",lineHeight:"33px",margin:"5px 4px 0px"}},cardHeaderText:{},warningCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.M)},successCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.F)},dangerCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.i)},infoCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.t)},primaryCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.y)},roseCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.C)},customCardHeader:{color:W.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},W.g)}},Pi=["className","children","color","plain","image","contact","signup","stats","icon","text"],$i=Object(z.a)(Ai);function zi(e){var t,r=$i(),n=e.className,o=e.children,i=e.color,c=e.plain,l=e.image,s=e.contact,u=e.signup,d=e.stats,p=e.icon,h=e.text,m=Object(G.a)(e,Pi),g=y()((t={},Object(f.a)(t,r.cardHeader,!0),Object(f.a)(t,r[i+"CardHeader"],i),Object(f.a)(t,r.cardHeaderPlain,c),Object(f.a)(t,r.cardHeaderImage,l),Object(f.a)(t,r.cardHeaderContact,s),Object(f.a)(t,r.cardHeaderSignup,u),Object(f.a)(t,r.cardHeaderStats,d),Object(f.a)(t,r.cardHeaderIcon,p),Object(f.a)(t,r.cardHeaderText,h),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:g},m),o)}var Mi=r(1849),Bi=r(1829),Yi=r(1828),Ri=r(1830),Gi=r(1757);function Hi(){Hi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(z.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var Wi=Object(s.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.timeline,o=a.a.useState(_()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState({}),j=Object(h.a)(w,2),k=j[0],L=j[1],C=a.a.useState({}),I=Object(h.a)(C,2),T=I[0],F=I[1],N=a.a.useState(!0),D=Object(h.a)(N,2),A=D[0],P=D[1],$=window.location.hash.split("/");$[0]=$[0].replace("#",""),a.a.useEffect((function(){return M(),function(){}}),[]),a.a.useEffect((function(){z()}),[e.cards]);var z=function(){var t=Object(p.a)(Hi().mark((function t(){var r;return Hi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.s)(e.nodeId);case 2:r=t.sent,F(r);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=Object(p.a)(Hi().mark((function t(){return Hi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[e.nodeId],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&P(!1),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0),P(!1);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),B={},Y={},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object(S.r)("$__seconds",1)),r="".concat(e,"s");else if(e>3600){var a=Math.trunc(e/3600);e-=3600*a;var o=Math.trunc(e/60)>0?Math.trunc(e/60):0,i=(e-=60*o)>0?e:0;r="".concat(a," ").concat(Object(S.r)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object(S.r)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object(S.r)("$__seconds",1)):""),n="".concat(a,"H ").concat(o,"M ").concat(i," S")}else{var c=Math.trunc(e/60)>0?Math.trunc(e/60):0,l=(e-=60*c)>0?e:0;r="".concat(c," ").concat(Object(S.r)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object(S.r)("$__seconds",1)):""),n="".concat(c,"M ").concat(l," S")}return t?n:r};Object.keys(T).filter((function(e){return n[e]&&Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type})).length>0})).map((function(e){Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type&&!n[e][t].deleted})).map((function(t){n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0?Object.keys(n[e][t]._toUser).map((function(r){Y=Object(d.a)(Object(d.a)({},Y),{},Object(f.a)({},r,Object(d.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))})):Y=Object(d.a)(Object(d.a)({},Y),{},Object(f.a)({},n[e][t].user._id,Object(d.a)({},n[e][t].user)))})),Object.keys(n[e]).filter((function(t){return n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&(0===Object.keys(k).length||Object.keys(k).length>0&&Object.keys(k).filter((function(r){return n[e]&&n[e][t]&&n[e][t].type&&"timer"===n[e][t].type&&k[r]&&n[e][t].user&&(n[e]&&n[e][t]&&n[e][t].user&&(!n[e][t]._toUser||n[e][t]._toUser&&!n[e][t]._toUser[r])&&n[e][t].user._id===r||n[e]&&n[e][t]&&n[e][t]._toUser&&n[e][t]._toUser[r]&&n[e][t]._toUser[r]!==n[e][t].user._id)})).length>0)})).map((function(t){n[e][t].message.indexOf("Primeira Entrevistas")>-1&&console.log(n[e][t]._toUser),Object.keys(Y).map((function(r){if(r&&n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&(parseInt(n[e][t].ini)>=_()("".concat(l," 00:00:01")).unix("X")||0===parseInt(n[e][t].ini))&&parseInt(n[e][t].fin)<=_()("".concat(g," 23:59:59")).unix("X")&&(n[e][t].user&&n[e][t].user._id===r&&n[e][t]._toUser&&0===Object.keys(n[e][t]._toUser).length||n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0&&n[e][t]._toUser[r])){parseInt(n[e][t].fin)-parseInt(n[e][t].ini);var a=parseInt(n[e][t].fin)-parseInt(n[e][t].ini),o=a=B&&B[r]&&B[r].totalTimer?parseInt(B[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini)):parseInt(n[e][t].fin)-parseInt(n[e][t].ini),i="",c="";if(a<60)i="".concat(o," ").concat(Object(S.r)("$__seconds",1)),i="".concat(o,"s");else if(a>3600){var s=Math.trunc(o/3600);o-=3600*s;var u=Math.trunc(o/60)>0?Math.trunc(o/60):0,p=(o-=60*u)>0?o:0;i="".concat(s," ").concat(Object(S.r)("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Object(S.r)("$__minutes",1)," ").concat(p>0?"".concat(p," ").concat(Object(S.r)("$__seconds",1)):""),c="".concat(s,"H ").concat(u,"M ").concat(p," S")}else{var h=Math.trunc(o/60)>0?Math.trunc(o/60):0,m=(o-=60*h)>0?o:0;i="".concat(h," ").concat(Object(S.r)("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(Object(S.r)("$__seconds",1)):""),c="".concat(h,"M ").concat(m," S")}B=Object(d.a)(Object(d.a)({},B),{},Object(f.a)({},r,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},B[r]?B[r]:{}),Y[r]?Y[r]:{}),B&&B[r]&&B[r].totalTimer?{totalTimer:parseInt(B[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini))}:{totalTimer:parseInt(n[e][t].fin)-parseInt(n[e][t].ini)}),{},{timerText:i,timerTextMini:c,_times:Object(d.a)(Object(d.a)({},B[r]&&B[r]._times?B[r]._times:{}),{},Object(f.a)({},t,Object(d.a)(Object(d.a)({},n[e][t]),{},{cardId:e})))})))}1}))}))}));var G=function(e){return a.a.createElement("div",{style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},e.data&&e.data.name&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(Ge.a,{title:e.data.name},a.a.createElement(Se.a,{alt:e.data.name,src:e.data.image||null,style:{width:"33px",height:"33px"}},e.data.name.substr(0,1)))),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu"),width:"33%",minWidth:"150px"}},e.data.name)),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu")}},e.data.timerText))};return a.a.createElement(Ii,null,a.a.createElement(wn,{title:Object(S.r)("$__timeSheet",1),icon:"update",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[!x&&{title:"$__timeSheetExport",icon:"file_download",color:Object(S.d)("colorText"),onClick:function(){O(!x)}}]}),A?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250,250,250,0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10}},a.a.createElement(xe,null)):a.a.createElement(a.a.Fragment,null),x&&a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement("fieldset",{style:{position:"relative",width:"100%",marginLeft:"7px",display:"flex",justifyContent:"space-between",marginBottom:"14px",marginTop:"7px"}},a.a.createElement("legend",null,Object(S.r)("$__timeCourse",1)),a.a.createElement(tt,{label:Object(S.r)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:g||null},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)}},value:l}),a.a.createElement(tt,{label:Object(S.r)("$__endDate",1),variant:Object(S.d)("fieldVariant"),name:"endDate",type:"date",min:l||null,InputLabelProps:{shrink:!0},inputProps:{min:l||null},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target.value)}},value:g})),r.users&&Object.keys(r.users).length>0&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"12px"}},Object(S.r)("$__users"),a.a.createElement(ct.a,{max:6},Object.keys(k).length>0&&Object.keys(k).map((function(e,t){return a.a.createElement(Ge.a,{title:r.users[e].name,key:t},a.a.createElement(Se.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,null,Object.keys(Y).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&a.a.createElement(a.a.Fragment,{key:e},a.a.createElement(Ri.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Se.a,{alt:r.users[e].name.substr(0,1),src:r.users[e].image||null},r.users[e].name.substr(0,1)),a.a.createElement(it,{checked:!(!k||!k[e]),onChange:function(){!function(e){k[e]&&Object.keys(k).filter((function(e){return k[e]})).length<=1?L({}):L(Object(d.a)(Object(d.a)({},k),{},Object(f.a)({},e,!k[e])))}(e)},color:"default"})),label:r.users[e].name||r.users[e].name}))}))))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"7px"}},a.a.createElement(Si,{data:B}),a.a.createElement(E.a,{title:Object(S.r)("$__closeFilter"),text:Object(S.r)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){O(!x)},size:"25px"}))),a.a.createElement(zi,{style:{height:"333px"}},a.a.createElement(wi.a,{data:Object(Ne.a)(Object.keys(B).sort((function(e,t){return parseInt(B[e].totalTimer)>parseInt(B[t].totalTimer)?-1:parseInt(B[e].totalTimer)<parseInt(B[t].totalTimer)?1:0})).map((function(e,t){return{id:B[e].name,label:B[e].name,value:B[e].totalTimer,color:"#929497",textMini:B[e].timerText}}))),valueFormat:function(e){return R(e,!0),R(e)},enableArcLabels:!1,colors:{scheme:"purpleRed_green"},activeOuterRadiusOffset:8,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},borderWidth:1,cornerRadius:3,enableArcLinkLabels:!0,innerRadius:.5,leavesOnly:!0,margin:{top:10,right:80,bottom:10,left:0},padAngle:1.3,sortByValue:!0})),a.a.createElement(Di,null,a.a.createElement(un,null,Object.keys(B).sort((function(e,t){return parseInt(B[e].totalTimer)>parseInt(B[t].totalTimer)?-1:parseInt(B[e].totalTimer)<parseInt(B[t].totalTimer)?1:0})).map((function(e,t){return a.a.createElement(G,{data:B[e],key:e})})))),a.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},r.cards[e.nodeId]&&"plan"===r.cards[e.nodeId].type?Object(S.r)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object(S.r)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),Ui=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},data:{marginTop:"10px",padding:"10px","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},timeline:{position:"absolute",width:"100%",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};var Vi=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ui)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.sideModule,i=r.session,l=o.data||{},s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],p=u[1],f=a.a.useState(c.a.getState().db.cards[l._id]._users[i._id]?"timeline":"chart"),m=Object(h.a)(f,2),g=m[0],b=m[1];Object(S.j)(),i._id&&n.cards[l._id]&&n.cards[l._id]._users&&n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(i._id)>-1}))];var v=window.location.hash.split("/");v[0]=v[0].replace("#","");var y=n.cards[l._id]._timeline||{};return y=Object.keys(y).filter((function(e){return"kpi"===y[e].type})).map((function(e){return y[e]})),l._parent&&l._parent!==v[0]&&c.a.getState().db.cards[l._parent],a.a.createElement("div",null,!d&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},"chart"!==g&&c.a.getState().db.cards[l._id]._users[i._id]&&a.a.createElement(E.a,{title:Object(S.r)("$__add"),text:Object(S.r)("$__add"),icon:"more_time",size:"25px",onClick:function(){p(!0)}}),"chart"!==g&&a.a.createElement(E.a,{title:Object(S.r)("$__showChart"),text:Object(S.r)("$__showChart"),icon:"analytics",size:"25px",onClick:function(){b("chart")}}),"timeline"!==g&&a.a.createElement(E.a,{title:Object(S.r)("$__showTimeline"),text:Object(S.r)("$__showTimeline"),icon:"timeline",size:"25px",onClick:function(){b("timeline")}})),"chart"===g&&a.a.createElement("div",{style:{width:"calc(100% - 30px)",marginLeft:"15px"}},a.a.createElement(Wi,{nodeId:l._id})),(d||"timeline"===g)&&a.a.createElement("div",{style:{position:"absolute",top:35,left:0,right:0,bottom:0}},a.a.createElement(Ea,{nodeId:l._id,type:"timer",db:"cards",disabledSend:!0,loadTimeline:!0,noSearch:!0})),d&&a.a.createElement("div",{className:t.timeline,style:{top:"0px",zIndex:100,backgroundColor:"#FFFFFF"}},a.a.createElement(Xt,{data:l,manualAdd:!0,callBack:function(){p(!1)}})))})));function qi(){qi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Xi=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.sideModule,n=t.db,o=(t.functions.socket,a.a.useState(!1)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(null),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState({}),w=Object(h.a)(O,2),j=(w[0],w[1]),E=a.a.useState(0),k=Object(h.a)(E,2),L=k[0],C=k[1],I=a.a.useState(""),T=Object(h.a)(I,2),F=T[0],N=T[1],D=r.data||{};a.a.useEffect((function(){return"user"===D.type?$():b(!1),function(){}}),[]),a.a.useEffect((function(){A()}),[D._id]);var A=function(){var e=Object(p.a)(qi().mark((function e(){var t;return qi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(st.s)(D._id);case 2:(t=e.sent)&&j(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var t=Object(p.a)(qi().mark((function t(){return qi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(st.p)(e,{_id:D._id},!1),Object(S.f)(e,{_id:D._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=function(){var e=Object(p.a)(qi().mark((function e(){var t;return qi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,dt.a.post("/Card_Count",{id:D._id,all:!0,rel:"INN",node:"User"});case 3:(t=e.sent)&&(b(!1),C(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(p.a)(qi().mark((function e(){var t;return qi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,ut.a.post("/user/migrateActivities",{from:D._id,fromData:D,to:[x],toData:n.users[x]});case 4:e.sent&&(s(!0),t=Object(d.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[D._id]})).map((function(e){t[e]._users[x]||(t[e]._users=Object(d.a)(Object(d.a)({},t[e]._users),{},Object(f.a)({},x,{access:t[e]._users[D._id].access,_id:x}))),delete t[e]._users[D._id]})),b(!1)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.log(e.t0),setTimeout((function(){z()}),3e3);case 12:return e.abrupt("return");case 14:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(sa,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),D._id&&n.users[D._id]&&("client"===n.users[D._id].type||"group"===n.users[D._id].type||"sic"===n.users[D._id].type||"unity"===n.users[D._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===D._id})).length>0?Object(S.r)("$__delete".concat(n.users[D._id].type,"WithUsersDescription"),1):Object(S.r)("$__delete".concat(n.users[D._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__deleteThisDescription",1)),a.a.createElement(po,{onClick:function(){P()}},Object(S.r)("$__deleteThis",1))),D._id&&n.users[D._id]&&"user"===n.users[D._id].type&&a.a.createElement(a.a.Fragment,null,g?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,L>0&&!l?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__thisUserHas",1)),a.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},L," ",Object(S.r)("$__items"),a.a.createElement("br",null),Object(S.r)("$__deleteCountCardsExplain"))),x?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){_(null)}},a.a.createElement(Se.a,{alt:n.users[x].name,src:n.users[x].image||null,style:{marginRight:"15px"}},n.users[x].name.substr(0,1)),a.a.createElement("span",null,n.users[x].name)),a.a.createElement(po,{onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.r)("$__confirm"),text:Object(S.r)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){z()}},{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.r)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.r)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(tt,{label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:F,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(e){N(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==D._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!D._parent&&!n.users[e]._parent||D._parent&&n.users[e]._parent===D._parent)&&(!F||F&&n.users[e].name.toLowerCase().indexOf(F.toLowerCase().trim())>-1)})).sort((function(e,t){var r=n.users[e].name.toLowerCase(),a=n.users[t].name.toLowerCase();return r<a?-1:r>a?1:0})).map((function(e){return a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){_(e)},key:e},a.a.createElement(Se.a,{alt:n.users[e].name,src:n.users[e].image||null,style:{marginRight:"15px"}},n.users[e].name.substr(0,1)),a.a.createElement("span",null,n.users[e].name))}))),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__deactivateWhithoutMigration",1)),a.a.createElement(po,{onClick:function(){P()}},Object(S.r)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.r)("$__deactivateUserDescription",1)),a.a.createElement(po,{onClick:function(){P()}},Object(S.r)("$__deactivateThis",1)))),g?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(la.a,null)):a.a.createElement(a.a.Fragment,null)))})),Ki=r(17),Ji=r(1844),Zi=Object(z.a)({root:{"&:hover":{backgroundColor:"transparent"}},icon:{borderRadius:"50%",width:16,height:16,boxShadow:"inset 0 0 0 1px ".concat(Object(S.d)("color",.2),", inset 0 -1px 0 ").concat(Object(S.d)("color",.1)),backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))","$root.Mui-focusVisible &":{outline:"2px auto ".concat(Object(S.d)("color",.6)),outlineOffset:2},"input:hover ~ &":{backgroundColor:"#ebf1f5"},"input:disabled ~ &":{boxShadow:"none",background:"rgba(206,217,224,.5)"}},checkedIcon:{backgroundColor:Object(S.d)("color",1),backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"radial-gradient(#fff,#fff 28%,transparent 32%)",content:'""'},"input:hover ~ &":{backgroundColor:Object(S.d)("color",1)}}});var Qi=function(e){var t=Zi();return a.a.createElement(Ji.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:a.a.createElement("span",{className:Object(Ki.default)(t.icon,t.checkedIcon)}),icon:a.a.createElement("span",{className:t.icon})},e))},ec=r(1831),tc=function(e){return{root:{position:"relative",float:"left",width:"calc(100% - 20px)",margin:"10px"},user:{position:"relative",width:"calc(100% - 20px)",margin:"10px",float:"left",height:"50px"},avatar:{position:"absolute",left:"-5px",top:"0px",border:"1px solid ".concat(Object(S.d)("color")),width:"57px",height:"57px",borderRadius:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"#FFFFFF"},name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"5px",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px",paddingRight:"7px",fontWeight:"bold",fontSize:"12px",color:Object(S.d)("darkText"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.1)"},access:{position:"absolute",top:"33px",left:"45px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"12px",color:Object(S.d)("color"),boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)"},accessEditing:{position:"absolute",top:"33px",left:"0px",right:"0px",height:"auto",minHeight:"290px",padding:"7px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",paddingTop:"15px",paddingLeft:"16px",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}},btActions:{position:"absolute",right:"7px",top:"7px",display:"flex"},switch:{fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium")},accessDescription:{fontSize:"12px",color:Object(S.d)("medium")}}},rc=r(1023),nc=r.n(rc);function ac(){ac=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var oc=Object(s.b)((function(e,t){return{users:e.db.users,cardUsers:e.db.cards[e.sideModule.data._id]}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(tc)((function(e){var t,r=e.classes,n=c.a.getState(),o=n.db,i=n.sideModule,l=n.session,s=a.a.useState({id:null}),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState("users"),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(""),k=Object(h.a)(j,2),L=k[0],C=k[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],N=T[1],D=o.cards[i.data._id],A=(null===(t=o.cards[D._planId])||void 0===t?void 0:t.client)||null,P=Object(d.a)({},o.users),$=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},D&&D._users?Object(d.a)({},D._users):{}),D._parent&&o.cards[D._parent]&&o.cards[D._parent]._users?Object(d.a)({},o.cards[D._parent]._users):{}),D._planId&&o.cards[D._planId]&&o.cards[D._planId]._users?Object(d.a)({},o.cards[D._planId]._users):{}),P),z=Array.from(c.a.getState().db.userGroup),M=window.location.hash.split("/");M[0]=M[0].replace("#","");var B=Object(S.j)(),Y=D&&D._id&&o.cards[D._id]&&o.cards[D._id]._users&&Object.keys(o.cards[D._id]._users).length>0?o.cards[D._id]._users[Object.keys(o.cards[D._id]._users).find((function(e){return e.indexOf(l._id)>-1}))]:0;if(!i||!i.data)return null;var R=function(){var t=Object(p.a)(ac().mark((function t(r,n,a){var c,l;return ac().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=1,D&&"plan"===D.type&&(c=3),n?c=n:D._planId&&o.cards[D._planId]&&o.cards[D._planId]._users&&o.cards[D._planId]._users[r]&&o.cards[D._planId]._users[r].access&&(c=D._parent&&o.cards[D._parent]&&o.cards[D._parent]._users&&o.cards[D._parent]._users[r]&&o.cards[D._parent]._users[r].access&&parseInt(o.cards[D._parent]._users[r].access)>parseInt(o.cards[D._planId]._users[r].access)?parseInt(o.cards[D._parent]._users[r].access):parseInt(o.cards[D._planId]._users[r].access)),l=!!(o.cards[i.data._id]&&o.cards[i.data._id]._users&&o.cards[i.data._id]._users[r]),t.next=6,Et(e,r,c,i.data._id,l);case 6:if(!t.sent){t.next=11;break}return y(!1),m({_id:null}),t.abrupt("return",!0);case 11:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),G=function(){var t=Object(p.a)(ac().mark((function t(r){return ac().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,St(e,r,i.data._id);case 2:if(!t.sent){t.next=7;break}return y(!1),m({_id:null}),t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),H=function(){var t=Object(p.a)(ac().mark((function t(r,n){return ac().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ut.a.put("cards/removeAccess/",{cardId:i.data._id,userIds:[r]});case 2:t.sent&&(n&&e.reduxFunction("ASYNC","CLEAR_MODULE"),y(!1),m({_id:null}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!D)return null;P=P&&Object.keys(P).length>0&&Object.keys(P).filter((function(e){return e&&D&&D._users&&D._users[P[e]._id]&&!D._users[P[e]._id].deleted})).sort((function(e,t){return e.name<t.name?-1:0})).map((function(e){return P[e]})),$=($=Object.keys($).filter((function(e){if("A10"===$[e].name&&console.log($[e],A),e&&(!$[e].type||$[e].type&&"client"!==$[e].type&&"unity"!==$[e].type&&"group"!==$[e].type)&&!$[e].deleted&&(!A&&(!$[e]._parent||$[e]._parent&&$[e]._parent===l.account)||A&&($[e]._parent&&($[e]._parent===A||$[e]._parent===l.account)||!$[e]._parent)))return!0})).map((function(e){return $[e]}))).filter((function(e){return e&&(!A||A&&(e._parent===A||!e._parent))&&(!D._users||!D._users[e._id])&&(!L||L&&(e.name&&e.name.toLowerCase().indexOf(L.toLowerCase())>-1||L.indexOf(">")>-1&&e._parent&&c.a.getState().db.users&&c.a.getState().db.users[e._parent]&&c.a.getState().db.users[e._parent].name&&c.a.getState().db.users[e._parent].name.toLowerCase().indexOf(L.toLowerCase().replace(">","").trim())>-1))})).map((function(e){return e}));var W=function(){var e=Object(p.a)(ac().mark((function e(t){return ac().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(""),t.map((function(e){R(e._id,null,e)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=Object(p.a)(ac().mark((function e(t){return ac().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(""),t.map((function(e){}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(t){return a.a.createElement("div",{className:r.user,style:{height:37}},a.a.createElement("div",{className:r.name,style:{left:0}},t.label,a.a.createElement(E.a,{transparent:!0,title:D._groups&&D._groups[t.value]?Object(S.r)("$__removeTeam"):Object(S.r)("$__addTeam"),icon:D._groups&&D._groups[t.value]?"group_remove":"group_add",size:"20px",onClick:function(){D&&(!D._groups||D._groups&&!D._groups[t.value])?G(t.value):kt(e,t.value,D._id)}})))},q=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=!0,s=t;t._id&&o.users[t._id]&&(s=o.users[t._id]),t.type&&"external"!==t.type||s._parent&&(!s._parent||o.users[s._parent])||(c=!1),D&&D._planId&&Object(st.C)(D._planId)&&(c=!0);var u=1;return s&&s._id&&D._users&&D._users[s._id]&&D._users[s._id].access&&(u=String(D._users[s._id].access)),a.a.createElement("div",{className:r.user},a.a.createElement("div",{className:r.name},s.name,D._users[s._id]&&D._users[s._id].isResponsible?a.a.createElement("span",{style:{fontSize:"9px",fontWeight:"normal",color:"#CCCCCC"}},Object(S.r)("$__responsible",1)):"",n&&!f._id?a.a.createElement("div",null,a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__add"),icon:"person_add",size:"20px",onClick:function(){R(s._id,null,s)}})):a.a.createElement(a.a.Fragment,null),n?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(We,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(S.d)("color"),options:[{name:"$__setAsResponsible",icon:"admin_panel_settings",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Lt(e,{cardId:i.data._id,userId:s._id})}})}}].concat(Object(Ne.a)(c&&(s&&(!s._access||s._access&&"owner"!==s._access)&&(Y&&String(Y.access)&&parseInt(Y.access)>2&&parseInt(Y.access)>=parseInt(u)||B&&B.plan&&(B.planAdmin||B.planModerate))||s._id===l._id)?[{name:"$__editAccess",icon:"manage_accounts",onClick:function(){m({_id:s._id,access:u})}},{name:"$__removeAccess",icon:"delete_forever",color:"red",onClick:function(){Object(S.c)({message:s._id!==l._id?Object(S.r)("$__confirmRemoveUser",1):Object(S.r)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){H(s._id,s._id===l._id)}})}}]:[]))}))),a.a.createElement("div",{className:r.avatar,style:{backgroundImage:'url("'.concat(s.image?s.image:nc.a,'")')}},s._parent&&o.users[s._parent]&&o.users[s._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:-4,right:-7,width:22,height:22,borderRadius:"50%",backgroundImage:"url(".concat(o.users[s._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null)),n?s._parent&&o.users[s._parent]&&o.users[s._parent].name?a.a.createElement("div",{className:r.access},a.a.createElement("div",null,o.users[s._parent].name)):a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.access,style:{cursor:"pointer",paddingLeft:15,paddingRight:15,paddingTop:3,display:"block"},onClick:c?function(){(s&&(!s._access||s._access&&"owner"!==s._access)&&(Y&&String(Y.access)&&parseInt(Y.access)>2&&parseInt(Y.access)>=parseInt(u)||B&&B.plan&&(B.planAdmin||B.planModerate))||s._id===l._id)&&m({_id:s._id,access:u})}:null},s._parent&&o.users[s._parent]&&o.users[s._parent].name?a.a.createElement("div",{style:{position:"relative",float:"left"}},o.users[s._parent].name):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"relative",float:"right"}},"(","owner"===s._access?Object(S.r)("$__owner",1):"0"===u?Object(S.r)("$__reader",1):"1"===u?Object(S.r)("$__executioner",1):"2"===u?Object(S.r)("$__collaborator",1):"3"===u?Object(S.r)("$__leadership",1):"4"===u?Object(S.r)("$__supervisor",1):"5"===u?Object(S.r)("$__admin",1):Object(S.r)("$__reader",1),")")))};if(f&&f._id){var X=1;D._users&&D._users[f._id]&&D._users[f._id].access&&(X=String(D._users[f._id].access));var K=D._users[f._id],J=!1;return D&&D._planId&&Object(st.C)(D._planId)&&(J=!0),a.a.createElement(a.a.Fragment,null,q(K,!0),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"100%",float:"left",justifyContent:"flex-end"}},v&&a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__save"),icon:"save",color:Object(S.d)("color"),onClick:function(){R(f._id,f.access,K)}}),P.length>1&&a.a.createElement(E.a,{transparent:!0,title:f._id!==l._id?Object(S.r)("$__removeAccess",1):Object(S.r)("$__getOut",1),icon:f._id!==l._id?"delete_forever":"logout",color:"red",onClick:function(){Object(S.c)({message:f._id!==l._id?Object(S.r)("$__confirmRemoveUser",1):Object(S.r)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){H(f._id,f._id===l._id)}})}}),a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__close","*"),icon:"undo",color:Object(S.d)("medium"),onClick:function(){v?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){m({_id:null}),y(!1)}}):(m({_id:null}),y(!1))}})),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:15,float:"left"}},(f._id!==l._id||B.plan&&B.planAdmin)&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement(ec.a,{defaultValue:String(X),"aria-label":"gender",name:"customized-radios",onChange:function(e){m(Object(d.a)(Object(d.a)({},f),{},{access:e.target.value})),y(!0)}},"plan"!==D.type&&(Y&&parseInt(Y.access)>=0||J&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Ri.a,{value:"0",control:a.a.createElement(Qi,null),label:Object(S.r)("$__reader",1)}),"plan"!==D.type&&(Y&&parseInt(Y.access)>=1||J&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Ri.a,{value:"1",control:a.a.createElement(Qi,null),label:Object(S.r)("$__executioner",1)}),"plan"!==D.type&&"chatGroup"!==D.type&&(Y&&parseInt(Y.access)>=2||J&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Ri.a,{value:"2",control:a.a.createElement(Qi,null),label:Object(S.r)("$__collaborator",1)}),(Y&&parseInt(Y.access)>=3||J&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Ri.a,{value:"3",control:a.a.createElement(Qi,null),label:Object(S.r)("$__leadership",1)}),"chatGroup"!==D.type&&(Y&&parseInt(Y.access)>=4||J&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Ri.a,{value:"4",control:a.a.createElement(Qi,null),label:Object(S.r)("$__supervisor",1)}),(Y&&parseInt(Y.access)>=5||B&&B.plan&&J&&(B.planAdmin||B.planModerate))&&a.a.createElement(Ri.a,{value:"5",control:a.a.createElement(Qi,null),label:Object(S.r)("$__admin",1)}))),"chatGroup"!==D.type?a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},"0"===f.access&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.r)("$__readOnlyTodo",1)),a.a.createElement("li",null,Object(S.r)("$__readTimeline",1))),parseInt(f.access)>=1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.r)("$__executioner",1)),a.a.createElement("li",null,Object(S.r)("$__timeSheetRegister",1)),a.a.createElement("li",null,Object(S.r)("$__interactonTheTimeline",1))),parseInt(f.access)>1&&a.a.createElement("li",null,Object(S.r)("$__ExecuteAndCreateSubTasks",1)),parseInt(f.access)>2&&a.a.createElement(a.a.Fragment,null,"plan"===i.data.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.r)("$__access",1)," BRIGHT & CONNECTED"),a.a.createElement("li",null,Object(S.r)("$__access",1)," INSIGHTS")),a.a.createElement("li",null,Object(S.r)("$__updateDueDate",1)),a.a.createElement("li",null,Object(S.r)("$__updateTags",1)),a.a.createElement("li",null,Object(S.r)("$__updateIndicators",1)),a.a.createElement("li",null,Object(S.r)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.r)("$__defineResponsible",1))),parseInt(f.access)>3&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.r)("$__updateData",1)),a.a.createElement("li",null,Object(S.r)("$__usersManager",1))),parseInt(f.access)>=4&&a.a.createElement(a.a.Fragment,null,"plan"===i.data.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.r)("$__access",1)," MATRIX SWOT")),a.a.createElement("li",null,Object(S.r)("$__settings",1))),5===parseInt(f.access)&&a.a.createElement("li",null,Object(S.r)("$__deleteActivity",1))):a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},parseInt(f.access)>1&&a.a.createElement("li",null,Object(S.r)("$__viewAndInteract",1)),parseInt(f.access)>2&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.r)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.r)("$__update",1))),5===parseInt(f.access)&&a.a.createElement("li",null,Object(S.r)("$__deleteGroup",1))),D._users[f._id]&&!D._users[f._id].isResponsible&&a.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__setAsResponsible"),text:Object(S.r)("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Lt(e,{cardId:i.data._id,userId:f._id})}})}}))))}return a.a.createElement("div",{className:r.root},F&&a.a.createElement("div",{style:{marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},a.a.createElement(tt,{id:"quickUser_Search",label:Object(S.r)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end",style:{cursor:"pointer"},onClick:function(){C(""),N(!1)}},a.a.createElement(ae.a,{icon:"close"})),onChange:function(e){C(e.target.value)},onBlur:function(e){}},value:L,placeholder:Object(S.r)("$__searchByName",1),autoFocus:!0})),""!==L&&L?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__permittedUsers",1)),P&&P.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e._id},q(e))}))),D&&D._groups&&Object.keys(D._groups).length>0?a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__permittedTeams",1)),z.filter((function(e){return D._groups[e.value]})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e},V(e))}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{display:"flex"}},a.a.createElement("div",{style:{padding:7,width:"calc(50% - 4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"users"!==O?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:"users"!==O?"gray":"#FFFFFF"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){w("users")}},a.a.createElement(ae.a,{icon:"supervised_user_circle",size:"33px",color:"users"!==O?null:"#FFFFFF"}),Object(S.r)("$__showUsers"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:"users"!==O?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:"users"!==O?"#FFFFFF":"gray"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){w("teams")}},a.a.createElement(ae.a,{icon:"group_work",size:"33px",color:"users"!==O?"#FFFFFF":null}),Object(S.r)("$__showTeams")))),"users"===O&&$&&$.length>0&&!f._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__avaiableUsers",1)),a.a.createElement("div",null,a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__add"),icon:"person_add",text:Object(S.r)("$__addAllUsers"),size:"20px",onClick:function(){W($)}})),$.sort((function(e,t){return e.name.toLowerCase().trim()<t.name.toLowerCase().trim()?-1:e.name.toLowerCase().trim()<t.name.toLowerCase().trim()?1:0})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e._id},q(e,!0))}))),"users"!==O&&z&&z.length>0&&!f._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.r)("$__avaiableTeams",1)),a.a.createElement("div",null,a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__add"),icon:"person_add",text:Object(S.r)("$__addAllTeams"),size:"20px",onClick:function(){U(z)}})),z.filter((function(e){return!D._groups||D._groups&&!D._groups[e.value]})).sort((function(e,t){return e.label.toLowerCase().trim()<t.label.toLowerCase().trim()?-1:e.label.toLowerCase().trim()<t.label.toLowerCase().trim()?1:0})).map((function(e,t){return a.a.createElement("div",{style:{width:"100%",padding:7},key:e._id},V(e))}))),F?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:0}},a.a.createElement(E.a,{title:Object(S.r)("$__search",1),color:Object(S.d)("menu"),icon:"search",onClick:function(){N(!0)},size:"25px"})))}))),ic=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},image:{width:"100%",backgroundColor:"rgb(0,88,0)",paddingTop:"45%"},data:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",marginTop:"10px",padding:"10px","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},loader:{position:"relative",width:"100%",height:"40px",textAlign:"center","& .MuiCircularProgress-root":{color:"".concat(Object(S.d)("color")," !important")}},preview:{listStyle:"none",padding:"0px","& li":{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",marginBottom:"15px",boxShadow:"0 0 7px 3px rgba(0,0,0,0.1)"}},previewTitle:{position:"relative",width:"100%",fontWeight:"bold",marginBottom:"7px"},feedTitle:{position:"relative",width:"100%",marginBottom:"7px",borderBottom:"solid 1px ".concat(Object(S.d)("medium",.2))},feedContent:{position:"relative",width:"100%"},feedFooter:{width:"100%",textAlign:"right",height:"16px",borderTop:"1px solid rgba(0,0,0,0.05)",paddingTop:"3px"},feedDate:{position:"relative",left:"0px",fontSize:"12px",float:"left"},feedLink:{position:"relative",left:"0px",fontSize:"12px",float:"right"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};function cc(){cc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var lc=function(){var e=Object(p.a)(cc().mark((function e(t){var r,n,a;return cc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=c.a.getState().sideModule.data).status&&delete r.status,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.prev=4,e.next=7,ut.a.post("feed/save",Object(d.a)(Object(d.a)({},r),{},{feed:JSON.stringify(r.feed),_parent:n[0]||null}));case 7:if(!(a=e.sent)){e.next=14;break}return r._id||(r._id=a.data._id),t.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:a.data._id,data:Object(d.a)({},r)})),console.log(a),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{feeds:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds),{},Object(f.a)({},r._id,Object(d.a)(Object(d.a)(Object(d.a)({},r),c.a.getState().db.feeds&&c.a.getState().db.feeds[r._id]?c.a.getState().db.feeds[r._id]:{}),{},{_parent:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds&&c.a.getState().db.feeds[r._id]&&c.a.getState().db.feeds[r._id]._parent?c.a.getState().db.feeds[r._id]._parent:{}),{},Object(f.a)({},n[0]||null,{_id:a.data._id,idRel:a.data.idRel}))})))})),e.abrupt("return",!0);case 14:e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(4),e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t){return e.apply(this,arguments)}}(),sc=function(){var e=Object(p.a)(cc().mark((function e(t){var r,n,a,o=arguments;return cc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=new Promise(function(){var e=Object(p.a)(cc().mark((function e(n,a){var o,i;return cc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/Feed_List_V2",r);case 3:(o=e.sent)&&o.data&&(i={},o.data.map((function(e){var t={};e.parents&&e.parents.length>0&&e.parents.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e._id,Object(d.a)({idRel:e.idRel},e.i)))})),i=Object(d.a)(Object(d.a)({},i),{},Object(f.a)({},e.data._id,Object(d.a)(Object(d.a)(Object(d.a)({},e.data),e.hide?{hide:!0}:{}),{},{feed:[Object(d.a)({},e.cover)],_parent:t},e.tags&&e.tags.filter((function(e){return e.value})).length>0?{_tags:e.tags}:{})))})),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{feeds:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds),i)})),n(!0)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFeeds::ERR::"),console.log(e.t0),console.groupEnd(),n(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}()),e.next=4,n;case 4:return a=e.sent,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function uc(){uc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var dc=Object(z.a)(ic);var pc=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=dc(),r=c.a.getState(),n=r.sideModule,o=r.session,i=r.db,l=n.data||{},s=a.a.useState(!1),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],O=a.a.useState(!1),w=Object(h.a)(O,2),j=w[0],k=(w[1],a.a.useRef()),L=0,C=Object(S.j)(),I=window.location.hash.split("/");I[0]=I[0].replace("#",""),I[0]&&36===I[0].length&&(L=Object(st.t)(I[0]));var T=function(t){""===l.name||"name"===t.name&&""===t.value?g(!1):l._lock&&(t.value&&!n.data[t.name]||n.data[t.name]&&n.data[t.name]!==t.value)&&g(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.a)({},n.data),{},Object(f.a)({},t.name,t.value))}))},F=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];m&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},N=function(){var t=Object(p.a)(uc().mark((function t(r){return uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g(!1),n.data.name){t.next=5;break}Object(S.c)({message:Object(S.r)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,lc(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.r)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&F(!0)):(Object(S.c)({message:Object(S.r)("$__AnErrorHasOccurredPleaseTryAgain",1),variant:"error",persist:!1,horizontal:"right",confirm:null}),g(!0));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),D=function(){var t=Object(p.a)(uc().mark((function t(r){var a,o,i,l;return uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=41;break}if(-1!==r.indexOf("http")){t.next=6;break}Object(S.c)({message:"".concat(Object(S.r)("$__invalidUrl",1),": ").concat(Object(S.r)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.a)({},n.data),{},{url:""})})),t.next=41;break;case 6:if(!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[&a-z\\d%_.~+=-]*)?(\\@[a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(r)){t.next=40;break}if(x(!0),"/"===(a=r)[r.length-1]&&(a=a.substring(0,r.length-1)),"/"===a.indexOf("http://")&&(a=a.replace("http://","https://")),"feed"!==n.data.type){t.next=25;break}return t.prev=13,t.next=16,ut.a.post("/feed/exist",{url:r});case 16:o=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.a)({},n.data),{},{_id:o.data.id,url:a,_lock:!0,feed:o.data.feed,name:o.data.title,customTitle:o.data.customTitle,customDescription:o.data.customDescription})})),o&&x(!1),o.data.title&&g(!0),t.next=25;break;case 22:t.prev=22,t.t0=t.catch(13),A(r);case 25:if("link"!==n.data.type){t.next=40;break}return t.prev=26,(i=window.location.hash.split("/"))[0]=i[0].replace("#",""),t.next=31,ut.a.post("/link/exist",{idRel:i[0],url:a});case 31:l=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:l.data.title,description:l.data.contentSnippet,image:l.data.img,url:l.data.link,content:l.data.article}})),l&&x(!1),l.data.title&&g(!0),t.next=40;break;case 37:t.prev=37,t.t1=t.catch(26),Object(S.c)({message:"".concat(Object(S.r)("$__invalidFeedUrl",1),": ").concat(Object(S.r)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 40:return t.abrupt("return");case 41:return t.abrupt("return",!1);case 42:case"end":return t.stop()}}),t,null,[[13,22],[26,37]])})));return function(e){return t.apply(this,arguments)}}(),A=function(){var t=Object(p.a)(uc().mark((function t(r){var a;return uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ut.a.post("/feed/request/",{url:r});case 3:a=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.a)({},n.data),{},{_id:a.data.id,url:r,_lock:!0,feed:a.data.feed,name:a.data.title,customTitle:a.data.customTitle,customDescription:a.data.customDescription})})),a&&x(!1),a.data.title&&g(!0),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),Object(S.c)({message:"".concat(Object(S.r)("$__invalidFeedUrl",1),": ").concat(Object(S.r)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}(),P=!!e.permission&&e.permission;return!P&&parseInt(L)>=3&&(P=!0),a.a.createElement("div",null,a.a.createElement("div",{className:t.btClose},a.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},P&&m&&a.a.createElement(sa,{save:m?function(){N()}:null,saveClose:m?function(){N(!0)}:null,saveLoader:j,close:function(){e.onClose&&e.onClose()}}),a.a.createElement(E.a,{title:Object(S.r)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),a.a.createElement("div",{className:t.data},l._lock?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,Object.assign({label:Object(S.r)("$__titleOfFeed",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){T(e.target)}},value:l&&l.name?l.name:"",placeholder:Object(S.r)("$__titleOfFeed_placeholder")},o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account||l&&l.name?{disabled:!0}:{})),a.a.createElement(tt,{label:Object(S.r)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"title"})),onChange:function(e){T(e.target)}},value:l&&l.customTitle?l.customTitle:"",placeholder:Object(S.r)("$__customTitle",1)}),o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account?a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"copyright"})),onChange:function(e){T(e.target)}},value:l&&l.font?l.font:"",placeholder:Object(S.r)("$__nameOfFontData",1)}),a.a.createElement(tt,{label:Object(S.r)("$__descriptionOfRss",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"subtitles"})),onChange:function(e){T(e.target)}},value:l&&l.description?l.description:"",placeholder:Object(S.r)("$__descriptionOfRss",1)})):a.a.createElement(a.a.Fragment,null),a.a.createElement(tt,{label:Object(S.r)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"subtitles"})),onChange:function(e){T(e.target)}},value:l&&l.customDescription?l.customDescription:"",placeholder:Object(S.r)("$__customDescription",1)}),a.a.createElement(tt,{label:Object(S.r)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:k,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"http"})),onChange:function(e){T(e.target)},onBlur:function(e){D(e.target.value)}},value:l&&l.url?l.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!l._lock}),C&&C.feed&&(C.feedAdmin||C.feedModerate)&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.r)("$__tags",1)),a.a.createElement(Fo,{data:{values:l._tags?l._tags:[]},callBack:function(e){T({name:"_tags",value:e})}})),C&&C.feed&&C.feedAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(La,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:l&&l.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(l.plans)}))[0]:i.plans[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:l&&l.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(l.plans)}))[0]:i.plans[0]}))},onChange:function(e,t){P&&T({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(hr,{checked:!!l.private,onChange:function(e){T({name:"private",value:!l.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__private",1))):a.a.createElement(tt,{label:Object(S.r)("$__feedUrl","*"),variant:Object(S.d)("fieldVariant"),ref:k,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"rss_feed"})),onChange:function(e){T(e.target)},onBlur:function(e){D(e.target.value)}},value:l&&l.url?l.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!l._lock}),!l._lock&&!y&&a.a.createElement(Ee,{text:Object(S.r)("link"===n.data.type?"$__validUrl":"$__validFeedUrl",1),icon:"check",onClick:function(){return D(k.current.value)}}),y&&a.a.createElement("div",{className:t.loader},a.a.createElement(la.a,null)),l.feed&&l.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.r)("$__preview",1)),l.feed.map((function(e,r){return a.a.createElement("li",{key:r},e&&e.title&&a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),a.a.createElement("div",{className:t.feedFooter},a.a.createElement("div",{className:t.feedDate},_()(e.pubDate).format("DD/MM/YYYY HH:MM")),a.a.createElement("div",{className:t.feedLink},a.a.createElement("a",{href:e.link,target:"_blank"},Object(S.r)("$__openLink","*")))))})))))}));function fc(){fc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var hc=Object(z.a)(ic);var mc=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=hc(),r=c.a.getState().sideModule,n=r.data||{},o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=(y[1],a.a.useRef()),w=0,j=window.location.hash.split("/");j[0]=j[0].replace("#",""),j[0]&&36===j[0].length&&(w=Object(st.t)(j[0]));var k=function(t){""===n.name||"name"===t.name&&""===t.value?s(!1):n._lock&&(t.value&&!r.data[t.name]||r.data[t.name]&&r.data[t.name]!==t.value)&&s(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r),{},{data:Object(d.a)(Object(d.a)({},r.data),{},Object(f.a)({},t.name,t.value))}))},L=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l&&!t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},C=function(){var t=Object(p.a)(fc().mark((function t(n){return fc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(!1),r.data.name){t.next=5;break}Object(S.c)({message:Object(S.r)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,lc(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.r)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&L(!0)):(Object(S.c)({message:Object(S.r)("$__AnErrorHasOccurredPleaseTryAgain",1),variant:"error",persist:!1,horizontal:"right",confirm:null}),s(!0));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var t=Object(p.a)(fc().mark((function t(n){var a,o,i;return fc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(a=n.trim())){t.next=29;break}if(-1!==a.indexOf("http")){t.next=7;break}Object(S.c)({message:"".concat(Object(S.r)("$__invalidUrl",1),": ").concat(Object(S.r)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r),{},{data:Object(d.a)(Object(d.a)({},r.data),{},{url:""})})),t.next=29;break;case 7:if(!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(a)){t.next=26;break}return b(!0),t.prev=10,(o=window.location.hash.split("/"))[0]=o[0].replace("#",""),t.next=15,ut.a.post("/link/exist",{idRel:o[0],url:a});case 15:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:i.data.title,description:i.data.contentSnippet,image:i.data.img,url:i.data.link,content:i.data.article}})),i&&b(!1),i.data.title&&s(!0),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(10),Object(S.c)({message:"".concat(Object(S.r)("$__invalidFeedUrl",1),": ").concat(Object(S.r)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 24:t.next=28;break;case 26:Object(S.c)({message:"".concat(Object(S.r)("$__invalidUrl",1),": ").concat(Object(S.r)("$__pleaseVerifyTheUrl",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r),{},{data:Object(d.a)(Object(d.a)({},r.data),{},{url:""})}));case 28:return t.abrupt("return",!0);case 29:return t.abrupt("return",!1);case 30:case"end":return t.stop()}}),t,null,[[10,21]])})));return function(e){return t.apply(this,arguments)}}(),T=!!e.permission&&e.permission;return!T&&parseInt(w)>=3&&(T=!0),a.a.createElement("div",null,a.a.createElement("div",{className:t.btClose},a.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},x&&a.a.createElement(a.a.Fragment,null,a.a.createElement(la.a,{size:"25px"})),T&&l&&a.a.createElement(a.a.Fragment,null,a.a.createElement(E.a,{title:Object(S.r)("$__save","*"),color:Object(S.d)("color"),icon:"save",onClick:function(){C()},size:"25px"}),a.a.createElement(E.a,{title:Object(S.r)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){C(!0)},size:"25px"})),a.a.createElement(E.a,{title:Object(S.r)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),a.a.createElement("div",{className:t.data},n._lock&&a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__titleOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_headline"})),onChange:function(e){k(e.target)}},value:n&&n.name?n.name:"",placeholder:Object(S.r)("$__titleOfUrl_placeholder"),disabled:!0}),a.a.createElement(tt,{label:Object(S.r)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"title"})),onChange:function(e){k(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:Object(S.r)("$__customTitle",1)}),a.a.createElement(tt,{label:Object(S.r)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"copyright"})),onChange:function(e){k(e.target)}},value:n&&n.font?n.font:"",placeholder:Object(S.r)("$__nameOfFontData",1)}),a.a.createElement(tt,{label:Object(S.r)("$__descriptionOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"subtitles"})),onChange:function(e){k(e.target)}},value:n&&n.description?n.description:"",placeholder:Object(S.r)("$__descriptionOfUrl",1)}),a.a.createElement(tt,{label:Object(S.r)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"subtitles"})),onChange:function(e){k(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:Object(S.r)("$__customDescription",1)}),a.a.createElement("div",{className:t.switch},a.a.createElement(hr,{checked:!!n.private,onChange:function(e){k({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__private",1))),a.a.createElement(tt,{label:Object(S.r)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:O,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"http"})),onChange:function(e){k(e.target)},onBlur:function(e){I(e.target.value)}},value:n&&n.url?n.url:"",placeholder:"http://www.domain.com/",disabled:!!n._lock}),!n._lock&&!g&&a.a.createElement(Ee,{text:Object(S.r)("$__validUrl",1),icon:"check",onClick:function(){return I(O.current.value)}}),g&&a.a.createElement("div",{className:t.loader},a.a.createElement(la.a,null)),n.feed&&n.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.r)("$__preview",1)),n.feed.map((function(e,r){return a.a.createElement("li",{key:r},e&&e.title&&a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),a.a.createElement("div",{className:t.feedFooter},a.a.createElement("div",{className:t.feedDate},_()(e.pubDate).format("DD/MM/YYYY HH:MM")),a.a.createElement("div",{className:t.feedLink},a.a.createElement("a",{href:e.link,target:"_blank"},Object(S.r)("$__openLink","*")))))})))))}));var gc=Object(s.b)((function(e){return{sideModuleWindow:e.session.sideModuleWindow,sideModule:e.sideModule,cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ua)((function(e){var t,r,n=c.a.getState(),o=n.sideModule,i=n.db,l=n.session,s=a.a.useState(!1),u=Object(h.a)(s,2),p=u[0],f=u[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1];if(a.a.useEffect((function(){return o.id&&(b||"timeline"!==o.activeModule||(v(!0),f(!1))),function(){}}),[o]),!o.data||!o.data.type||0===i.dataType.filter((function(e){return e.name===o.data.type})).length)return null;if(o&&!o.id)return null;var y=e.classes,x=o.data,_=window.location.hash.split("/");_[0]=_[0].replace("#","");var O=i.cards[x._id]?"cards":"users",w=Object(S.j)(),j=Object(st.t)(o.id),E=!1;!x||!x._planId||i.cards[x._planId]&&Object(st.C)(x._planId)||(E=!1),!(E=!(!o||!("new"===o.id||("user"===x.type||"client"===x.type)&&w&&w.user&&(w.userAdmin||w.userModerate)||"user"!==x.type&&"client"!==x.type&&"chatGroup"!==x.type&&w&&(w.owner||w.plan&&(w.planAdmin||w.planModerate))||"chatGroup"===x.type&&(!x.client||x.client&&i.users[x.client])&&w&&(w.owner||w.plan&&(w.planAdmin||w.planModerate)))))&&parseInt(j)>=4&&(E=!0),!E&&Object(st.C)(x._planId)&&w&&w.admin&&w.plan&&(w.planAdmin||w.planModerate)&&(E=!0);var k=[{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:Ya,closeOption:!1,permission:0},{name:"feedEdit",icon:"rss_feed",title:"$__feedEdit",reqId:!1,module:pc,closeOption:!1,permission:3,template:!0},{name:"link",icon:"link",title:"$__link",reqId:!1,module:mc,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:Ea,props:{type:"comment",nodeId:o.id,db:"cards",loadTimeline:!0,disabledSend:"0"===String(j)},closeOption:!0,permission:0,count:"comment"},{name:"log",icon:"history",title:"$__log",reqId:!0,module:Ea,props:{type:"log",nodeId:o.id,db:"cards",loadTimeline:!0,noSearch:!0,disabledSend:!0},closeOption:!0,permission:0,count:"log"},{name:"checklist",icon:"checklist",title:"$__list",reqId:!0,module:br,closeOption:!0,permission:1,props:{nodeId:o.data._id,db:o.db?o.db:"cards",permission:E,showProgress:!0},template:!0}].concat(Object(Ne.a)(x.type.indexOf("guideline")>-1||x.type.indexOf("objective")>-1||x.type.indexOf("goal")>-1?[{name:"catenation",icon:"account_tree",title:"$__catenation",reqId:!0,module:Jo,closeOption:!0,permission:2,props:{nodeId:o.data._id,db:o.db?o.db:"cards"},template:!0}]:[]),[{name:"recurrence",icon:"update",title:"$__recurrence",reqId:!0,module:vi,closeOption:!0,permission:3,props:{nodeId:o.data._id,db:o.db?o.db:"cards"},template:!0},{name:"files",icon:"folder",title:"$__files",reqId:!0,module:mi,closeOption:!0,permission:3,props:{nodeId:o.id,db:o.db}},{name:"access",icon:l._id===x._id?"vpn_key":"security",title:l._id===x._id?"$__changePassword":"$__access",reqId:!0,module:Wa,closeOption:!1,permission:l._id===x._id?0:4}],Object(Ne.a)(l._id===x._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:Va,closeOption:!1,permission:l._id===x._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:lo,closeOption:!1,permission:l._id===x._id?0:6,ownerLock:!0}]:[]),[{name:"resume",icon:"blur_on",title:"$__resume",resume:!0,reqId:!0,module:Ho,closeOption:!0,permission:2,template:!0},{name:"cardEdit",icon:"subject",title:"$__edition",reqId:!1,module:Po,closeOption:!1,permission:0,buttonsCount:3,template:!0},{name:"columnEdit",icon:"tune",title:"$__edition",reqId:!1,module:ii,closeOption:!1,permission:0,buttonsCount:3,template:!0},{name:"users",icon:"supervised_user_circle",title:"$__usersAndDepartments",reqId:!0,module:oc,closeOption:!0,permission:3,template:!0}],Object(Ne.a)("users"===O?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:Xi,closeOption:!0}]:[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:mo,closeOption:!0,permission:5,template:!0}]),Object(Ne.a)(j>=4||j&&j<4&&x.kpi_type&&"task"!==x.kpi_type||w&&w.plan&&w.planAdmin?[{name:"kpi",icon:"analytics",title:"$__kpi",reqId:!0,module:Ro,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:Vi,closeOption:!0,permission:1,count:"timer"},{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:Oi,closeOption:!0,permission:3,template:!0}],Object(Ne.a)("client"===x.type||"group"===x.type||"unity"===x.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:ro,closeOption:!1,permission:1,template:!0}]:[]),Object(Ne.a)("user"===x.type&&l._id===x._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Xa,closeOption:!1,permission:1,template:!0}]:[]),Object(Ne.a)("step"===x.type&&E?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:ci,closeOption:!1,permission:5,template:!0}]:[]),Object(Ne.a)("user"!==x.type&&"step"!==x.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:qo,closeOption:!1,permission:5,template:!0}]:[])),L=k.filter((function(e){return e.name===o.activeModule}))[0];if(!L||!L.module)return null;var C=function(t){p?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){f(!1),o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)({},o))}}):(o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)({},o)))},I=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];p||t?Object(S.c)({message:Object(S.r)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE"),f(!1)}}):(e.reduxFunction("ASYNC","CLEAR_MODULE"),f(!1))},T=Object(st.R)(x._id),F=(o.data.type?i.dataType.filter((function(e){return e.name===o.data.type}))[0]:[]).modules;return o&&o.id?a.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(0,0,0,0.7)",backdropFilter:"blur(3px)"},onClick:function(e){e.stopPropagation(),I()}},a.a.createElement("div",{className:l.sideModuleWindow&&"popup"===l.sideModuleWindow?y.modulePopup:l.sideModuleWindow&&"expanded"===l.sideModuleWindow?y.moduleExpanded:l.sideModuleWindow&&"fullScreen"===l.sideModuleWindow?y.moduleFullScreen:y.module,id:"sideModule",onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{className:y.menu,style:{background:Object(S.d)("menuColor"),borderRight:"solid 3px ".concat(Object(S.d)("color"))},id:"sideModule_menu"},a.a.createElement("div",{className:y.menuButtons_resume}),F.map((function(e,t){var r=!0;!x||!x._planId||i.cards[x._planId]&&Object(st.C)(x._planId)||(r=!1);var n=k.filter((function(t){return t.name.trim()===e.trim()&&!t.resume&&!t.hide}))[0];if(n&&(("user"===x.type||"client"===x.type)&&(w&&w.user&&(w.userAdmin||w.userModerate&&n.permission<=4||w.userEdit&&n.permission<=3)||x._id===l._id&&n.permission<=3)||"user"!==x.type&&"client"!==x.type&&"account"!==x.type&&"unity"!==x.type&&r&&w&&w.plan&&(w.planAdmin||w.planModerate&&n.permission<=4)||("user"!==x.type||"client"!==x.type||"account"!==x.type)&&String(j)&&parseInt(j)>=parseInt(n.permission))){if(n.ownerLock&&w&&!w.owner&&x._access&&x._access.owner&&l._id!==x._id)return null;if((!T||o.data&&T&&n.template)&&(n&&!n.reqId||n&&(n.reqId||!n.reqId)&&36===o.id.length)){if("recurrence"===n.name&&Object.keys(c.a.getState().db.cards).filter((function(e){if(!c.a.getState().db.cards[e].deleted&&!c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._recurrenceId&&c.a.getState().db.cards[e]._recurrenceId===o.data._id)return!0})).length>0)return a.a.createElement(uo,{key:t,icon:n.icon,module:n.name,title:Object(S.r)(n.title,1),count:n.count?n.count:null,openModule:function(e){C(e)}});if("recurrence"!==n.name)return a.a.createElement(uo,{key:t,icon:n.icon,module:n.name,title:Object(S.r)(n.title,1),count:n.count?n.count:null,openModule:function(e){C(e)}})}}}))),a.a.createElement("div",{id:"sideModule_header"},a.a.createElement(wn,Object.assign({title:o&&o.data&&o.data.name||"".concat(Object(S.r)("$__create")," ").concat(Object(S.r)("$__".concat(o.data.type))),icon:(null===o||void 0===o||null===(t=o.data)||void 0===t?void 0:t.icon)||o&&o.data&&o.data.type&&i.dataType.filter((function(e){return e.name===o.data.type}))[0].icon||"view_comfy",style:{paddingLeft:"50px",width:"calc(100% - 0px)",minHeight:"50px",marginTop:"-4px"},color:Object(S.d)("menu")},E&&(null===o||void 0===o||null===(r=o.data)||void 0===r?void 0:r._id)?{editable:!0,onChangeIcon:function(t){Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:o.data._id}}),{icon:t})}}:{})),L.closeOption&&a.a.createElement(sa,{close:function(){return I()}})),a.a.createElement("div",{className:y.content},a.a.createElement($,null,a.a.createElement(L.module,Object.assign({},L.props,{permission:E,onClose:function(e){I(e)},reqSave:function(e){f(e)}})))),a.a.createElement("div",{className:y.subTitle,id:"sideModule_subTitle",style:Object(d.a)(Object(d.a)({},o&&o.data&&o.data.private?{background:"gray"}:{}),{},{display:"flex",justifyContent:"space-between"})},Object(S.r)(L.title.toLowerCase(),1),o&&o.data&&o.data.private?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.r)("$__isPrivate","*"),a.a.createElement(ae.a,{icon:"lock",color:"#FFFFFF",size:20,style:{marginLeft:7}})):a.a.createElement(a.a.Fragment,null)))):null}))),bc=r(718),vc=r.n(bc),yc=Object(de.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(Yt.a);function xc(){xc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var _c=function(e,t){var r=c.a.getState().db.tag;r.filter((function(e){return e.value===t.value})).length>0?r.map((function(e,n){e.value===t.value&&(r[n]=Object(d.a)(Object(d.a)({},r[n]),t))})):r.push(t),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{tag:Object(Ne.a)(r)}))},Oc=function(){var e=Object(p.a)(xc().mark((function e(t,r){return xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ut.a.delete("/tag/unique/".concat(r._id),Object(d.a)({},r))&&wc(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),wc=function(e,t){var r=[];c.a.getState().db.tag.map((function(e){e.value!==t._id&&r.push(e)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{tag:r}))},jc=function(){var e=Object(p.a)(xc().mark((function e(t,r){return xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ut.a.put("/tag/unlink/",Object(d.a)({},r))&&Sc(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ec=function(){var e=Object(p.a)(xc().mark((function e(t,r){var n,a;return xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.a.getState(),a=n.session,r.target===r._id&&(r.target=a.account),e.next=4,ut.a.put("/tag/link/",Object(d.a)({},r));case 4:if(!e.sent){e.next=7;break}return e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Sc=function(e,t){var r=[],n=c.a.getState(),a=n.session,o=n.db;o.tag.map((function(e){var n=e;e.value===t._id&&(n=Object(d.a)(Object(d.a)({},n),{},{count:0})),r.push(n)}));var i=Object(d.a)({},o.cards);Object.keys(i).filter((function(e){return i[e]._users&&i[e]._users[a._id]&&i[e]._tags&&i[e]._tags.filter((function(e){return e.value===t._id})).length>0})).map((function(e){var r=[];i[e]._tags.map((function(e){e.value!==t._id&&r.push(e)})),i[e]._tags=r})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},o),{},{tag:r,cards:i}))},kc=function(e){return Object(d.a)(Object(d.a)({},W.l),{},{menu:{position:"relative",borderRight:Object(S.d)("color")},menuExpanded:{position:"relative",borderRight:Object(S.d)("color")},button:{position:"relative",float:"left",width:"100%",padding:"7px"},buttonColor:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px 12px",marginLeft:"-12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(S.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};r(924);function Lc(){Lc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Cc=function(e){var t=e.data,r=a.a.useState(!1),n=Object(h.a)(r,2),o=(n[0],n[1]),c=a.a.useState(!1),l=Object(h.a)(c,2),s=l[0],u=l[1],f=Object(S.j)(),m=function(){var t=Object(p.a)(Lc().mark((function t(r){return Lc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Oc(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=Object(p.a)(Lc().mark((function t(r){return Lc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){jc(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return t.item.value?a.a.createElement("div",{style:{width:"100%",cursor:"pointer",display:"flex"},onMouseOver:function(){f&&f.plan&&f.planAdmin&&u(!0)},onMouseLeave:function(e){u(!1)}},a.a.createElement("div",{style:Object(d.a)({zIndex:0,maxWidth:"90%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},t.item.color?{borderLeft:"solid 6px ".concat(t.item.color),paddingLeft:"7px"}:{}),onClick:function(){var e;e=t.item,i.a.push("tags#".concat(e.value))}},t.item.text," ",t.item._count?"(".concat(t.item._count,")"):""),s&&a.a.createElement("div",{style:{zIndex:1}},a.a.createElement(We,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(S.d)("color"),onOpen:function(){o(!0)},onClose:function(){o(!1)},options:[].concat(Object(Ne.a)(f&&f.plan&&f.planAdmin?[{name:"$__edit",icon:"edit",onClick:function(){e.editTag(t.item)}}]:[]),[(0===parseInt(t.item._count)&&0===parseInt(t.item._countOthers)||parseInt(t.item._count)>0&&0===parseInt(t.item._countOthers))&&{name:"$__delete",icon:"delete_forever",onClick:function(){m(t.item)}},parseInt(t.item._count)>0&&parseInt(t.item._countOthers)>0&&{name:"$__unlinkMyActivities",icon:"label_off",onClick:function(){g(t.item)}}])}))):a.a.createElement("div",{style:{fontWeight:"bold",color:Object(S.d)("color"),fontSize:"12px"}},t.item.text)};function Ic(){Ic=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Tc=Object(s.b)((function(e){return{tag:e.db.tag}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Object(z.a)(kc)(),r=c.a.getState(),n=r.db,o=r.session,i=e.tag,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState({}),j=Object(h.a)(w,2),k=j[0],L=j[1],C=a.a.useState(!1),I=Object(h.a)(C,2),T=I[0],F=I[1],N=a.a.useState(null),D=Object(h.a)(N,2),A=D[0],P=D[1],$=a.a.useState([]),M=Object(h.a)($,2),B=M[0],Y=M[1];a.a.useEffect((function(){return u||(f(!0),G(),e.onLoad&&e.onLoad()),function(){}}),[]),a.a.useEffect((function(){return G(),function(){}}),[A,JSON.stringify(e.tag)]);var R=Object(S.j)(),G=function(){var e=[];i.filter((function(e){var t=A?Object(S.p)(A.toLowerCase().trim()):"",r=Object(S.p)(e.label.toLowerCase().trim());if(!e.parent&&(!A||A&&r.indexOf(t)>-1))return!0})).sort((function(e,t){return Object(S.p)(e.label.toLowerCase().trim())<Object(S.p)(t.label.toLowerCase().trim())?-1:Object(S.p)(e.label.toLowerCase().trim())>Object(S.p)(t.label.toLowerCase().trim())?1:0})).map((function(t){var r=t;if(r._count=Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length>parseInt(r._count)?Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length:parseInt(r._count),r._countOthers=Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&!n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length>parseInt(r._countOthers)?Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&!n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length:parseInt(r._countOthers),0===e.filter((function(e){return e.id===r.label.substr(0,1)})).length){var a=[];i.filter((function(e){return e.parent&&e.parent===r.value})).length>0&&i.filter((function(e){return e.parent&&e.parent===r.value})).map((function(e){0===a.filter((function(t){return t.value===e.value})).length&&a.push(Object(d.a)({id:e.value,text:e.label},e))})),e.push({id:r.label.substr(0,1),text:r.label.substr(0,1),children:[Object(d.a)(Object(d.a)({id:r.value,text:r.label},r),{},{children:a})]})}else if(e.filter((function(e){return e.id===r.label.substr(0,1)})).length>0&&0===e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.filter((function(e){return e.value===r.value})).length){var c=[];i.filter((function(e){return e.parent&&e.parent===r.value})).length>0&&i.filter((function(e){return e.parent&&e.parent===r.value})).map((function(e){0===c.filter((function(t){return t.value===e.value})).length&&c.push(Object(d.a)({id:e.value,text:e.label},e))})),e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.push(Object(d.a)(Object(d.a)({id:r.value,text:r.label},r),{},{children:c}))}})),JSON.stringify(e)!==JSON.stringify(B)&&Y(e)},H=function(){L({}),F(!1),v(!1)},W=function(e){v(!0),L(e||{})},U=function(){var t=Object(p.a)(Ic().mark((function t(){var r;return Ic().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(F(!0),!k.value){t.next=15;break}return t.prev=2,t.next=5,ut.a.put("tag/update",{_id:k.value,name:k.name?k.name:k.label,color:k.newColor?k.newColor:k.color?k.color:null});case 5:t.sent&&(_c(e,{value:k.value,label:k.name?k.name:k.label,color:k.newColor?k.newColor:k.color}),F(!1),H()),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.log(t.t0),F(!1);case 13:t.next=26;break;case 15:return t.prev=15,t.next=18,ut.a.post("tag/add",{name:k.name,color:k.newColor?k.newColor:k.color?k.color:null});case 18:(r=t.sent)&&r.data&&(O(!0),_c(e,r.data),F(!1),H()),t.next=26;break;case 22:t.prev=22,t.t1=t.catch(15),console.log(t.t1),F(!1);case 26:case"end":return t.stop()}}),t,null,[[2,9],[15,22]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement("div",{className:t.menu},a.a.createElement("div",{style:{marginTop:"5px"}},a.a.createElement(at,{title:Object(S.r)("$__tags",1),icon:"bookmarks",iconTitle:Object(S.r)("$__tags",1),color:Object(S.d)("colorText"),fontSize:"16px",moreButton:!0,options:[{name:"$__addTag",icon:"add_box",color:Object(S.d)("color"),show:"hover",onClick:function(){W()}},R&&R.plan&&R.planAdmin&&!_&&{name:"$__showAllTags",icon:"style",color:Object(S.d)("color"),show:"hover",onClick:function(){O(!0)}},_&&{name:"$__onlyMyTags",icon:"loyalty",color:Object(S.d)("color"),show:"hover",onClick:function(){O(!1)}}],optionsProps:{transparent:!0}})),a.a.createElement("div",{className:t.separator}),a.a.createElement("div",null,a.a.createElement(tt,{label:Object(S.r)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:A?a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"cancel",color:"green",onClick:function(){return P(null)}})):null,onChange:function(e){P(e.target.value)}},placeholder:Object(S.r)("$__nameOfTagSearch_placeholder",1)}))),a.a.createElement("div",{style:{position:"absolute",top:"112px",bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},a.a.createElement(vc.a,{collapse:"ALL",items:B,maxDepth:3,renderItem:function(e){return a.a.createElement(Cc,{data:e,editTag:function(e){W(e)}})},onChange:function(t){var r=t.items,n=r[t.targetPath[0]].children[t.targetPath[1]];if(!t.dragItem.parent&&t.dragItem.id===n.id)return!1;Ec(e,{_id:t.dragItem.id,target:n.id}),Y(r)}})),a.a.createElement(yc,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:b,style:{overflow:"visible !important"}},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(at,{title:k.value?Object(S.r)("$__editTag",1):Object(S.r)("$__newTag",1),icon:"label",onCancel:function(){v(!1)}})),a.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},"Etiquetas permitem que voc\xea adicione palavras-chave \xe0s atividades (Tarefas, Insights, Not\xedcias), organizando-as e permitindo melhor navega\xe7\xe3o e praticidade no seu dia a dia."),a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(tt,{error:!(!k||k.label&&0!==k.label.length),helperText:"Campo de nome da etiqueta deve ter o compimento m\xednimo de 1 caractere",label:Object(S.r)("$__name",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){L(Object(d.a)(Object(d.a)({},k),{},{name:e.target.value}))}},defaultValue:k&&k.label?k.label:null,placeholder:Object(S.r)("$__nameOfTag_placeholder",1)})),a.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},a.a.createElement("span",{style:{marginRight:"7px"}},Object(S.r)("$__tagColor"),":"),a.a.createElement(De.a,{disablePortal:!0,color:k.color,onChange:function(e){L(Object(d.a)(Object(d.a)({},k),{},{newColor:e}))}},k.color||k.newColor?a.a.createElement("div",{className:"tag",style:{backgroundColor:k.newColor?k.newColor:k.color,width:"22px",height:"22px",borderRadius:"50%",cursor:"pointer"}}):a.a.createElement("div",{className:"tag",style:{fontWeight:"bold"}},Object(S.r)("$__clickHereToAddColor")))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){v(!1)}}),k&&(k.name||k.newColor)&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__save"),text:Object(S.r)("$__save"),icon:"save",size:"25px",load:!!T,onClick:function(){U()}})))))}));var Fc=Object(s.b)((function(e,t){return{timeline:e.timeline}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Ir();return document.title="".concat(t&&t.total>0?"(".concat(t.total,") "):"","MACHEN"),a.a.createElement(a.a.Fragment,null,a.a.createElement(Ae.a,{badgeContent:t&&t.total?t.total:0,color:"secondary",overlap:"rectangular"},e.children))})),Nc=r(1735),Dc=r(1764),Ac=r(1736),Pc=r(1732),$c={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:W.q[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:W.z[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:W.j[0]}},underlineSuccess:{"&:after":{borderColor:W.G[0]}},labelRoot:Object(d.a)(Object(d.a)({},W.l),{},{color:W.q[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:W.j[0]+" !important"},labelRootSuccess:{color:W.G[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:W.q[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:W.O},"&:after":{backgroundColor:W.O}},input:{color:W.q[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:W.q[3]}},whiteInput:{"&,&::placeholder":{color:W.O,opacity:"1"}}},zc=Object(z.a)($c);function Mc(e){var t,r,n,o,i,c=zc(),l=e.formControlProps,s=e.labelText,u=e.id,d=e.labelProps,p=e.inputProps,h=e.error,m=e.white,g=e.inputRootCustomClasses,b=e.success,v=e.helperText,x=y()((t={},Object(f.a)(t," "+c.labelRootError,h),Object(f.a)(t," "+c.labelRootSuccess,b&&!h),t)),_=y()((r={},Object(f.a)(r,c.underlineError,h),Object(f.a)(r,c.underlineSuccess,b&&!h),Object(f.a)(r,c.underline,!0),Object(f.a)(r,c.whiteUnderline,m),r)),O=y()(Object(f.a)({},g,void 0!==g)),w=y()((n={},Object(f.a)(n,c.input,!0),Object(f.a)(n,c.whiteInput,m),n));i=void 0!==l?y()(l.className,c.formControl):c.formControl;var j=y()((o={},Object(f.a)(o,c.labelRootError,h),Object(f.a)(o,c.labelRootSuccess,b&&!h),o));return a.a.createElement(Nc.a,Object.assign({},l,{className:i}),void 0!==s?a.a.createElement(Dc.a,Object.assign({className:c.labelRoot+" "+x,htmlFor:u},d),s):null,a.a.createElement(Pc.a,Object.assign({classes:{input:w,root:O,disabled:c.disabled,underline:_},id:u},p)),void 0!==v?a.a.createElement(Ac.a,{id:u+"-text",className:j},v):null)}var Bc={cardFooter:{padding:"0",paddingTop:"10px",margin:"0 15px 10px",borderRadius:"0",justifyContent:"space-between",alignItems:"center",display:"flex",backgroundColor:"transparent",border:"0"},cardFooterProfile:{marginTop:"-15px"},cardFooterPlain:{paddingLeft:"5px",paddingRight:"5px",backgroundColor:"transparent"},cardFooterPricing:{zIndex:"2"},cardFooterTestimonial:{display:"block"},cardFooterStats:{borderTop:"1px solid"+W.q[8],marginTop:"20px","& svg":{position:"relative",top:"4px",marginRight:"3px",marginLeft:"3px",width:"16px",height:"16px"},"& .fab,& .fas,& .far,& .fal,& .material-icons":{position:"relative",top:"4px",marginRight:"3px",marginLeft:"3px",fontSize:"12px",lineHeight:"16px"}},cardFooterChart:{borderTop:"1px solid"+W.q[8]}},Yc=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],Rc=Object(z.a)(Bc);function Gc(e){var t,r=Rc(),n=e.className,o=e.children,i=e.plain,c=e.profile,l=e.pricing,s=e.testimonial,u=e.stats,d=e.chart,p=e.product,h=Object(G.a)(e,Yc),m=y()((t={},Object(f.a)(t,r.cardFooter,!0),Object(f.a)(t,r.cardFooterPlain,i),Object(f.a)(t,r.cardFooterProfile,c||s),Object(f.a)(t,r.cardFooterPricing,l),Object(f.a)(t,r.cardFooterTestimonial,s),Object(f.a)(t,r.cardFooterStats,u),Object(f.a)(t,r.cardFooterChart,d||p),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:m},h),o)}var Hc=function(e){return{container:Object(d.a)(Object(d.a)({},W.e),{},Object(f.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(d.a)(Object(d.a)({},W.d),{},{color:W.O}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:W.O},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:W.q[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};function Wc(){Wc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Uc=Object(z.a)(Hc);var Vc,qc,Xc=r(1847),Kc=r(1833),Jc=r(1840);function Zc(){Zc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Qc=w.default.div(Vc||(Vc=Object(u.a)(["\n background-color:none;\n\n "]))),el=w.default.div(qc||(qc=Object(u.a)(["\n min-width:300px;\n background-color: rgba(255,255,255,0.9);\n padding: 7px;\n margin-bottom:10px;\n box-shadow: 0 0 7px rgba(0,0,0,0.2);\n display:flex;\n "]))),tl=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState(null),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(""),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState(""),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState({}),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState({open:!1,name:""}),j=Object(h.a)(w,2),E=j[0],k=j[1],L=c.a.getState().db,C=c.a.getState().functions.socket,I=function(){var e=Object(p.a)(Zc().mark((function e(t){var r,n,a,o,i,c;return Zc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.destination,n=t.source,a=t.draggableId,r){e.next=3;break}return e.abrupt("return",!1);case 3:if(r.droppableId!==n.droppableId||r.id!==n.index){e.next=5;break}return e.abrupt("return",!1);case 5:return o=Array.from(L.cards.boardModels.boards[n.droppableId].columnOrder),i=n.droppableId,o.splice(n.index,1),o.splice(r.index,0,a),ut.a.put("column/reorder",{columns:o}),c={_parent:"boardModels",_board:i,_order:o},C.emit("column.REORDER",c),e.abrupt("return");case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(p.a)(Zc().mark((function e(t){var r,a,i,c;return Zc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Array.from(L.cards.boardModels.boards[t].columnOrder),e.prev=1,i={},n){e.next=10;break}return e.next=6,ut.a.post("column/add",{board:t,name:s,icon:b});case 6:a=e.sent,i={cards:[],name:s,_id:a.data.id,icon:b},e.next=14;break;case 10:return e.next=12,ut.a.put("column/update",{_id:n,board:t,name:s,icon:b});case 12:a=e.sent,i={name:s,_id:a.data.id,icon:b};case 14:a&&(n||r.push(a.data.id),c={_parent:"boardModels",_columnId:a.data.id,_board:t,_cardColumn:"boardModels",_columnData:i,_columnsOrder:r},C.emit("column.UPD",c),O(!1),u(""),v(""),o(null)),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),console.log(e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=Object(p.a)(Zc().mark((function e(t,r){var n,a;return Zc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.a.getState().functions.socket,e.prev=1,e.next=4,ut.a.delete("column/run/".concat(r,"__").concat(t),{board:t,name:s,icon:b});case 4:e.sent&&(a={_parent:"boardModels",_board:t,_deleted:r},n.emit("column.DELETE",a)),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(1);case 10:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,r){return e.apply(this,arguments)}}(),N=function(){var t=Object(p.a)(Zc().mark((function t(){var r;return Zc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ut.a.post("boards/add",{name:E.name});case 3:r=t.sent,e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},{boardModels:Object(d.a)(Object(d.a)({},c.a.getState().db.cards.boardModels),{},{boards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards.boardModels.boards),r.data)})})})),k({name:"",open:!1}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(un,null,L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&Object.keys(L.cards.boardModels.boards).map((function(t){return a.a.createElement(Zt.a,{onDragEnd:I,key:t},a.a.createElement(fn,{md:3},a.a.createElement("fieldset",{style:{width:"100%"}},a.a.createElement("legend",null,L.cards.boardModels.boards[t].name),a.a.createElement(Zt.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return a.a.createElement(Qc,Object.assign({ref:r.innerRef},r.droppableProps,{isDraggingOver:n.isDraggingOver}),!e.noList&&L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&L.cards.boardModels.boards[t]&&L.cards.boardModels.boards[t].columnOrder&&L.cards.boardModels.boards[t].columnOrder.map((function(e,r){return a.a.createElement(Zt.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return a.a.createElement(el,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),L.cards.boardModels.boards[t].columns[e].name&&a.a.createElement(wn,{title:L.cards.boardModels.boards[t].columns[e].name||"",icon:L.cards.boardModels.boards[t].columns[e].icon||null,iconTitle:"A",fontSize:"16px",customButtons:[{name:"delete",icon:"delete_forever",onClick:function(){F(t,e)},show:"hover"},{name:"edit",icon:"edit",onClick:function(){u(L.cards.boardModels.boards[t].columns[e].name),v(L.cards.boardModels.boards[t].columns[e].icon||null),o(e),O(Object(f.a)({},t,{open:!0}))},show:"hover"}]}))}))})),_&&_[t]&&_[t].open?a.a.createElement(a.a.Fragment,null,a.a.createElement(el,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(vn,{callBack:function(e){v(e)}})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(tt,{label:Object(S.r)("$__nameOfColumn",1),variant:"outlined",name:"NewColumn",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&T(t)}},value:s,placeholder:Object(S.r)("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}))),a.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},a.a.createElement(Ee,{icon:"save",text:Object(S.r)("$__save","*"),onClick:function(){T(t)}}),a.a.createElement(Ee,{icon:Object(S.r)("$__cancel","*"),iconColor:"red",text:Object(S.r)("$__cancel","*"),onClick:function(){u(""),O({})}}))):a.a.createElement(Ee,{icon:"add_box",text:Object(S.r)("$__addColumn",1),onClick:function(){O(Object(f.a)({},t,{open:!0}))}}),r.placeholder)})))))})),a.a.createElement("div",null,E.open?a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(tt,{label:Object(S.r)("$__boardName",1),variant:"outlined",name:"boardName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){k(Object(d.a)(Object(d.a)({},E),{},{name:e.target.value}))},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&N()}},value:E&&E.name,placeholder:Object(S.r)("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}),a.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},a.a.createElement(Ee,{icon:"save",text:Object(S.r)("$__save","*"),onClick:function(){N()}}),a.a.createElement(Ee,{icon:"cancel",iconColor:"red",text:Object(S.r)("$__cancel","*"),onClick:function(){u(""),k({open:!1,name:""})}}))):a.a.createElement(Ee,{icon:"add_box",text:Object(S.r)("$__addBoard",1),onClick:function(){k(Object(d.a)(Object(d.a)({},E),{},{open:!0}))}})))})),rl=r(1842),nl=function(e){return{root:Object(d.a)(Object(d.a)({},W.l),{},{width:"100%",marginBottom:e.spacing(2),padding:"7px",height:"calc(100vh - 220px)",overflowX:"auto"}),header:{position:"relative",float:"left",width:"auto",minWidth:"100%",height:"50px",display:"flex",alignItems:"center",backgroundColor:Object(S.d)("dark"),color:Object(S.d)("light")},column:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Object(S.d)("light",.4)),width:"300px"},column2:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Object(S.d)("light",.4)),width:"calc(100% - 300px)"},body:{color:Object(S.d)("medium"),position:"relative",clear:"both",display:"flex",alignItems:"center",borderBottom:"solid 1px ".concat(Object(S.d)("medium",.2)),"& ul":{position:"relative",padding:"0px",margin:"0px",float:"left",minWidth:"100%","& li":{minWidth:"100%",width:"fit-content",display:"flex",listStyle:"none",padding:"15px 0px",borderBottom:"1px solid ".concat(Object(S.d)("medium",.2))}}},chip:{margin:"3px"}}};function al(){al=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ol=Object(s.b)((function(e){return{languages:e.languages}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(nl)((function(e){var t=e.classes,r=c.a.getState(),n=r.languages,o=r.db,i=c.a.getState().functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=s[1],f=a.a.useState(0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(25),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(""),w=Object(h.a)(O,2),j=w[0],E=w[1],k=function(){var e=Object(p.a)(al().mark((function e(t,r,n,a){return al().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?i.emit("language.UPD",{alias:r,locale:n,text:a}):i.emit("data",{module:"language",method:"post",action:"addLocale"},{alias:r,locale:n,text:a});case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}();return o.myTasksMenuExpanded,a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",g+1," ",Object(S.r)("$__of")," ",Math.ceil(Object.keys(n).length/x),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:Object.keys(n).length,page:g,onChangePage:function(e,t){b(t)},rowsPerPage:x,onChangeRowsPerPage:function(e){_(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__cardsPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(tt,{label:Object(S.r)("$__search",1),variant:Object(S.d)("fieldVariant"),value:j,onChange:function(e){E(e.target.value)}}),a.a.createElement(Ee,{text:Object(S.r)("$__showOnlyEmpty","*"),icon:u?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){d(!u)}})),a.a.createElement(Ye.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.r)("alias",1)),a.a.createElement("div",{className:t.column},"Portugues"),a.a.createElement("div",{className:t.column},"Ingles")),a.a.createElement("div",{className:t.body},a.a.createElement("ul",null,n&&Object.keys(n)&&Object.keys(n).length>0&&Object.keys(n).filter((function(e){if((!j||j&&(e.indexOf(j)>-1||n[e]&&n[e].locales&&Object.keys(n[e].locales).filter((function(t){return n[e].locales[t].name.indexOf(j)>-1})).length>0))&&(u&&n[e]&&(!n[e].locales||!n[e].locales["pt-BR"]||!n[e].locales["pt-BR"].name)||!u))return!0})).sort((function(e,t){return e<I.b?-1:e>t?1:0})).map((function(e,r){if(r<=(g+1)*x&&r>=g*x)return a.a.createElement("li",{key:e.trim()},a.a.createElement("div",{className:t.column},e),a.a.createElement("div",{className:t.column},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(wn,{key:"".concat(e,"_pt-BR"),title:n[e].locales&&n[e].locales["pt-BR"]&&n[e].locales["pt-BR"].name&&n[e].locales["pt-BR"].name,editable:!0,_id:n[e].locales&&n[e].locales["pt-BR"]&&n[e].locales["pt-BR"].id&&n[e].locales["pt-BR"].id,onEdit:function(e,t){console.log(e)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0}))),a.a.createElement("div",{className:t.column},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(wn,{key:"".concat(e,"_en-US"),title:n[e].locales&&n[e].locales["en-US"]&&n[e].locales["en-US"].name&&n[e].locales["en-US"].name,editable:!0,_id:n[e].locales&&n[e].locales["en-US"]&&n[e].locales["en-US"].id&&n[e].locales["en-US"].id,onEdit:function(t,r){k(r,e,"en-US",t)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0}))))}))))))}))),il=function(e){Object(A.a)(r,e);var t=Object(P.a)(r);function r(e){var n;return Object(N.a)(this,r),(n=t.call(this,e)).change=function(e){n.setState({input:Object(S.e)(e.target.value)})},n.state={input:""},n.start=0,n}return Object(D.a)(r,[{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement("input",Object.assign({type:"text",onBlur:this.blur,onChange:this.change,value:this.state.input,style:{fontSize:"22px",padding:"4px"}},this.props)),a.a.createElement("pre",{style:{color:"#999",height:"30px"}},Object(S.h)(this.state.input)))}}]),r}(a.a.Component);var cl=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(nl)((function(e){e.classes;var t=c.a.getState(),r=!!(t.languages,t.db).myTasksMenuExpanded;return a.a.createElement("div",{style:r?{width:"calc(100% - 400x)",marginLeft:"388px"}:{width:"calc(100% - 138px)",marginLeft:"138px"}},a.a.createElement(il,null))}))),ll=["children","value","index"];function sl(e){var t=e.children,r=e.value,n=e.index,o=Object(G.a)(e,ll);return a.a.createElement("div",Object.assign({role:"tabpanel",hidden:r!==n,id:"scrollable-strength-tabpanel-".concat(n),"aria-labelledby":"scrollable-strength-tab-".concat(n)},o),r===n&&a.a.createElement(Xc.a,{p:3},t))}function ul(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var dl=Object(z.a)((function(e){return{root:{flexGrow:1,width:"100%",backgroundColor:e.palette.background.paper}}}));var pl=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))((function(e){dl();var t=c.a.getState().db,r=a.a.useState(0),n=Object(h.a)(r,2),o=n[0],l=n[1],s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],p=u[1],f=a.a.useState(""),m=Object(h.a)(f,2),g=m[0],b=m[1];a.a.useEffect((function(){if(!d){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),String(e[0])&&l(Math.ceil(e[0])),p(!0)}}));var v=function(e){c.a.getState().functions.socket.emit("global",{fn:e})};return t.myTasksMenuExpanded,a.a.createElement("div",null,a.a.createElement(B.a,{position:"static",color:"default"},a.a.createElement(Jc.a,{value:o,onChange:function(e,t){l(t),i.a.push("#".concat(t))},variant:"scrollable",scrollButtons:"on",indicatorColor:"primary",textColor:"primary","aria-label":""},a.a.createElement(Kc.a,Object.assign({label:"Data",icon:a.a.createElement(ae.a,{color:(Object(S.d)(0===o?"medium":"color"),1)},"Data")},ul(0))),a.a.createElement(Kc.a,Object.assign({label:"Languages",icon:a.a.createElement(ae.a,{color:(Object(S.d)(1===o?"medium":"color"),1)},"translate")},ul(1))),a.a.createElement(Kc.a,Object.assign({label:"Versions",icon:a.a.createElement(ae.a,{color:(Object(S.d)(2===o?"medium":"color"),1)},"app_registration")},ul(2))))),a.a.createElement(sl,{value:o,index:0},a.a.createElement("div",null,a.a.createElement(cl,null))),a.a.createElement(sl,{value:o,index:1},a.a.createElement("div",null,a.a.createElement(ol,null))),a.a.createElement(sl,{value:o,index:2},a.a.createElement("div",null,a.a.createElement("input",{type:"text",value:g,onChange:function(e){b(e.target.value)}}),a.a.createElement(po,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){v("version")}},Object(S.r)("$__send","*")),a.a.createElement(po,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){v("logout")}},Object(S.r)("$__logout","*")),a.a.createElement(po,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){v("reload")}},Object(S.r)("$__reload","*")))),a.a.createElement(sl,{value:o,index:3},a.a.createElement("div",null,a.a.createElement(tl,null))),a.a.createElement(sl,{value:o,index:4},Object(S.r)("$__accounts",1)),a.a.createElement(sl,{value:o,index:5},Object(S.r)("$__users",1)),a.a.createElement(sl,{value:o,index:6},Object(S.r)("$__support",1)),a.a.createElement(sl,{value:o,index:7},Object(S.r)("$__finance",1)))}));var fl=Object(s.b)((function(e){return{loaders:e.sessionLoads.cards.load}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Bo)((function(e){return a.a.createElement(a.a.Fragment,null,e.loaders&&Object.keys(e.loaders).length>0&&Object.keys(e.loaders).filter((function(t){return"loading"===e.loaders[t]})).length>0&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.r)("$__loadingData")),a.a.createElement(Or,null)))}))),hl=function(){return Object(d.a)(Object(d.a)({},Na),{},{appBar:{boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"fixed",width:"100%",zIndex:"100",color:"#FFFFFF",border:"0",minHeight:"0px",display:"flex",height:"50px",justifyContent:"center",userSelect:"none"},container:{},separator:{position:"absolute",left:"0px",right:"0px",bottom:"-2px",height:"2px",backgroundColor:Object(S.d)("line")},search:{position:"absolute",left:"62px",right:"0px",bottom:"-35px",height:"33px",boxShadow:"0 3px 3px rgba(0,0,0,0.33)",display:"block",padding:"0 15px",zIndex:1,backgroundColor:Object(S.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},searchMobile:{position:"absolute",left:"0px",right:"0px",paddingLeft:"15px",bottom:"-35px",height:"33px",boxShadow:"0 3px 3px rgba(0,0,0,0.33)",display:"block",padding:"0 15px",backgroundColor:Object(S.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},flex:{flex:1},title:Object(d.a)(Object(d.a)({},W.l),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:"inherit",paddingTop:"0.625rem",paddingBottom:"0.625rem",margin:"0 !important",letterSpacing:"unset","&:hover,&:focus":{background:"transparent"}}),logo:{position:"fixed",padding:"7px 0px",margin:"0",display:"flex",zIndex:"4",alignItems:"center",justifyContent:"center"},logoMini:{transition:"all 300ms linear",opacity:1,textAlign:"center",width:"40px",maxHeight:"40px",marginLeft:"10px",marginRight:"8px",color:"inherit"},logoImg:{width:"100%"},logoNormal:Object(d.a)(Object(d.a)({},W.l),{},{margin:"auto",transition:"all 300ms linear",opacity:"1",transform:"translate3d(0px, 0, 0)",textTransform:"uppercase",fontSize:"18px",whiteSpace:"nowrap",fontWeight:"400",overflow:"hidden",color:"".concat(Object(S.d)("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:Object(S.d)("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:Object(S.d)("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:Object(S.d)("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})},ml=r(238),gl=Object(z.a)(hl);var bl=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=gl(),r=c.a.getState(),n=r.session,o=r.search,i=r.db,l=a.a.useState(!1),s=Object(h.a)(l,2),u=(s[0],s[1],Object(S.j)(),[]),d=window.location.hash.split("/");d[0]=d[0].replace("#",""),36!==d[0].length&&(d[0]=null);var p=window.location.pathname.split("/"),f="/".concat(p[1]),m=1;if(d[0]){var g=i.cards[d[0]]||{};(m=g&&g._users&&Object.keys(g._users).length>0?g._users[Object.keys(g._users).find((function(e){return e.indexOf(n._id)>-1}))]:0)&&m.access&&(m=m.access)}return d[1]&&Fp.filter((function(e){return e.path===f})).length>0&&Fp.filter((function(e){return e.path===f}))[0].tabs&&Fp.filter((function(e){return e.path===f}))[0].tabs.length>0?(Fp.filter((function(e){return e.path===f}))[0].tabs&&Fp.filter((function(e){return e.path===f}))[0].tabs).map((function(e){e.path===d[1]&&(u=e.searchFields)})):Fp.filter((function(e){return e.path===f})).length>0&&Fp.filter((function(e){return e.path===f}))[0].searchFields&&(u=Fp.filter((function(e){return e.path===f}))[0].searchFields),JSON.stringify(ml.a)===JSON.stringify(o)?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{}},a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:9,md:9,lg:9,xl:9},a.a.createElement("span",{style:{color:Object(S.d)("medium"),fontWeight:"bold",fontSize:"18px",display:"flex",alignItems:"center"}},a.a.createElement(ae.a,{size:"18px"},"search"),Object(S.r)("$__appliedFilters"))),a.a.createElement(fn,{xs:12,sm:3,md:3,lg:3,xl:3},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(Ee,{reverse:!0,icon:"clear_all",text:Object(S.r)("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),u&&u.indexOf("text")>-1&&o.text&&a.a.createElement(fn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{className:t.textField,style:{width:"100%"}},Object(S.r)("$__text"),": ",o.text)),u&&u.indexOf("status")>-1&&JSON.stringify(o.cards.status)!==JSON.stringify(ml.a.cards.status)&&a.a.createElement(fn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__status")),Object.keys(o.cards.status).map((function(e,t){if(o.cards.status[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(i.status.filter((function(t){return t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:i.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),u&&u.indexOf("priority")>-1&&JSON.stringify(o.cards.priority)!==JSON.stringify(ml.a.cards.priority)&&a.a.createElement(fn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__priority")),Object.keys(o.cards.priority).map((function(e,t){if(o.cards.priority[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(i.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:i.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))})))),u&&u.indexOf("users")>-1&&JSON.stringify(o.users)!==JSON.stringify(ml.a.users)&&a.a.createElement(fn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.r)("$__users"),a.a.createElement(ct.a,{max:6},Object.keys(c.a.getState().search.users.selected).length>0&&Object.keys(c.a.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&c.a.getState().search.users.selected[e]?a.a.createElement(Ge.a,{title:i.users[e].name,key:t},a.a.createElement(Se.a,{style:{width:"30px",height:"30px"},alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1))):"unassigned"===e&&c.a.getState().search.users.selected[e]&&a.a.createElement(Ge.a,{title:Object(S.r)("$__unassigned",1),key:t},a.a.createElement(Se.a,{style:{width:"30px",height:"30px"},alt:Object(S.r)("$__unassigned",1),src:Le.a},Object(S.r)("$__unassigned",1)))}))))),u&&u.indexOf("units")>-1&&JSON.stringify(o.units)!==JSON.stringify(ml.a.units)&&Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type})).length>0&&u.indexOf("units")>-1&&a.a.createElement(fn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.r)("$__units"),a.a.createElement(ct.a,{max:6},Object.keys(c.a.getState().search.units.selected).length>0&&Object.keys(c.a.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&c.a.getState().search.units.selected[e]?a.a.createElement(Ge.a,{title:i.users[e].name,key:t},a.a.createElement(Se.a,{style:{width:"30px",height:"30px"},alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1))):"unassigned"===e&&c.a.getState().search.units.selected[e]&&a.a.createElement(Ge.a,{title:Object(S.r)("$__unassigned",1),key:t},a.a.createElement(Se.a,{style:{width:"30px",height:"30px"},alt:Object(S.r)("$__unassigned",1),src:Le.a},Object(S.r)("$__unassigned",1)))}))))),c.a.getState().search.plans&&c.a.getState().search.plans.selected&&Object.keys(c.a.getState().search.plans.selected).length>0&&Object.keys(i.cards).filter((function(e){return"plan"===i.cards[e].type})).length>0&&u&&u.indexOf("plans")>-1&&a.a.createElement(fn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.r)("$__plans"),a.a.createElement(ct.a,{max:6},Object.keys(c.a.getState().search.plans.selected).length>0&&Object.keys(c.a.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&c.a.getState().search.plans.selected[e]?a.a.createElement(Ge.a,{title:i.cards[e].name,key:t},a.a.createElement(Se.a,{style:{width:"30px",height:"30px"},alt:i.cards[e].name,src:i.cards[e].image||null},i.cards[e].name.substr(0,1))):"unassigned"===e&&c.a.getState().search.plans.selected[e]&&a.a.createElement(Ge.a,{title:Object(S.r)("$__unassigned",1),key:t},a.a.createElement(Se.a,{style:{width:"30px",height:"30px"},alt:Object(S.r)("$__unassigned",1),src:Le.a},Object(S.r)("$__unassigned",1)))}))))),a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12})))})),vl=function(e){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}};function yl(){yl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var xl=Object(s.b)((function(e,t){return{cards:e.db.cards,search:e.search}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(vl)((function(e){var t=c.a.getState(),r=t.db,n=t.search,o=(t.session,a.a.useState(0)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(21),f=Object(h.a)(u,2),m=f[0],g=(f[1],a.a.useState(!1)),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1];a.a.useEffect((function(){return j(l,m),function(){}}),[]),a.a.useEffect((function(){v||O||j(l,m)}),[l,m]);var j=function(){var t=Object(p.a)(yl().mark((function t(r,n){var a;return yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),t.next=3,Object(Ke.b)(e,{cardLoad:"insights",limit:n,skip:r*n,ignoreLoader:!0});case 3:(a=t.sent)&&(y(!1),a.total<n&&w(!0));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),E=window.location.hash.split("/");E[0]=E[0].replace("#","");var S={};return S=(S=Object.keys(r.cards).filter((function(e){return"insight"===r.cards[e].type&&!r.cards[e].deleted&&It(e)})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),n.tags.length>0&&(S=S.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),a.a.createElement("div",{id:"insightList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){!function(e){var t=document.getElementById("insightList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&s(l+1)}()}},a.a.createElement(un,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(S).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(fn,{key:S[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dn,{db:"cards",data:S[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))))}))),_l=function(e){return{feed:{backgroundColor:"rgba(255,255,255,1)",margin:"auto",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",width:"-webkit-fill-available",marginBottom:"15px",borderTopRightRadius:22},infos:{padding:"7px",cursor:"pointer"},feedRotate:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",backgroundColor:"rgba(255,255,255,1)",padding:"7px 7px 20px 7px",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",placeSelf:"flex-end",cursor:"pointer"},image:{width:"100%",paddingTop:"calc((9 / 16) * 100%)",backgroundPosition:"center",backgroundRepeat:"no-repeat"},linkTitle:{marginTop:"7px",width:"100%",height:"auto",fontWeight:"bold",minHeight:"65px"},linkContent:{width:"100%",marginTop:"7px",height:"87px",textOverflow:"ellipsis",overflow:"hidden"},feedFooter:{marginTop:"7px",width:"100%",textAlign:"right",justifyContent:"space-between",borderTop:"1px solid rgba(0,0,0,0.05)",paddingTop:"3px",display:"flex",marginBottom:"7px"},feedDate:{position:"relative",left:"0px",fontSize:"12px",float:"left"},feedLink:{position:"relative",left:"0px",fontSize:"12px",float:"right",display:"flex"}}};var Ol=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(_l)((function(e){e.data;var t=e.classes;return a.a.createElement("div",{className:t.feed},a.a.createElement(nn.a,{variant:"rect",animation:"wave",style:{borderRadius:0,paddingTop:"calc((9 / 16) * 100%)",width:"100%",borderTopRightRadius:22}}),a.a.createElement("div",{className:t.infos},a.a.createElement("div",{className:t.linkTitle},a.a.createElement(nn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(nn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(nn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),a.a.createElement("div",{className:t.linkContent},a.a.createElement(nn.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(nn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(nn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(nn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}})),a.a.createElement("div",{className:t.feedFooter},a.a.createElement("div",{className:t.feedDate,style:{width:"50%",height:"20px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"100%",height:"8px"}},a.a.createElement(nn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function wl(){wl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var jl=Object(s.b)((function(e,t){return{cards:e.db.cards,search:e.search}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.search,o=(t.session,a.a.useState(0)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(18),f=Object(h.a)(u,2),m=f[0],g=(f[1],a.a.useState(!1)),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(0),E=Object(h.a)(j,2),S=(E[0],E[1]);a.a.useEffect((function(){return k(l,m),function(){}}),[]),a.a.useEffect((function(){v||O||k(l,m)}),[l,m]);var k=function(){var t=Object(p.a)(wl().mark((function t(r,n){var a;return wl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),t.next=3,Object(Ke.b)(e,{cardLoad:"links",limit:n,skip:r*n,ignoreLoader:!0});case 3:(a=t.sent)&&(y(!1),S(parseInt(a.total)),a.total<n&&w(!0));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),L=window.location.hash.split("/");L[0]=L[0].replace("#","");var C={};C=(C=Object.keys(r.cards).filter((function(e){return"link"===r.cards[e].type&&r.cards[e]._users&&It(e)&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),n.tags.length>0&&(C=C.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var I=function(){for(var e=[],t=0;t<m;t++)e.push(a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(Ol,null)));return a.a.createElement(a.a.Fragment,null,e)};return a.a.createElement("div",{id:"linkList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){!function(e){var t=document.getElementById("linkList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&s(l+1)}()}},a.a.createElement(un,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement("div",null),Object.keys(C).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(fn,{key:C[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dn,{db:"cards",data:C[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))})),v?a.a.createElement(I,null):a.a.createElement(a.a.Fragment,null)))})),El=r(1024),Sl=r.n(El),kl=r(737),Ll=r.n(kl),Cl=r(738),Il=r.n(Cl),Tl=r(121);var Fl=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(_l)((function(e){var t=e.data,r=e.classes,n=a.a.useState(t.img),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState({backgroundSize:"contain"}),u=Object(h.a)(s,2),p=u[0],f=u[1],m=a.a.useRef({});return a.a.useEffect((function(){if(m.current&&e.onResize){var t=new ResizeObserver((function(){var t=m.current.clientHeight;e.onResize(t)}));return t.observe(m.current),function(){return t.disconnect()}}}),[]),a.a.createElement("div",{className:r.feed,ref:m,onClick:e.clickChannel?function(){return e.clickChannel()}:null,style:Object(d.a)(Object(d.a)({},e.clickChannel?{cursor:"pointer"}:{}),{},{position:"relative"})},a.a.createElement("div",{style:{display:"none"}},a.a.createElement("img",{src:i,onError:function(){l(null)},onLoad:function(e){var t=e.target;t&&t.width&&t.height&&(t.width>t.height&&t.width/t.height>1.75?f({backgroundSize:"contain"}):f({backgroundSize:"cover"}))}})),a.a.createElement("div",{className:r.image,style:Object(d.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},i?Object(d.a)({backgroundImage:'url("'.concat(i,'")')},p):{background:Object(S.d)("AvatarBackground")}),onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},!i&&a.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(ae.a,{icon:Hr.a,size:"39px",color:Object(S.d)("textColor")})),!e.clickChannel&&a.a.createElement("div",{style:{position:"absolute",top:7,right:7}},a.a.createElement(E.a,{title:Object(S.r)("$__sendToRadar","*"),color:Object(S.d)("menu"),icon:"settings_input_antenna",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:t.title,description:t.contentSnippet,pubDate:t.isoDate?t.isoDate:t.pubDate,image:t.img,url:t.link}}))},size:"25px"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.5)",padding:"3px 7px",color:"white",fontSize:11}},_()(t.isoDate?t.isoDate:t.pubDate).format("DD/MM/YYYY HH:MM"))),a.a.createElement(Tl.a,{title:a.a.createElement(a.a.Fragment,null,!e.clickChannel&&a.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Object(S.r)("$__clickHereToReadNews",1)))},a.a.createElement("div",{className:r.infos,onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},a.a.createElement("div",{className:r.linkTitle},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t&&t.title&&Il()(t.title)?t.title:t.title?Ll()(t.title):""}})),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.contentSnippet&&Il()(t.contentSnippet)?t.contentSnippet:t.contentSnippet?Ll()(t.contentSnippet):""},className:r.linkContent}),a.a.createElement("div",{className:r.feedFooter},a.a.createElement("div",{className:r.feedLink},!e.clickChannel&&a.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Object(S.r)("$__readMore",1)))))),a.a.createElement("div",{style:{top:-30}},a.a.createElement(Fe.a,{options:e._tags})))})));var Nl=Object(de.a)(_l)((function(e){var t=e.data,r=e.classes;return a.a.createElement("div",{className:r.feed,onClick:e.clickChannel?function(){return e.clickChannel()}:null},a.a.createElement("div",{className:r.image,style:{background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{marginTop:"calc(-48% + 0px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(ae.a,{icon:Hr.a,size:"47px",color:"rgba(250,250,250,0.77)"}))),a.a.createElement("div",{className:r.infos},a.a.createElement("div",{className:r.linkTitle},Object(S.r)("$__attention")),a.a.createElement("div",{className:r.linkContent},Object(S.r)("$__weHaveNotFoundYetLink")),a.a.createElement("div",{className:r.feedFooter},a.a.createElement("div",{className:r.feedDate},_()(t.created_at&&t.created_at.low?t.created_at.low:t.created_at).format("DD/MM/YYYY HH:MM")))))}));function Dl(){Dl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Al=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(_l)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=e.data,l=Object(S.j)(),s=window.location.hash.split("/");if(s[0]=s[0].replace("#",""),!o)return null;var u=function(){var t=Object(p.a)(Dl().mark((function t(a){var i,l;return Dl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s[0]&&36===s[0].length?o._parent[s[0]].idRel:o._parent[n.account].idRel,o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return c.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel&&(i=o._parent[Object.keys(o._parent)[0]].idRel),t.next=4,ut.a.put("/rel/update",{_id:i,customTitle:a});case 4:t.sent,l=c.a.getState().db.feeds,o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return c.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel?l[o._id]=Object(d.a)(Object(d.a)({},l[o._id]),{},{_parent:Object(d.a)(Object(d.a)({},l[o._id]._parent),{},Object(f.a)({},Object.keys(o._parent)[0],Object(d.a)(Object(d.a)({},l[o._id]._parent[Object.keys(o._parent)[0]]),{},{customTitle:a})))}):l[o._id]=Object(d.a)(Object(d.a)({},l[o._id]),{},{_parent:Object(d.a)(Object(d.a)({},l[o._id]._parent),{},Object(f.a)({},s[0],Object(d.a)(Object(d.a)({},l[o._id]._parent[s[0]]),{},{customTitle:a})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{feeds:l})),e.onChange&&e.onChange();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=function(){var e=Object(p.a)(Dl().mark((function e(t){return Dl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){m(t)}});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var t=Object(p.a)(Dl().mark((function t(n){var a,i;return Dl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n||s[0],t.next=3,ut.a.delete("feed/unfollow/".concat(a,"__").concat(o._id));case 3:t.sent,(i=Object(d.a)({},c.a.getState().db.feeds))[o._id]&&i[o._id]._parent&&i[o._id]._parent[a]&&delete i[o._id]._parent[a],n&&i[o._id]&&delete i[o._id],e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{feeds:Object(d.a)({},i)})),e.onChange&&setTimeout((function(){e.onChange()}),400);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=Object(p.a)(Dl().mark((function t(n){var a,i=arguments;return Dl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.length>1&&void 0!==i[1]&&i[1],t.next=3,ut.a.put("feed/visible/",{feedId:o._id,visible:!o||!o.hide});case 3:t.sent,a=o,a=Object(d.a)(Object(d.a)({},a),{},{hide:!o||!o.hide}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{feeds:Object(d.a)(Object(d.a)({},r.feeds),{},Object(f.a)({},o._id,Object(d.a)(Object(d.a)({},r.feeds[o._id]),a)))}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o._parent&&Object.keys(o._parent).map((function(e){s[0]&&36===s[0].length&&s[0]===e?o.customTitle=o._parent[e].customTitle:Object.keys(o._parent).length>0&&(o.customTitle=o._parent[Object.keys(o._parent)[0]].customTitle)})),a.a.createElement("div",{style:{position:"relative",height:"auto",cursor:"pointer",width:"100%"}},a.a.createElement(at,Object.assign({title:o.customTitle?o.customTitle:o.name,icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return u(e)},color:Object(S.d)("color"),editable:!!(s[0]&&36===s[0].length&&l&&l.plan&&(l.planAdmin||l.planModerate)||o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return c.a.getState().db.cards[e]})).length),moreButton:!0},s[0]&&"tab"===s[0]&&l&&l.plan&&(l.planAdmin||l.planModerate)?Object(d.a)({},o._parent&&Object.keys(o._parent).length>0&&{options:[{name:o.hide?Object(S.r)("$__folowRSS"):Object(S.r)("$__hideRSS"),icon:o.hide?"visibility":"visibility_off",onClick:function(){g()}}].concat(Object(Ne.a)(l&&l.feed&&(l.feedAdmin||l.feedModerate)?[{name:Object(S.r)("$__edit"),icon:"settings_suggest",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"feeds",id:o._id,module:"feedEdit",activeModule:"feedEdit",data:Object(d.a)(Object(d.a)({},o),{},{_lock:!0,_admin:!!e.admin})}))}}]:[]),Object(Ne.a)(function(){if(e.data._parent){var t=[];return Object.keys(e.data._parent).map((function(o){if(c.a.getState().db.cards[o]&&c.a.getState().db.cards[o]._users&&c.a.getState().db.cards[o]._users[n._id]){var l=c.a.getState().db.cards[o];t=[].concat(Object(Ne.a)(t),[{name:l.name,icon:"view_comfy",render:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex",color:Object(S.d)("color")}},a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(Oe.a,{overlap:"rectangular",icon:l.type&&r&&r.dataType?r.dataType.filter((function(e){return e.name===l.type}))[0].icon:"topic",title:"$__".concat(l.type),size:"22px",color:Object(S.d)("menu")})),a.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},l.name))),onClick:function(){i.a.push("sp#".concat(o,"/bright-and-connected"))}}])}else 1===Object.keys(e.data._parent).length&&(t=[].concat(Object(Ne.a)(t),[{name:Object(S.r)("$__globalAccount"),icon:"rss_feed",render:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex"}},a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(Oe.a,{overlap:"rectangular",icon:"rss_feed",title:Object(S.r)("$__globalAccount"),size:"22px",color:Object(S.d)("menu")})),a.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},Object(S.r)("$__globalAccount}")),a.a.createElement("div",{style:{width:"16px"}},a.a.createElement(Oe.a,{overlap:"rectangular",icon:"delete_forever",title:Object(S.r)("$__delete"),size:"22px",color:"red",onClick:function(){h(o)}})))),onClick:function(){h(o)}}]))})),t}}()))}):l&&l.plan&&(l.planAdmin||l.planModerate)?{options:[{name:Object(S.r)("$__deleteRSS"),icon:"delete_forever",onClick:function(){h()}}]}:{})),a.a.createElement("div",{style:{padding:"0",display:"flex",marginBottom:"15px",flexFlow:"wrap",marginTop:"15px"}},o.feed&&Object.keys(o.feed).length>0?Object.keys(o.feed).sort((function(e,t){return o.feed[e].isoDate&&o.feed[t].isoDate&&o.feed[e].isoDate<o.feed[t].isoDate?1:-1})).map((function(e,t){var r=o.feed[e],n=Sl.a.MD5(r.link);if(o&&0===t)return a.a.createElement(Fl,{key:n,data:r,_tags:o._tags,clickChannel:function(){i.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})})):a.a.createElement(Nl,{data:o,clickChannel:function(){i.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})))})));function Pl(){Pl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var $l=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.data,r=c.a.getState().db,n=a.a.useState(0),o=Object(h.a)(n,2),i=o[0],l=(o[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(window.location.hash.split("/")),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState([]),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(0),E=Object(h.a)(j,2),k=(E[0],E[1]),L=a.a.useState(!0),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(!1),N=Object(h.a)(F,2),D=N[0],A=N[1],P=a.a.useRef({});a.a.useEffect((function(){P.current={loading:!1};var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),JSON.stringify(t)!==JSON.stringify(v)&&y(t),T(!0),e.max&&k(e.max),function(){}}),[]),a.a.useEffect((function(){v.length>0&&!D&&($(),v[2]&&36!==v[2].length&&T(!0),A(!0))}),[v]),a.a.useEffect((function(){!u>Object.keys(O).length&&(T(!0),$())}),[i]),a.a.useEffect((function(){T(!1)}),[O]);var $=function(){var e=Object(p.a)(Pl().mark((function e(){var t,r;return Pl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u||P.current.loading){e.next=10;break}return P.current={loading:!0},T(!0),e.next=5,dt.a.post("/Feed_Links_V2",{ids:v[2]&&v[2].length?v[2]:null,skip:Object.keys(O).length,limit:21});case 5:t=e.sent,r=Array.from(O),t&&t.data&&(t.data.map((function(e){0===r.filter((function(t){return t.link===e.link})).length&&r.push(e)})),w(r)),t.data&&0===t.data.length&&m(!0),P.current={loading:!1};case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var n=Object(p.a)(Pl().mark((function n(a){var o;return Pl().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:ut.a.put("/rel/update",{_id:t.idRel,customTitle:a}),(o=r.cards[v[0].replace("#","")]._feeds)[t._id]=Object(d.a)(Object(d.a)({},o[t._id]),{},{customTitle:a}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{cards:Object(d.a)(Object(d.a)({},r.cards),{},Object(f.a)({},v[0].replace("#",""),Object(d.a)(Object(d.a)({},r.cards[v[0].replace("#","")]),{},{_feeds:o})))}));case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),M=function(){var n=Object(p.a)(Pl().mark((function n(a){var o,i;return Pl().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:window.history.back(),o=a.replace("#",""),ut.a.delete("feed/unfollow/".concat(o,"__").concat(t._id)),delete(i=r.cards[o]._feeds)[t._id],e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{cards:Object(d.a)(Object(d.a)({},r.cards),{},Object(f.a)({},o,Object(d.a)(Object(d.a)({},r.cards[o]),{},{_feeds:i})))}));case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),B=function(){for(var e=[],t=0;t<21;t++)e.push(a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(Ol,null)));return a.a.createElement(a.a.Fragment,null,e)};return a.a.createElement("div",null,t&&(t.customTitle||t.name)&&a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:33}},a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",marginBottom:"15px",display:"flex"}},a.a.createElement(Ee,{icon:"undo",text:Object(S.r)("$__back","*"),onClick:function(){return window.history.back()}}),v[0]&&"bright-and-connected"===v[1]&&v[2]&&a.a.createElement(Ee,{icon:"delete_sweep",text:Object(S.r)("$__removeChannel","*"),onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(v[0])}})}})),a.a.createElement(wn,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return z(e)},editable:!0})),a.a.createElement("div",{style:Object(d.a)(Object(d.a)({},e.horizontal?{position:"relative",width:"100%"}:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0}),{},{padding:"0px 15px",overflow:"auto"}),id:"linkList",onScroll:function(t){!function(t){var r=document.getElementById("linkList");!I&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&$()}()}},a.a.createElement(un,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},O.filter((function(t,r){return!e.max||e.max&&r<e.max})).sort((function(e,t){return e.isoDate&&t.isoDate&&e.isoDate<t.isoDate?1:e.isoDate&&t.isoDate&&e.isoDate>t.isoDate?-1:0})).map((function(e){return a.a.createElement(fn,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Fl,{db:"cards",data:e}))})),!u&&I?a.a.createElement(B,null):a.a.createElement(a.a.Fragment,null))))})),zl=function(e){return{}};function Ml(){Ml=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Bl=Object(s.b)((function(e){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(zl)((function(e){var t,r=c.a.getState(),n=r.search,o=r.session,i=a.a.useState(!0),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState({}),g=Object(h.a)(m,2),b=g[0],v=g[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),a.a.useEffect((function(){_()}),[e.store.feeds]),a.a.useEffect((function(){x()}),[]);var x=function(){var t=Object(p.a)(Ml().mark((function t(){return Ml().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u(!0),"hideFeeds"!==y[1]){t.next=8;break}return t.next=4,sc(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 4:t.sent&&_(),t.next=16;break;case 8:if(0!==Object.keys(c.a.getState().db.feeds).filter((function(e){return!c.a.getState().db.feeds[e].hide})).length){t.next=15;break}return t.next=11,sc(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}));case 11:t.sent&&_(),t.next=16;break;case 15:_();case 16:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=function(){var e={};Object.keys(c.a.getState().db.feeds).length>0&&(e=Object(d.a)(Object(d.a)({},e),c.a.getState().db.feeds));var t={};Object.keys(e).filter((function(t){return e[t]&&e[t].name&&e[t].name.toLowerCase().indexOf(n.text.toLowerCase())>-1||e[t].customTitle&&e[t].customTitle.toLowerCase().indexOf(n.text.toLowerCase())>-1||e[t].customDescription&&e[t].customDescription.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(r){(Object.keys(n.plans.selected).length>0&&Object.keys(n.plans.selected).map((function(t){return n.plans.selected[t]&&e[r]._parent[t]})).length>0||0===Object.keys(n.plans.selected).length)&&(t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},r,e[r])))})),v(t),u(!1)};return s?a.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},a.a.createElement(Or,null)):y[2]&&36===y[2].length?a.a.createElement("div",null,a.a.createElement($l,{follow:!0})):a.a.createElement("div",{style:(t={width:"100%"},Object(f.a)(t,"width","calc(100% - 20px)"),Object(f.a)(t,"position","relative"),Object(f.a)(t,"display","flex"),t)},a.a.createElement(un,null,b&&Object.keys(b).length>0&&Object.keys(b).filter((function(t){if(36===y[0].length&&c.a.getState().db.cards[y[0]]&&b[t]._parent&&Object.keys(b[t]._parent).length>0&&b[t]._parent[y[0]])return!0;if("tab"===y[0]){var r=!1;if(b[t].hide&&(r=!0),!e.showHidden&&!r)return!0;if(e.showHidden&&r)return!0}})).sort((function(e,t){var r=b[e].customTitle?b[e].customTitle.toLowerCase().trim():b[e].name.toLowerCase().trim(),n=b[t].customTitle?b[t].customTitle.toLowerCase().trim():b[t].name.toLowerCase().trim();return y[0]&&36!==y[0].length&&(o&&o.account&&b[e]._parent&&b[e]._parent[o.account]&&b[e]._parent[o.account].customTitle&&(r=b[e]._parent[o.account].customTitle.toLowerCase().trim()),o&&o.account&&b[t]._parent&&b[t]._parent[o.account]&&b[t]._parent[o.account].customTitle&&(n=b[t]._parent[o.account].customTitle.toLowerCase().trim())),r<n?-1:r>n?1:0})).map((function(e,t){var r=b[e];return a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},a.a.createElement(Al,{data:r,follow:!0,onChange:function(){_()}}))}))))}))),Yl={control:{backgroundColor:"#fff",fontSize:14,fontFamily:"Roboto",fontWeight:"normal",lineHeight:"17px"},"&multiLine":{control:{fontFamily:"Roboto"},highlighter:{padding:9,border:"1px solid transparent",boxSizing:"border-box",overflow:"hidden",maxHeight:150},input:{padding:9,border:"1px solid silver",overflow:"auto",maxHeight:150,borderColor:"transparent"}},"&singleLine":{display:"inline-block",width:180,lineHeight:"17px",highlighter:{lineHeight:"17px",padding:1,border:"2px inset transparent"},input:Object(f.a)({border:"none",lineHeight:"17px",padding:1},"border","2px inset")},suggestions:{position:"absolute",bottom:"100%",top:"none",left:"33px",maxHeight:"217px !important",overflow:"auto !important",list:{position:"absolute",width:"300px",backgroundColor:"white",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"7px 7px",boxShadow:"0 0 3px 5px rgba(0,0,0,0.09)",fontSize:14,maxHeight:"217px",overflow:"auto"},item:{padding:"5px 15px",borderBottom:"1px solid rgba(0,0,0,0.15)","&focused":{backgroundColor:Object(S.d)("color")}}}},Rl=function(e){var t,r,n;return{root:{position:"absolute",top:0,left:0,right:0,bottom:0},rootRelative:{position:"relative",top:0,left:0,right:0,bottom:0},content:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:0,position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",width:"100%","& .file-drop-target":{width:"100%",display:"flex",position:"absolute",bottom:0,left:0,right:0,height:"auto"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",padding:0,width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:(t={},Object(f.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(f.a)(t,"color",W.O),Object(f.a)(t,"width","30px"),Object(f.a)(t,"height","30px"),Object(f.a)(t,"lineHeight","25px"),Object(f.a)(t,"fontSize","12px"),Object(f.a)(t,"textAlign","center"),Object(f.a)(t,"position","absolute"),Object(f.a)(t,"bottom","23px"),Object(f.a)(t,"left","50%"),Object(f.a)(t,"marginLeft","-24px"),Object(f.a)(t,"zIndex","1"),Object(f.a)(t,"borderTopRightRadius","50%"),Object(f.a)(t,"borderTopLeftRadius","50%"),Object(f.a)(t,"borderBottomRightRadius","50%"),Object(f.a)(t,"borderBottomLeftRadius","50%"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.b)+", 0.4)"},info:{backgroundColor:W.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.u[0])+", 0.4)"},success:{backgroundColor:W.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.G[0])+", 0.4)"},danger:{backgroundColor:W.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.j[0])+", 0.4)"},warning:{backgroundColor:W.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.N[0])+", 0.4)"},primary:{backgroundColor:W.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(f.a)(r,e.breakpoints.down("sm"),{float:"right !important",width:"calc(100% - 60px) !important","&:before":{borderLeftWidth:"0 !important",borderRightWidth:"15px !important",left:"-20px !important",right:"auto !important"},"&:after":{borderLeftWidth:"0 !important",borderRightWidth:"14px !important",left:"-19px !important",right:"auto !important"}}),Object(f.a)(r,"width","45%"),Object(f.a)(r,"float","left"),Object(f.a)(r,"padding","7px"),Object(f.a)(r,"marginBottom","5px"),Object(f.a)(r,"position","relative"),Object(f.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)"),Object(f.a)(r,"borderRadius","6px"),Object(f.a)(r,"color","rgba("+Object(W.r)(W.b)+", 0.87)"),Object(f.a)(r,"background",W.O),Object(f.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+W.q[10],borderRight:"0 solid "+W.q[10],borderBottom:"15px solid transparent",content:'" "'}),Object(f.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+W.O,borderRight:"0 solid "+W.O,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(f.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:W.O,"&:before":{borderLeftWidth:0,borderRightWidth:"15px",left:"-15px",right:"auto"},"&:after":{borderLeftWidth:0,borderRightWidth:"14px",left:"-14px",right:"auto"}}),timelineHeading:{marginBottom:0},timelineBody:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(f.a)({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:"5",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)"},"zIndex",11),editor:{position:"absolute",bottom:0,height:"auto",width:"calc(100% - 0px)"},editorRelative:{position:"relative",bottom:0,minHeight:"50px",height:"auto",width:"calc(100% - 0px)",zIndex:10},files:{display:"inline-table",position:"relative",backgroundColor:"rgba(250,250,250,0.9)",width:"100%"},textEditor:{},textEditorIcon:{cursor:"pointer",color:Object(S.d)("color")},progressBar:{backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"20px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"absolute",width:"100%",top:"-90px",maxHeight:"120px",background:"linear-gradient(60deg, rgba(250,250,250,1), rgba(250,250,250,0.9))",padding:"7px",display:"flex",overflow:"auto",alignItems:"center","& img":{maxWidth:"20%",height:"auto",position:"relative",float:"left",marginTop:0,marginRight:"7px"},"& .data":{position:"relative",float:"left",width:"75%","& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},mentionInput:Object(d.a)(Object(d.a)({},W.l),{},{"& textarea":Object(d.a)(Object(d.a)({},W.l),{},{padding:"7px",borderRadius:"7px",fontSize:"16px",width:"calc(100% - 14px)",minHeight:"38px",border:"solid 1px rgba(0,0,0,0.1)"}),"& .sugestions":{top:"none !important",bottom:"40px",border:"solid 10px red"},"& textarea::placeholder":{color:"rgba(0,0,0,0.2)"}}),mentionWrapper:{width:"100%",background:"transparent",fontSize:"0.9rem",color:" #a9b5c4","&&.mentionWrapper__control":{borderRadius:"25px",border:"1px solid #3a546f",minHeight:"45px","&& .mentionWrapper__highlighter":{padding:"0.7rem 1rem"},"&& .mentionWrapper__input":(n={padding:"0.7rem 1rem",outline:0,border:0,resize:"none"},Object(f.a)(n,"outline","none"),Object(f.a)(n,"fontSize","0.9rem"),Object(f.a)(n,"color","#7288a3"),Object(f.a)(n,"borderColor"," #3a546f"),Object(f.a)(n,"overflow","hidden"),Object(f.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};function Gl(){Gl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Hl=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Rl)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(t.chat,e.classes),i=c.a.getState().functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(""),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),E=j[0],k=j[1],L=a.a.useState([]),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState([]),N=Object(h.a)(F,2),D=N[0],A=N[1],P=a.a.useState(null),$=Object(h.a)(P,2),z=$[0],M=$[1],B=a.a.useState(!1),Y=Object(h.a)(B,2),R=Y[0],G=Y[1],H=a.a.useState([]),W=Object(h.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(h.a)(q,2),K=X[0],J=X[1],Z=a.a.createRef(),Q=a.a.createRef(),ee=Object(S.j)(),te=0;n._id&&r.cards[e.nodeId]&&r.users&&r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]&&(te=r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]);var re=window.location.hash.split("/");re[0]=re[0].replace("#",""),a.a.useEffect((function(){u||f(!0)}));var ne=function(){var e,t=[];if(e=b){var r=e.split("@[");r.length>0&&r.map((function(e){if(e){"@[".concat(e.split(")")[0],")");var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},oe=function(){var t=Object(p.a)(Gl().mark((function t(){var a,o,c;return Gl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:J(!1),O(!0),a=[],o=ne(),console.log(e),c={_id:Object($t.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:b,type:"comment",mentions:ne(),notifyUsers:a,filesCount:I.length>0?I.length:0,_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null},z&&(c=Object(d.a)(Object(d.a)({},c),{},{urlPreview:JSON.stringify(z)})),Lr(e,Object(d.a)(Object(d.a)({},c),{},{user:Object(d.a)({},r.users[n._id]),files:{}})),i.emit("data",{module:"timeline",method:"post",action:"add"},c,(function(t){if(console.log(t),t._id)if(I.length>0)ie(t);else{e.onSending&&e.onSending();var n=Object(d.a)(Object(d.a)({},t),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null});z&&(n=Object(d.a)(Object(d.a)({},n),{},{urlPreview:JSON.stringify(z)})),o.map(function(){var t=Object(p.a)(Gl().mark((function t(n){return Gl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cards[e.nodeId]||r.users&&(!r.users||r.users[n])){t.next=3;break}return t.next=3,Et(e,n,2,e.nodeId,!0);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),A([]),T([]),V([]),v(""),M(null),O(!1),e.onSending&&e.onSending()}})),v(""),M(null);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ie=function(){var t=Object(p.a)(Gl().mark((function t(r){var n;return Gl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Array.from(I),t.next=3,Promise.all(n.map(function(){var e=Object(p.a)(Gl().mark((function e(t,n){var a;return Gl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A([].concat(Object(Ne.a)(D),[t])),e.next=3,Object(pt.a)(r._id,t,!0);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())).then((function(t){e.onSending&&e.onSending(),r.files=t,r._parent=e.nodeId,i.emit("timeline.COMMENT",{node:e.nodeId,comment:r,db:e.db?e.db:"cards"},(function(e){})),A([]),T([]),v(""),M(null),O(!1),e.onSending&&e.onSending()}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ce=function(){var e=Object(p.a)(Gl().mark((function e(t){return Gl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T([].concat(Object(Ne.a)(I),Object(Ne.a)(Object.keys(t).map((function(e){return t[e]}))))),k(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=Object(p.a)(Gl().mark((function e(t){var r,n,a,o;return Gl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=9;break}return r="",n=[],t.indexOf(" ")>-1?n=t.split(" "):t.indexOf("\n")>-1?n=t.split("\n"):n.push(t),a=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),e.next=8,n.map((function(e){(e.indexOf("http://")>-1||e.indexOf("https://")>-1)&&a.test(e)&&(r=e)}));case 8:if(!z&&r&&-1===U.indexOf(r)||r&&z&&-1===U.indexOf(r)&&z.link!==r){G(!0);try{i.emit("data",{module:"link",method:"post",action:"exist"},{idRel:re[0],url:r},(function(e){M(e),G(!1)}))}catch(c){G(!1),(o=U).push(r),V(o),console.log(c)}}case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=[];return r.cards[e.nodeId]&&r.users&&Object.keys(r.users).map((function(e){if(e&&null!==e&&void 0!==e&&e!==n._id&&r.users[e].name&&r.users[e]&&!r.users[e].deleted){var t=r.users[e]._id,a=r.users[e].name?r.users[e].name:r.users[e].name.split(" ").length>0?r.users[e].name.split(" ")[0]:r.users[e].name;t&&0===Object.keys(se).filter((function(e){return se[e].id===t})).length&&se.push({id:t,display:a})}})),(ee&&(ee.owner||ee.planAdmin||ee.planModerate)||te&&te.access&&parseInt(te.access)>3)&&Object.keys(r.users).filter((function(e){return!r.users[e].deleted&&"client"!==r.users[e].type&&"group"!==r.users[e].type&&"account"!==r.users[e].type&&!r.users[e]._parent})).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(se).filter((function(e){if(se[e].id===t)return!0})).length&&se.push({id:t,display:e.nodeId&&r.cards[e.nodeId]&&r.users&&r.users[t]&&r.users[t].name?r.users[t].name:r.users[t].displayName?r.users[t].displayName:r.users[t].name})})),a.a.createElement(Jr.FileDrop,{ref:Z,className:e.relative?o.rootRelative:o.root,onDragOver:function(){!e.disabledSend&&k(!0)},onClick:function(){Q&&Q.current&&Q.current.focus()},onDrop:ce,accept:".png, .jpg, .jpeg, .bpm, .svg, .gif, .pdf, .mp4, .3gp, .ts, .mkv, .avi, .mov, .mts, m2ts, .mxf, .aac, aiff, .caf, .ogg, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .txt, .zip, .rar"},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:e.relative?o.editorRelative:o.editor,style:e.editorStyle?e.editorStyle:{},onClick:function(){Q&&Q.current&&Q.current.focus()}},a.a.createElement("div",{className:o.files},I&&I.length>0&&I.map((function(t,r){var n=t.name.split("."),o="attachment";return e.store.db.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(o=e.store.db.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(t)),a.a.createElement("div",{key:r,style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center",marginBottom:"5px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"50px",height:"50px",marginRight:"7px",overflow:"hidden"}},"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?a.a.createElement(ae.a,{icon:o,size:"50px"}):a.a.createElement("img",{src:o,style:{width:"100%",height:"100%"}})),D.length>0&&D[r]&&D[r].name===t.name?a.a.createElement(ae.a,{icon:"cloud_done",color:"green"}):_?a.a.createElement(a.a.Fragment,null):a.a.createElement(ae.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(I);t.splice(e,1),T(t)}(r)}}),t.name)}))),a.a.createElement("div",{className:o.textEditor},R&&!z&&a.a.createElement("div",{className:o.urlPreview,style:{width:"100%",height:"150px"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},a.a.createElement(nn.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},a.a.createElement(nn.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10}),a.a.createElement(nn.a,{variant:"text",height:10})))),z&&a.a.createElement("div",{className:o.urlPreview},a.a.createElement("img",{src:"".concat(z.img?z.img:Le.a),onError:function(e){e.target.src=Le.a},alt:z.title}),a.a.createElement("div",{className:"data"},a.a.createElement("div",{className:"title"},z.title),z.site&&a.a.createElement("div",{className:"siteName"},z.site),z.contentSnippet&&a.a.createElement("div",{className:"contentSnippet"},z.contentSnippet)),a.a.createElement(rn,{title:Object(S.r)("$__removeLink",1),icon:"delete_forever",color:"red",onClick:function(){return M(null)}})),_?a.a.createElement("div",{className:o.sendingMessage},Object(S.r)("$__sending",1),a.a.createElement(_r.a,{className:o.progressBar})):a.a.createElement("div",{style:{position:"relative",height:"auto",backgroundColor:"#ffffff",border:"solid 1px rgba(0,0,0,0.05)",display:"flex",alignItems:"center",zIndex:1}},a.a.createElement(Zr.b,{ref:Q,value:b,onChange:function(e){le(e.target.value)},onPaste:function(e){ce(e.clipboardData.files)},placeholder:e.placeholder?e.placeholder:Object(S.r)("$__writeMessage"),style:Object(d.a)(Object(d.a)({},Yl),{},{position:"relative",width:"calc(100% - 130px)",paddingRight:"7px",background:"none",border:"none",overflow:"auto !important"}),onKeyDown:function(e){13==e.keyCode&&(e.shiftKey?e.stopPropagation():b.trim()&&oe())},placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},a.a.createElement(Zr.a,{trigger:"@",data:se,renderSuggestion:function(e,t,n){if(e&&e.id)return a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Se.a,{style:{width:"25px",height:"25px",marginRight:"7px"},alt:n,src:r.users[e.id]&&r.users[e.id].image||r.users[e.id]&&r.users[e.id].image?r.users[e.id].image:null}),n)}})),a.a.createElement("div",{style:{position:"absolute",right:"0px",bottom:"0px",cursor:"pointer",display:"flex",alignItems:"center"}},a.a.createElement(rn,{title:Object(S.r)("$__emojis",1),icon:K?"highlight_off":"sentiment_very_satisfied",color:Object(S.d)("medium"),onClick:function(){J(!K)}}),!_&&a.a.createElement("div",{className:o.actionButton},a.a.createElement("input",{className:"input-text-timeline",style:{position:"absolute",marginRight:"3em",height:"24px",fontSize:"0",left:"0px",width:"24px",cursor:"pointer",border:"none",opacity:"0"},onChange:function(e){return ce(e.target.files)},multiple:!0,type:"file",accept:".png, .jpg, .jpeg, .bpm, .svg, .gif, .pdf, .mp4, .3gp, .ts, .mkv, .avi, .mov, .mts, m2ts, .mxf, .aac, aiff, .caf, .ogg, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx"}),a.a.createElement(ae.a,{icon:"attachment",color:Object(S.d)("medium"),size:"22px"})),!_&&(b||I.length>0)&&a.a.createElement(rn,{title:Object(S.r)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(S.d)("menu"),onClick:function(){return oe()}}),e.closeOption&&a.a.createElement(ae.a,{title:Object(S.r)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(S.d)("color"),onClick:function(){return e.onClose()}}),K&&a.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px"}},a.a.createElement(en.a,{onEmojiClick:function(e,t){v("".concat(b," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))),a.a.createElement("div",{className:E?o.onDropFile:o.dropFile,onDragLeave:function(){!e.disabledSend&&k(!1)}},Object(S.r)("$__dropTheFileToAttach","*"))))}))),Wl=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Mn)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.functions,l=(r.usersStatus,i.socket,a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0],d=s[1],p=a.a.useState(!1),f=Object(h.a)(p,2),m=(f[0],f[1]),g=a.a.useState(null),b=Object(h.a)(g,2),v=(b[0],b[1],a.a.useState(null)),y=Object(h.a)(v,2),x=(y[0],y[1],null);w&&w._parent&&n.cards[w._parent]?w._parent:w&&w.idRel&&n.cards[w.idRel]&&w.idRel;var O=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];m(!0),e&&clearTimeout(x)},w=e.storie;if(!w)return null;"timer"===w.type&&String(w.ini)&&String(w.fin)&&(w.fin,w.ini);var j=null;w.urlPreview&&(j=JSON.parse(w.urlPreview));var E=function(e){var t,r;if(w&&w._parent&&n.cards[w._parent]?t=w._parent:w&&w.idRel&&n.cards[w.idRel]&&(t=w.idRel),r=e,e){var a=e.split("@[");a.length>0&&a.map((function(e){if(e){var a="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&n.cards[t]&&n.cards[t]._users&&n.cards[t]._users[o]){var i=n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name||n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name?n.cards[t]._users[o].name:e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(i,"</b></span>"))}else if(o&&36===o.length&&n.users[o]){var c=n.users[o]&&n.users[o].name||n.users[o].name?n.users[o].name:Object(S.r)("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(c,"</b></span>"))}}return!0}))}return r}(w.message);w._reactions&&Object.keys(w._reactions).length>0&&Object.keys(w._reactions).map((function(e){Object.keys(w._reactions[e]).length>0&&Object.keys(w._reactions[e]).map((function(t){t===o._id&&e}))}));var k=!1;e.storie&&e.storie.user&&e.storie.user._id===o._id&&(k=!0);return""===w.message&&w.cardId&&w.cardId!==e.nodeId&&!c.a.getState().db.cards[w.cardId]?null:a.a.createElement("div",null,a.a.createElement("div",{className:"message",style:{position:"relative",float:"left",width:"100%",marginBottom:"20px",display:"flex",alignItems:"center"},onMouseLeave:function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;x=setTimeout((function(){m(!1)}),e)}(1e3)},onMouseOver:function(){e.isReply||O(!0)},onClick:function(){e.isReply||O(!0)}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left",fontSize:"10px",fontWeight:"bold",display:"flex",alignItems:"center",whiteSpace:"nowrap",marginRight:"15px"}},a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:w.user._id},a.a.createElement(Se.a,{alt:w.user.displayName?w.user.displayName:w.user.name,src:"".concat(w.user.image),style:{width:"22px",height:"22px"}})),w.user.displayName?w.user.displayName:w.user.name," ",a.a.createElement("span",{style:{fontSize:"10px"}},"(",_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*w.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*w.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),")"))),a.a.createElement("div",null,w.files&&Object.keys(w.files).length>0&&a.a.createElement("div",{className:"files",style:{position:"relative",display:"flex",justifyContent:k?"flex-end":"none",flexWrap:"wrap"}},w.files&&Object.keys(w.files).length>0&&Object.keys(w.files).map((function(t,r){var o=w.files[t],i=o.name.split("."),c=i[i.length-1],l="attachment";n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1})).length>0&&(l=n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(o.file));var s="img";return n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].viewer&&(s=n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].viewer),a.a.createElement("div",{key:t,style:{position:"relative",display:"flex",alignItems:"center",marginBottom:"5px",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer",overflow:"hidden",padding:"7px",zIndex:"10 !important",borderRadius:"15px",width:"img"===s?Object.keys(w.files).length<4?"33%":"25%":"movie"===s||"audio"===s?"50%":"20%",maxWidth:"img"===s?"440px":"none",minWidth:"img"===s||"movie"!==s&&"audio"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")||"movie"!==s&&"audio"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)?"140px":"100%"},onClick:function(r){e.openLightBox&&e.openLightBox(w.files[t]._id),r.preventDefault()},title:w.files[t].name},("img"===s||"movie"!==s&&"audio"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")||"movie"!==s&&"audio"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1))&&a.a.createElement(Ge.a,{title:w.files[t].name},a.a.createElement("div",{style:{position:"absolute",bottom:"7px",left:"7px",right:"7px",padding:"3px",background:"rgba(0,0,0,0.8)",color:"#FFFFFF",borderRadius:"0px 0px 15px 15px",overflow:"hidden",textOverflow:"ellipsis"}},w.files[t].name)),"img"===s&&"string"===typeof l&&l.indexOf("https")>-1&&-1===l.indexOf("svg")&&a.a.createElement("img",{src:"".concat(l),style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"},onError:function(e){w.created_at&&"string"===typeof w.created_at&&parseInt(w.created_at)>_()().unix("X")-60&&(e.target.src=l)}}),"movie"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")?a.a.createElement(ae.a,{icon:l,size:"50px"}):"movie"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)&&a.a.createElement("img",{src:l,style:{width:"100%",height:"100%"}}),"img"===s&&l&&l.indexOf("svg")>-1&&a.a.createElement("img",{src:he.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}),"movie"===s&&a.a.createElement("video",{style:{width:"100%"},src:"https://machen.azureedge.net/".concat(o.file),controls:!0}),"audio"===s&&a.a.createElement(le.a,{src:"https://machen.azureedge.net/".concat(o.file),controls:!0}))}))),function(){if("comment"===w.type&&w.message&&!w.urlPreview)return a.a.createElement("div",{style:{wordBreak:"break-word"}},Object(S.b)(E,e.searchText));if("comment"===w.type&&w.message&&w.urlPreview){var r=E.replace(j.link,'<a href="'.concat(j.link,'" target="_blank">').concat(j.link,"</a>"));return a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{className:t.urlPreview},!u&&j.img&&a.a.createElement("img",{src:"".concat(j.img),onError:function(e){d(!0)},alt:j.title||j.link}),a.a.createElement("div",{className:"data"},a.a.createElement("div",{className:"title"},j.title),j.site&&a.a.createElement("div",{className:"siteName"},j.site),j.contentSnippet&&a.a.createElement("div",{className:"contentSnippet"},j.contentSnippet))),a.a.createElement("a",{style:{position:"relative",float:"right",fontWeight:"bold",fontSize:"12px",color:"#000000",zIndex:1},href:j.link,target:"_blank"},Object(S.r)("$__openLink","*"))),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:Object(S.o)(r,!0,"\n","\n")}}))}}())))}))),Ul=function(e){return{root:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto"},content:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:0,padding:"0 0 20px",width:"-webkit-fill-available","&:before":{left:"15px"},"&:after":{clear:"both"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 50px",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",paddingLeft:"15px",width:"calc(100% - 15px)","&:before,&:after":{content:"",display:"table"},"&:after":{clear:"both"}},timelineBadge:{color:W.O,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",left:"50%",marginLeft:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadge:{left:"7px"},timelineBadgeInverted:{color:W.O,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",right:"50%",marginRight:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadgeInverted:{right:"7px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.b)+", 0.4)"},info:{backgroundColor:W.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.u[0])+", 0.4)"},success:{backgroundColor:W.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.G[0])+", 0.4)"},danger:{backgroundColor:W.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.j[0])+", 0.4)"},warning:{backgroundColor:W.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.N[0])+", 0.4)"},primary:{backgroundColor:W.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:{maxWidth:"calc(100% - 70px)",float:"right",padding:"7px",marginBottom:"5px",marginRight:"40px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:Object(S.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:0,display:"flex",alignItems:"center"},timelineDate:{display:"flex",alignItems:"center",padding:"5px",backgroundColor:"#CCCCCC"},timelineBody:{overflowWrap:"anywhere",fontSize:"12px",lineHeight:"21px",position:"relative",width:"100%",float:"left"},timelineLog:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:{position:"absolute",bottom:0,minHeight:"50px",padding:"10px",height:"auto",width:"calc(100% - 0px)",backgroundColor:"rgba(240,240,240,1)",zIndex:10},files:{display:"inline-table",position:"relative"},textEditor:{},textEditorIcon:{cursor:"pointer",color:Object(S.d)("color")},progressBar:{backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"30px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"relative",float:"left",marginBottom:"33px","& img":{maxWidth:"20%",height:"auto",marginTop:"30px",marginRight:"7px"},"& .data":{"& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},users:{position:"relative",bottom:0,right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}};function Vl(){Vl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ul)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.functions,l=(r.chat,r.timeline),s=i.socket,u=a.a.useState(e.stories||{}),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!0),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.a)(_,2),w=O[0],j=(O[1],a.a.useState(!1)),E=Object(h.a)(j,2),S=E[0],k=(E[1],[]);a.a.useEffect((function(){return l&&l[e.data._id]&&Object.keys(l[e.data._id]).length!==Object.keys(m).length&&g(l[e.data._id]),function(){}}),[l]),a.a.useEffect((function(){e.data._id&&L()}),[e.data]);var L=function(){var t=Object(p.a)(Vl().mark((function t(){var r;return Vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/social/init()"}),{ids:[e.data._id],db:"cards",type:"comment",limit:S,skip:w});case 2:(r=t.sent)&&r.timelines&&r.timelines[e.data._id]?(g(r.timelines[e.data._id]),setTimeout((function(){x(!1)}),300)):r&&r.result&&setTimeout((function(){x(!1)}),300);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),C=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:k,file:t})},I=function(){var t=Object(p.a)(Vl().mark((function t(){return Vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object.keys(m).filter((function(e){if(m[e].user&&m[e].user._id!==o._id&&(!m[e].readedBy||m[e].readedBy&&!m[e].readedBy[o._id]))return!0})).length>0&&(Sr(e,{readedBy:o._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users"}),s.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users",_client:n.cards[e.nodeId]&&n.cards[e.nodeId].client?n.cards[e.nodeId].client:null}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return y?a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(nn.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),a.a.createElement(nn.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),a.a.createElement(nn.a,{variant:"text",height:11,style:{marginBottom:"3px"}})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement("ul",{className:t.timelineSimple,id:"tms_".concat(e.nodeId),style:{zIndex:1}},m&&Object.keys(m).length>0&&Object.keys(m).sort((function(e,t){return parseInt(m[e].created_at)<parseInt(m[t].created_at)?-1:parseInt(m[e].created_at)>parseInt(m[t].created_at)?1:0})).map((function(r,n){var i=m[r];return!e.showUnReaded&&n>Object.keys(m).length-4?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];k.push(r)})),a.a.createElement("li",{key:r},a.a.createElement(Wl,{openLightBox:function(e){C(e)},storie:i,reply:i.reply?m[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&i&&i.user&&i.user._id!==o._id&&(!i.readedBy||i.readedBy&&!i.readedBy[o._id])?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];k.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Wl,{openLightBox:function(e){C(e)},storie:i,reply:i.reply?m[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),a.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),e.data&&e.data._id&&a.a.createElement(Hl,{nodeId:e.data._id,onSending:function(){I()},placeholder:"Escreva um coment\xe1rio"}))})));var ql=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(de.a)(_l)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useRef({});return a.a.useEffect((function(){if(l.current&&e.onResize){var t=new ResizeObserver((function(){var t=l.current.clientHeight;e.onResize(t)}));return t.observe(l.current),function(){return t.disconnect()}}return function(){}}),[l]),a.a.useEffect((function(){i(e.data)}),[]),a.a.createElement("div",{ref:l,className:t.feed,style:{cursor:"pointer"},onClick:e.onClick?function(){return e.onClick()}:null},o&&o.img&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{src:o.img,style:{width:"100%"},onError:function(){i(Object(d.a)(Object(d.a)({},o),{},{img:null}))}})),a.a.createElement("div",{className:t.infos},a.a.createElement("div",{className:t.linkTitle,dangerouslySetInnerHTML:{__html:o.title}}),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:o.contentSnippet},className:t.linkContent}),a.a.createElement("div",{className:t.feedFooter,onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{className:t.feedDate},_()(o.isoDate?o.isoDate:o.pubDate).format("DD/MM/YYYY HH:MM")),o.title&&o.title.indexOf("Violet ganham")>-1&&console.log(o),a.a.createElement(Te,{data:o},a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(Ee,{icon:"settings_input_antenna",title:Object(S.r)("$__sendToRadar",1),iconColor:Object(S.d)("menu"),size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:o.title,description:o.contentSnippet,pubDate:o.isoDate?o.isoDate:o.pubDate,image:o.img,url:o.link}}))}}))))))})));function Xl(){Xl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Kl=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(_l)((function(e){var t=e.data,r=a.a.useState(0),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useState(7),l=Object(h.a)(c,2),s=l[0],u=(l[1],a.a.useState([])),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState([]),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!0),w=Object(h.a)(O,2),j=w[0],E=w[1],S=a.a.useState(!1),k=Object(h.a)(S,2),L=k[0],C=k[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],N=T[1];a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(g)&&b(e),E(!0)}),[]),a.a.useEffect((function(){g.length>0&&!L&&(D(o,s),g[2]&&36!==g[2].length&&E(!0),C(!0))}),[g]),a.a.useEffect((function(){F||(E(!0),D(o,s))}),[o,s]),a.a.useEffect((function(){E(!1)}),[x]);var D=function(){var e=Object(p.a)(Xl().mark((function e(t,r){var n,a,o;return Xl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(F){e.next=15;break}return E(!0),e.prev=2,e.next=5,dt.a.post("/Feed_Social_V2",{ids:null,skip:t*r,limit:r});case 5:n=e.sent,a={},o=0,n&&n.data&&n.data.length>0?n.data.map((function(e){var t={};e.reactions&&e.reactions.filter((function(e){return e&&e.user&&e.user._id})).length>0&&e.reactions.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e.react.type,Object(d.a)(Object(d.a)({},t&&t[e.react.type]?t&&t[e.react.type]:{}),{},Object(f.a)({},e.user._id,Object(d.a)(Object(d.a)({},e.user),{},{reactDate:e.react.created_at})))))})),a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e.link._id,Object(d.a)(Object(d.a)({},e.link),{},{_reactions:t}))),e.total>o&&(o=e.total)})):n&&n.data&&0===n.data.length&&N(!0),_(Object(d.a)(Object(d.a)({},x),a)),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t,r){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement("div",{style:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0,padding:"0px 15px",overflow:"auto"},id:"linkList",onScroll:function(e){!function(e){var t=document.getElementById("linkList");console.log(t.scrollHeight-t.scrollTop),!j&&t.scrollHeight-t.scrollTop<2500&&i(o+1)}()}},a.a.createElement(un,null,Object.keys(x).sort((function(e,t){return x[e].isoDate&&x[t].isoDate&&x[e].isoDate<x[t].isoDate?1:x[e].isoDate&&x[t].isoDate&&x[e].isoDate>x[t].isoDate?-1:0})).map((function(e){return a.a.createElement(un,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(fn,{xs:12,sm:10,md:8,lg:6,xl:6},a.a.createElement(ql,{db:"cards",data:x[e],onClick:function(){window.open(x[e].link,"_blank")}})))}))),j&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(Or,null))))})));function Jl(){Jl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Zl=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(_l)((function(e){var t=e.data,r=(e.classes,c.a.getState().db,a.a.useState(0)),n=Object(h.a)(r,2),o=(n[0],n[1],a.a.useState(0)),i=Object(h.a)(o,2),l=i[0],s=(i[1],a.a.useState(5)),u=Object(h.a)(s,2),f=(u[0],u[1],a.a.useState([])),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState([]),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!0),w=Object(h.a)(O,2),j=w[0],E=w[1],S=a.a.useState(!1),k=Object(h.a)(S,2),L=k[0],C=k[1];a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(g)&&b(e),E(!0)}),[]),a.a.useEffect((function(){g.length>0&&!L&&(I(),g[2]&&36!==g[2].length&&E(!0),C(!0))}),[g]);var I=function(){var e=Object(p.a)(Jl().mark((function e(t,r){var n,a;return Jl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===l||l>Object.keys(x).length)){e.next=13;break}return E(!0),e.prev=2,e.next=5,dt.a.post("/Feed_Social",{id:g[2]});case 5:n=e.sent,a={},n&&n.data&&n.data.links?(a=Object(d.a)(Object(d.a)({},a),n.data.links),_(Object(d.a)(Object(d.a)({},x),a)),E(!1)):E(!1),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t,r){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement("div",{style:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0,padding:"0px 15px",overflow:"auto"},id:"linkList"},a.a.createElement(un,null,Object.keys(x).length>0?Object.keys(x).sort((function(e,t){return x[e].isoDate&&x[t].isoDate&&x[e].isoDate<x[t].isoDate?1:x[e].isoDate&&x[t].isoDate&&x[e].isoDate>x[t].isoDate?-1:0})).map((function(e){return a.a.createElement(un,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(fn,{xs:12,sm:6,md:6,lg:6,xl:6},a.a.createElement(ql,{db:"cards",data:x[e],onClick:function(){window.open(x[e].link,"_blank")}})))})):a.a.createElement(un,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(fn,{xs:12,sm:6,md:6,lg:6,xl:6},"A feed solicitado n\xe3o pode ser exibido"))),j&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(Or,null))))})));var Ql=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))((function(e){a.a.useEffect((function(){return console.log("StrategyAndPlans"),function(){}}),[]),window.location.hash.split("/")[0].replace("#","")||i.a.push("bright-and-connected#tab/home");var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),a.a.createElement("div",null,t[1]&&("radar"===t[1]||"insight-boards"===t[1])&&a.a.createElement(fl,null),t[1]&&"home"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Kl,null)),t[1]&&"read"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(bl,null),a.a.createElement(Zl,null)),t[1]&&"insight-boards"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(bl,null),a.a.createElement(xl,null)),t[1]&&"radar"===t[1]&&a.a.createElement("div",{style:{top:33}},a.a.createElement(jl,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&a.a.createElement(a.a.Fragment,null,a.a.createElement(bl,null),a.a.createElement(Bl,null)),t[1]&&"hideFeeds"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(bl,null),a.a.createElement(Bl,{showHidden:!0})),t[1]&&"allNews"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(bl,null),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement($l,null))))})),es=r(741),ts=r(1025),rs=r.n(ts),ns=(r(1531),Object(de.a)((function(e){return{tooltip:{backgroundColor:"rgba(0,0,0,0.5) !important",color:"rgba(0, 0, 0, 0.87)",padding:"5px !important",fontSize:e.typography.pxToRem(12),border:"none",borderRadius:"7px",boxShadow:"3px 3px 7px 0px rgba(0,0,0,0.7)",alignItems:"center",justifyContent:"center"}}}))(Ge.a));r(1532),r(1533);function as(){as=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var os=rs()(es.a),is={allDay:Object(S.r)("$__allDay"),previous:"<",next:">",today:Object(S.r)("$__today"),month:Object(S.r)("$__month"),week:Object(S.r)("$__week"),day:Object(S.r)("$__aday"),agenda:Object(S.r)("$__agenda"),date:Object(S.r)("$__date"),time:Object(S.r)("$__hour"),event:Object(S.r)("$__activity"),showMore:function(e){return"+ (".concat(e,") ").concat(Object(S.r)("$__activities"))}};function cs(e){c.a.getState().session,e.localizer.messages;var t=e.label,r=function(t){e.onNavigate(t)};return a.a.createElement("div",{className:"rbc-toolbar"},a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("PREV")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.r)("$__prev"))),a.a.createElement("span",{className:"rbc-toolbar-label"},t),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("NEXT")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.r)("$__next"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("TODAY")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.r)("$__today"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("day")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.r)("$__day"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("week")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.r)("$__week"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("month")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.r)("$__month"))))}var ls=Object(s.b)((function(e){return{search:e.search,cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.reduxFunction,r=e.search,n=c.a.getState(),o=n.db,i=n.session,l=a.a.useState([]),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(null),g=Object(h.a)(m,2),b=g[0],v=(g[1],a.a.useState("week")),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(pa()().toLocaleString()),w=Object(h.a)(O,2),j=w[0],E=w[1],k=a.a.useState(null),L=Object(h.a)(k,2),C=(L[0],L[1]),I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],N=T[1],D=a.a.useState(!1),A=Object(h.a)(D,2),P=A[0],$=A[1],z=a.a.useState([]),M=Object(h.a)(z,2),B=M[0],Y=M[1];pa.a.locale(i.language?i.language.toLowerCase():"pt-br",{week:{dow:1}});var R=Object(es.b)(pa.a);a.a.useEffect((function(){var e=i&&i.calendarPreffers?JSON.parse(i.calendarPreffers):{};e.view&&_(e.view),e.view&&N(e.showAllEvents),e.severalDaysActivities&&$(e.severalDaysActivities),e.disabledTypes&&Y(Array.from(e.disabledTypes))}),[]),a.a.useEffect((function(){H()}),[e.cards,r]),a.a.useEffect((function(){H(),G()}),[P,B]);var G=function(){var e=Object(p.a)(as().mark((function e(){var t;return as().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i.calendarPreffers?JSON.parse(i.calendarPreffers):{},t=Object(d.a)(Object(d.a)({},t),{},{disabledTypes:Array.from(B),showAllEvents:F,severalDaysActivities:P,view:x}),c.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"preffers"},{calendarPreffers:JSON.stringify(t)},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=Object(p.a)(as().mark((function e(){var t;return as().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._users&&c.a.getState().db.cards[e]._users[i._id]&&(!c.a.getState().db.cards[e].checklist||c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e].showCard)&&pa()(1e3*c.a.getState().db.cards[e].startDate).isValid()&&pa()(1e3*c.a.getState().db.cards[e].endDate).isValid()&&(0===B.length||B.length>0&&-1===B.indexOf(c.a.getState().db.cards[e].type))&&"plan"!==c.a.getState().db.cards[e].type&&"chatGroup"!==c.a.getState().db.cards[e].type&&"completed"!==c.a.getState().db.cards[e].status&&!c.a.getState().db.cards[e].deleted&&(P||!P&&pa()(1e3*c.a.getState().db.cards[e].startDate).format("YYYY-MM-DD")===pa()(1e3*c.a.getState().db.cards[e].endDate).format("YYYY-MM-DD"))&&(0===r.tags.length||r.tags.length>0&&c.a.getState().db.cards[e]._tags&&c.a.getState().db.cards[e]._tags.length>0&&c.a.getState().db.cards[e]._tags.filter((function(e){var t=!1;return r.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0)&&(""===r.text||""!==r.text&&(c.a.getState().db.cards[e].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||c.a.getState().db.cards[e].description&&c.a.getState().db.cards[e].description.toLowerCase().indexOf(r.text.toLowerCase())>-1))&&r.cards.status[c.a.getState().db.cards[e].status]&&(r.cards.priority.all||c.a.getState().db.cards[e].priority&&r.cards.priority[c.a.getState().db.cards[e].priority])&&(r.cards.risk.all||c.a.getState().db.cards[e].risk&&r.cards.risk[c.a.getState().db.cards[e].risk])&&(r.cards.complexity.all||c.a.getState().db.cards[e].complexity&&r.cards.complexity[c.a.getState().db.cards[e].complexity])&&(r.cards.impact.all||c.a.getState().db.cards[e].impact&&r.cards.impact[c.a.getState().db.cards[e].impact])&&(0===Object.keys(r.users.selected).length||Object.keys(r.users.selected).length>0&&Object.keys(c.a.getState().db.cards[e]._users).filter((function(e){return r.users.selected[e]})).length>0)})).map((function(e){var r=!1,n=pa()(1e3*c.a.getState().db.cards[e].startDate).toDate(),a=pa()(1e3*c.a.getState().db.cards[e].endDate).toDate(),o=pa()(1e3*c.a.getState().db.cards[e].endDate).unix("x")-pa()(1e3*c.a.getState().db.cards[e].startDate).unix("x");("00:00:00"===pa()(1e3*c.a.getState().db.cards[e].startDate).format("HH:mm:ss")&&"23:59:59"===pa()(1e3*c.a.getState().db.cards[e].endDate).format("HH:mm:ss")||Math.ceil(o/60/60)>23)&&(r=!0),t.push({title:c.a.getState().db.cards[e].name,allDay:r,startDate:n,endDate:a,_id:e})})),f(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,b,a.a.createElement(fl,null),a.a.createElement(un,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%"}},a.a.createElement(We,{text:Object(S.r)("$__legend"),icon:"style",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:Object(S.d)("menu"),borderRadius:0},options:[{name:Object(S.r)("$__scheduleColor",1),icon:"label",iconColor:"gray",color:"gray",disabled:!0},{name:Object(S.r)("$__late",1),icon:"label",iconColor:"red",disabled:!0}].concat(Object(Ne.a)(o.status.map((function(e){return{name:Object(S.r)("".concat(e.label),1),icon:"label",iconColor:e.color,disabled:!0}}))),[{name:Object(S.r)("$__scheduleLeftBorderColor",1),icon:"border_left",color:"gray",iconColor:"gray",disabled:!0}],Object(Ne.a)(o.priority.map((function(e){return{name:Object(S.r)("".concat(e.label),1),icon:"border_left",color:e.color,iconColor:e.color,disabled:!0}}))))}),a.a.createElement(We,{text:Object(S.r)("$__type"),icon:"collections_bookmark",horizontalButton:!0,transparent:!0,size:"21px",color:Object(S.d)("lightgray"),btColor:Object(S.d)("lightgray"),buttonStyle:{backgroundColor:Object(S.d)("menu"),borderRadius:0},forceStopPropagation:!0,options:[].concat(Object(Ne.a)(o.type.filter((function(e){return e.calendar})).map((function(e){return{name:Object(S.r)("".concat(e.label),1),icon:e.icon,iconColor:B.indexOf(e.value)>-1?"lightgray":Object(S.d)("menu"),color:B.indexOf(e.value)>-1?"lightgray":Object(S.d)("menu"),onClick:function(){var t=Array.from(B);-1===t.indexOf(e.value)?t.push(e.value):t.splice(t.indexOf(e.value),1),Y(t)}}}))),[{name:B.length===o.type.filter((function(e){return e.calendar})).length?Object(S.r)("$__showAll",1):Object(S.r)("$__hideAll",1),icon:"clear_all",iconColor:B.length!==o.type.filter((function(e){return e.calendar})).length?"lightgray":Object(S.d)("menu"),color:B.length!==o.type.filter((function(e){return e.calendar})).length?"lightgray":Object(S.d)("menu"),onClick:function(){if(B.length===o.type.filter((function(e){return e.calendar})).length)Y([]);else{var e=[];o.type.filter((function(e){return e.calendar})).map((function(t){e.push(t.value)})),Y(e)}}}])}),a.a.createElement(We,{text:Object(S.r)("$__options"),icon:"settings",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:Object(S.d)("menu"),borderRadius:0},style:{marginRight:"15px"},options:[{name:Object(S.r)("$__showAllEvents","*"),icon:F?"check_circle_outline":"radio_button_unchecked",onClick:function(){N((function(e){return!e}))}},{name:Object(S.r)("$__activitiesTInSeveralDays","*"),icon:P?"check_circle_outline":"radio_button_unchecked",onClick:function(){$((function(e){return!e}))}}]})),a.a.createElement(fn,{xs:12,sm:12,md:12},a.a.createElement(Ii,null,a.a.createElement(Di,null,a.a.createElement(os,{selectable:!0,localizer:R,events:u,messages:is,defaultDate:new Date,onSelectSlot:function(e){t("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:"new",module:"cardEdit",activeModule:"cardEdit",data:{type:"task",startDate:pa()(e.start).unix("x"),endDate:pa()(e.end).unix("x")}}))},startAccessor:"startDate",endAccessor:"endDate",onView:function(e){_(e)},onSelectEvent:function(e){C(e._id),t("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:e._id,module:"cardEdit",activeModule:"cardEdit",data:c.a.getState().db.cards[e._id]}))},eventPropGetter:function(e,t,r,n){var a=c.a.getState().db.cards[e._id],i=c.a.getState().db.status.filter((function(t){return t.value===c.a.getState().db.cards[e._id].status}))[0].color,l=pa()(new Date(t)).unix("x"),s=pa()(new Date(r)).unix("x");pa()(new Date(r)).unix("x")<pa()().unix("x")&&(i="#ff0000");var u=(s-l)/60/1440*100;return u>100&&(u=100),{className:"",style:Object(d.a)(Object(d.a)({height:"".concat(u,"%")},"week"===x||"day"===x?{minHeight:"".concat(u,"%")}:{minHeight:22}),{},{width:"100%",border:"solid 1px rgba(0,0,0,0.1)",borderRadius:3,boxShadow:"0px 1x 2px 0px rgba(0,0,0,0.3)",backgroundColor:"".concat(n?Object(S.l)(i,.3):Object(S.l)(i,.5))},a.priority&&o.priority.filter((function(e){return String(e.value)===String(a.priority)})).length>0?{borderLeft:"solid 5px ".concat(o.priority.filter((function(e){return String(e.value)===String(a.priority)}))[0].color)}:{})}},components:{event:function(e){var t=e.event,r=(pa()(t.startDate).unix("x"),pa()(t.endDate).unix("x"),c.a.getState().db.cards[t._id]);c.a.getState().db.status.filter((function(e){return e.value===r.status}))[0].color;pa()(t.endDate).format("YYYY-MM")===pa()().format("YYYY-MM")&&(pa()(t.endDate).format("DD"),pa()().format("DD"));var n=r.type&&o&&o.dataType&&o.dataType.filter((function(e){return e.name===r.type}))[0]?o.dataType.filter((function(e){return e.name===r.type}))[0].icon:"$__topic";return a.a.createElement(ns,{leaveDelay:800,title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",zIndex:5e3}},a.a.createElement(Dn,{data:r,onlyOption:!0,notGlobalExpanded:!0})))},a.a.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:10,height:"100%",maxWidth:"100%",textOverflow:"ellipsis",overflow:"hidden"}},a.a.createElement("div",{style:{marginRight:5}},a.a.createElement(Oe.a,{overlap:"rectangular",size:"12px",icon:n,color:"bkack",title:Object(S.r)("$__".concat(r.type))})),t.title))},toolbar:cs,month:{dateHeader:function(e){e.date;var t=e.label;return a.a.createElement("div",{style:{color:Object(S.d)("menu"),cursor:"pointer"}},t)}},week:{dateHeader:function(e){e.date;var t=e.label;return a.a.createElement("div",{style:{color:Object(S.d)("menu"),cursor:"pointer"}},t)}}},onNavigate:function(e,t,r){j&&pa()(e).format("YYYY-MM")===pa()(j).format("YYYY-MM")||E(e),"NEXT"!==r&&"PREV"!==r&&"TODAY"!==r&&"DATE"!==r&&_(r)},view:x,onEventResize:function(t){Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:t.event._id}}),{startDate:pa()(t.start).unix("x"),endDate:pa()(t.end).unix("x")})},onEventDrop:function(t){Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:t.event._id}}),{startDate:pa()(t.start).unix("x"),endDate:pa()(t.end).unix("x")})},showMultiDayTimes:!0,showAllEvents:F,popup:!0,resizable:!0,defaultView:"week"}))),a.a.createElement("div",{style:{height:300,width:"100%"}}))))})),ss=(r(1534),r(1839)),us=r(580);function ds(){ds=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ps=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=c.a.getState(),n=r.session,a=r.db,o=Object(d.a)({},e),i=Object(d.a)({},e._parent&&c.a.getState().db.cards[e._parent]?c.a.getState().db.cards[e._parent]:{});Object.keys(o).map((function(e){o[e]||delete o[e]}));var l=o.name.trim().split("\n"),s=t,u={},h={};return o.users.map((function(e,t){var r=Object(d.a)({},0===t?Object(d.a)({access:5,isResponsible:!0},(null===i||void 0===i?void 0:i.showInPanel)?{channel:!0}:{}):{access:5});i&&a.cards[i._id]&&a.cards[i._id]._users&&a.cards[i._id]._users[e]&&(r=a.cards[i._id]._users[e]);var n=a.users[e];h=Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({_id:e,name:n.name,image:n.image||null},r),{},{myDay:null})))})),l.map(function(){var e=Object(p.a)(ds().mark((function e(t,r){var a,l;return ds().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.trim()&&(l=Object($t.a)(),ut.a.post("card/add",Object(d.a)(Object(d.a)(Object(d.a)({_id:l},o),i.showInPanel?{channel:!0}:{}),{},{name:t},"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)})),o.channel&&delete o.channel,u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},l,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({_id:l},o),{},{name:t,_users:h},i.showInPanel?{_createdBy:{name:c.a.getState().db.users[n._id].name,image:c.a.getState().db.users[n._id].image,_id:n._id,channel:!0}}:{}),i._planId?{_planId:i._planId}:{}),"plan"===i.type?{_planId:i._id}:{}),"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)}))),(null===(a=u[l])||void 0===a?void 0:a.users)&&delete u[l].users,s+=1);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),u};function fs(){fs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){c.a.getState().session;var t=[],r=c.a.getState().db.cards[e.nodeId]||{},n=a.a.useState(!1),o=Object(h.a)(n,2),i=o[0],l=(o[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0];s[1];if(r.automationUsers&&"doNotChange"!==r.automationUsers&&"remove"!==r.automationUsers&&r._users&&Object.keys(r._users).length>0){var m=c.a.getState().db.users[c.a.getState().session._id]||{},g=Object(d.a)(Object(d.a)({},"add"===r.automationUsers?Object(f.a)({},m._id,{_id:m._id,name:m.name,image:m.image||null}):{}),r._users);Object.keys(g).sort((function(e,t){return g[e].isResponsible?-1:1})).map((function(e,r){-1===t.indexOf(e)&&t.push(e)}))}var b=a.a.useState(t.length>0?t:[c.a.getState().session._id]),v=Object(h.a)(b,2),y=v[0],x=v[1],O=a.a.createRef(),w=a.a.createRef(),j=a.a.createRef(),k=a.a.createRef({}),L=function(){var t=Object(p.a)(fs().mark((function t(n){var a,o;return fs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k&&(!k.current||k.current&&!k.current.loading)&&(k.current=Object(d.a)(Object(d.a)({},k.current),{},{loading:!0}),a=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({name:O.current.value,_parent:e.nodeId,myDay:!!e.myDay,type:e.type?e.type:"task",status:e.status?e.status:"notStarted",users:y},e.checklist&&n?{checklist:!0}:{}),e.initialData?e.initialData:{}),w&&w.current&&w.current.value?{description:w.current.value}:{}),j&&j.current&&j.current.getValue()?{value:j.current.getValue()}:{}),r&&r.automationDueDateType&&"add"===r.automationDueDateType&&(a=Object(d.a)(Object(d.a)({},a),{},{startDate:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X"),endDate:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add((null===r||void 0===r?void 0:r.automationDueDate)||1,"days").unix("X")})),r&&r.automationStatusType&&"replace"===r.automationStatusType&&(a=Object(d.a)(Object(d.a)({},a),{},{status:r.automationStatus||"notStarted"},r.automationStatus&&"completed"===r.automationStatus?{completed_at:_()().unix("x")}:{})),(o=ps(a,e.rows||0,e))&&(e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),o)})),e.onSave&&e.onSave())),k.current=Object(d.a)(Object(d.a)({},k.current),{},{loading:!1}),e.onCancel&&e.onCancel();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:Object(d.a)({position:"absolute",top:0,left:0,bottom:0,right:0,backgroundColor:e.backgroundColor||"rgba(250,250,250,0.77)",width:"100%",padding:"7px",display:"flex",alignItems:"center"},e.styles?e.styles:{})},a.a.createElement("div",{style:{width:"calc(100% - 50px)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3}},e.placeHolder?e.placeHolder:Object(S.r)(e.checklist&&!e.myDay?"$__newSimpleTask":"$__newSubActivity")),e.explain?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3,color:Object(S.d)("menu")}},e.explain):a.a.createElement(a.a.Fragment,null),a.a.createElement(us.a,{ref:O,style:{width:"100%",padding:7,border:"none",borderBottom:"solid 1px ".concat(Object(S.d)("color")),background:"none",resize:"none",fontFamily:"inherit",fontSize:14},onKeyDown:function(t){var r=t.which||t.keyCode;return 13!==r||t.shiftKey?13===r&&t.shiftKey&&O.current&&O.current.value&&0===O.current.value.trim().length?(t.preventDefault(),void(O.current.value="")):void(27===r&&e.onCancel&&e.onCancel()):(t.preventDefault(),void(O.current&&O.current.value&&O.current.value.trim().length>0&&L(!(!e.checklist||e.myDay))))},autoFocus:!0}),(r.requireDescription||u)&&a.a.createElement(tt,{inputRef:w,label:Object(S.r)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"description",color:"lightgray"}))},placeholder:Object(S.r)("$__description",1)}),(r.requireValue||i)&&a.a.createElement(wo,{label:Object(S.r)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:j,ref:j}),a.a.createElement(Ht,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,noLimit:!0,multiple:!0,onSelect:function(e){x(e)},selected:y,transparent:!0})),a.a.createElement("div",{style:{}},a.a.createElement(E.a,{id:"sideModule_saveButton",title:e.placeHolder||Object(S.r)("$__save",1),color:"green",icon:"save",onClick:function(){!O.current.value||O.current.value&&""===O.current.value.trim()?O.current.focus():L(!(!e.checklist||e.myDay))},size:"25px"}),a.a.createElement(E.a,{id:"sideModule_saveButton",title:Object(S.r)("$__cancel",1),color:Object(S.d)("medium"),icon:"cancel",onClick:function(){e.onCancel&&e.onCancel()},size:"25px"})))}));var hs=r(1026),ms={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}};var gs=Object(s.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ms)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=Object.keys(r.cards).filter((function(e){var t;if(r.cards[e]&&"step"===r.cards[e].type&&r.cards[e].showInPanel&&(null===(t=r.cards[e].showGroups)||void 0===t?void 0:t.filter((function(e){var t,a;return(null===(t=r.users[n._id])||void 0===t||null===(a=t.groups)||void 0===a?void 0:a.filter((function(t){return t.value===e.value})).length)>0})).length)>0)return!0})).sort((function(e,t){var n=r.cards[e].name.toLowerCase().trim(),a=r.cards[t].name.toLowerCase().trim();return n<a?-1:n>a?1:0})).map((function(e){return r.cards[e]}));return 0===u.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{width:"100%",position:"relative",float:"left",clear:"both"}},u&&u.length>0?a.a.createElement(un,{style:{paddingLeft:15,paddingRight:15,boxShadow:"0 5px 7px 1px rgba(0,0,0,0.03)",backgroundColor:"rgba(250,250,250,0.07)",paddingBottom:33}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center"}},Object(S.r)("$__myChannels"),a.a.createElement("div",{style:{padding:3,backgroundColor:"rgba(250,250,250,1)",marginLeft:15},onClick:function(){s((function(e){return!e}))}},l?"Fazer nova solicita\xe7\xe3o":"Ver minhas solicita\xe7\xf5es")),l?a.a.createElement(fn,{xs:12,sm:6,md:6,style:{paddingTop:33,padding:7}},a.a.createElement("fieldset",{style:{backgroundColor:"#FFFFFF",borderRadius:7,marginTop:15}},a.a.createElement("legend",null,Object(S.r)("$__legends")),a.a.createElement("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{alignItems:"center",display:"flex"}},a.a.createElement("div",{style:{height:10,width:30,backgroundColor:"#02b915",borderRadius:7,marginRight:7}}),a.a.createElement("div",null,Object(S.r)("$__completedStep"))),a.a.createElement("div",{style:{alignItems:"center",display:"flex"}},a.a.createElement("div",{style:{height:10,width:30,backgroundColor:"#00a2e9",borderRadius:7,marginRight:7}}),a.a.createElement("div",null,Object(S.r)("$__actualStep"))),a.a.createElement("div",{style:{alignItems:"center",display:"flex"}},a.a.createElement("div",{style:{height:10,width:30,backgroundColor:"#e9e9e9",borderRadius:7,marginRight:7}}),a.a.createElement("div",null,Object(S.r)("$__stepNotStarted"))))),Object.keys(r.cards).filter((function(e){var t,n;return null===(t=r.cards[e])||void 0===t||null===(n=t._createdBy)||void 0===n?void 0:n.channel})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:"ch".concat(t,"-").concat(e)},a.a.createElement(hs.a,{db:"cards",data:r.cards[e],noShadow:!0}))}))):a.a.createElement(a.a.Fragment,null),!l&&u.map((function(t){return a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2,key:t._id,style:{marginTop:"33px",cursor:"pointer",padding:5},onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:t._id,rows:0}}))}},a.a.createElement("div",{style:{backgroundColor:"#FFFFFF",borderRadius:7}},a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),fontWeight:"bold",fontSize:14}},t.shortCutTitle),a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),fontSize:12}},t.shortCutDescription),a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),fontWeight:"bold",fontSize:16}},t.shortCutButtonToAdd)))}))):a.a.createElement(a.a.Fragment,null))}))),bs=r(1027),vs=r.n(bs),ys=r(1028),xs=r.n(ys);function _s(){_s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Os=Object(s.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ms)((function(e){var t,r=c.a.getState(),n=r.db,o=r.session,l=n.dataType,s=n.users,u=a.a.useState(!1),d=Object(h.a)(u,2),m=d[0],g=d[1],b=a.a.useState("EndDate"),v=Object(h.a)(b,2),y=v[0],x=v[1],O=Object(ss.a)(["banner"]),w=Object(h.a)(O,2),j=w[0],k=w[1],L=[],C=function(){var e=Object(p.a)(_s().mark((function e(){var t;return _s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.a.getState().functions.socket,k("banner",!0,{path:"/"});try{t.emit("data",{module:"user",method:"post",action:"preffers"},{hideSupportAndAppBanner:!0},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}))}catch(r){console.log(r)}case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();L=Object.keys(c.a.getState().db.cards).filter((function(t){return c.a.getState().db.cards[t]&&!c.a.getState().db.cards[t].checklist&&l.filter((function(e){return e.name===c.a.getState().db.cards[t].type})).length>0&&(!e.hidePrivate||e.hidePrivate&&!c.a.getState().db.cards[t].private)})).map((function(e){return c.a.getState().db.cards[e]}));var I=_()().format("YYYY-MM-DD"),T=window.location.hash.split("/");T[0]=T[0].replace("#","");var F=String(o.dashboard.period).replace("$__last","");F=F.replace("Days","");var N=L.filter((function(t){if(t&&t._users&&!t.deleted&&!t.checklist&&t._users[o._id]&&"completed"!==t.status&&(t._users[o._id].myDay&&_()(new Date(1e3*t._users[o._id].myDay)).tz("America/Sao_Paulo").unix("x")>=_()().subtract(15,"days").unix("x")&&_()(new Date(1e3*t._users[o._id].myDay)).tz("America/Sao_Paulo").unix("x")<_()(new Date(I)).unix("x")||t._users[o._id].isResponsible&&(t.endDate&&_()(new Date(1e3*t.endDate)).tz("America/Sao_Paulo").unix("x")<_()().unix("x")||t.startDate&&_()(new Date(1e3*t.startDate)).tz("America/Sao_Paulo").unix("x")>_()(new Date(I)).subtract(15,"days").unix("x"))&&(t._users[o._id]&&!t._users[o._id].myDay||t._users[o._id].myDay&&_()(new Date(1e3*t._users[o._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")!==I&&_()(new Date(1e3*t._users[o._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>_()(new Date).tz("America/Sao_Paulo").subtract(30,"d").format("YYYY-MM-DD")))&&(!e.hidePrivate||e.hidePrivate&&!t.private))return!0})).sort((function(e,t){var r,n,a,o;return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e&&e.name&&t&&t.name&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e&&e.name&&t&&t.name&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String((null===(r=e.order)||void 0===r?void 0:r.low)||0)&&String((null===(n=t.order)||void 0===n?void 0:n.low)||0)&&parseInt((null===(a=e.order)||void 0===a?void 0:a.low)||0)<parseInt((null===(o=t.order)||void 0===o?void 0:o.low)||0)?-1:1})).map((function(t,r){return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(Dn,{db:"cards",data:t,noShadow:!0}),a.a.createElement(H.a,{onClick:function(){Object(st.K)(e,{_id:t._id,userId:o._id,option:!0})}},a.a.createElement(ae.a,{icon:"add",color:Object(S.d)("menu"),title:Object(S.r)("$__addOnMyDay")})))})),D=L.filter((function(e){return"completed"!==e.status&&e.name&&!e.deleted&&!e.archived&&e._users&&e._users[o._id]&&(!e._users[o._id].myDay||e._users[o._id].myDay&&_()(new Date(1e3*e._users[o._id].myDay)).tz("America/Sao_Paulo").format("YYYY-MM-DD")!==I)&&(e.endDate&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=_()(new Date(I)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&_()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=_()(new Date(I)).add(10,"days").format("YYYY-MM-DD"))})).sort((function(e,t){var r=e.name.toLowerCase().trim(),n=t.name.toLowerCase().trim();return"IniDate"===y&&(r=parseInt(e.startDate),n=parseInt(t.startDate)),"EndDate"===y&&(r=parseInt(e.endDate),n=parseInt(t.endDate)),r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement(Dn,{db:"cards",key:e._id,data:e,noShadow:!0})})),A=s&&Object.keys(s).length>0?s[Object.keys(s).find((function(e){return o&&o._id&&s[e]&&s[e]._id&&s[e]._id.indexOf(o._id)>-1}))]:{},P=new Date,z=P.getHours()>=0&&P.getHours()<5?"$__goodNight":P.getHours()>=5&&P.getHours()<12?"$__goodMorning":P.getHours()>=12&&P.getHours()<18?"$__goodAfternoon":"$__goodNight",M=Object.keys(n.cards).filter((function(t){return n.cards[t]&&!n.cards[t].deleted&&!n.cards[t].archived&&"plan"===n.cards[t].type&&n.cards[t]._users&&n.cards[t]._users[o._id]&&"completed"!==n.cards[t].status&&n.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!n.cards[t].private)}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(un,null,j.banner||o.hideSupportAndAppBanner?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",marginBottom:"33px"},id:"view_dashboard_welcomeMessage"},a.a.createElement("div",{style:{fontSize:"16px",padding:"15px 0",fontWeight:"bold",width:"100%",textAlign:"left",color:Object(S.d)("menu"),paddingLeft:"15px"}},Object(S.r)(z,1),", ",A&&A.displayName?A.displayName:A.name?A.name:"","!"),a.a.createElement(un,{style:{width:"100%"}},a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("img",{src:xs.a,width:800,height:610,style:{width:"100%",height:"auto",borderRadius:17,boxShadow:"0 0 7px 1px rgba(0,0,0,0.1)"}})),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{position:"relative",paddingBottom:33,height:"100%"}},a.a.createElement("div",{style:{fontSize:"16px",color:Object(S.d)("medium"),paddingRight:15},dangerouslySetInnerHTML:{__html:Object(S.o)(Object(S.r)("$__supportWelcomeMessage",1))}}),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},a.a.createElement(E.a,{title:Object(S.r)("$__clickToaccessSupportPage","*"),text:Object(S.r)("$__clickToaccessSupportPage"),color:Object(S.d)("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("img",{src:vs.a,width:800,height:640,style:{width:"100%",height:"auto"}}),a.a.createElement("div",{style:{position:"absolute",bottom:-33,right:15,zIndex:10}},a.a.createElement(E.a,{title:Object(S.r)("$__hideSupportAndAppBanner","*"),text:Object(S.r)("$__hideSupportAndAppBanner"),color:Object(S.d)("menu"),icon:"close",onClick:function(){C()},size:"12px"})))))),M.length>0?a.a.createElement(un,{style:{marginTop:"33px",marginBottom:"33px"}},a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12,id:"view_dashboard_favorites",style:{boxShadow:"0 5px 7px 1px rgba(0,0,0,0.03)",backgroundColor:"rgba(250,250,250,0.07)",paddingBottom:33}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:33}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.r)("$__favoritePlans"),M.length>3?a.a.createElement(E.a,{title:"".concat(Object(S.r)("$__viewAllFavorites","*")," (").concat(M.length,")"),text:"".concat(Object(S.r)("$__viewAllFavorites","*")," (").concat(M.length,")"),color:Object(S.d)("menu"),icon:"favorite",transparent:!0,onClick:function(){i.a.push("sp#tab/home")},size:"25px"}):a.a.createElement(a.a.Fragment,null)),a.a.createElement(un,{style:{flexDirection:"row",overflowY:"auto",flexWrap:"nowrap",display:"-webkit-inline-box"}},M.sort((function(e,t){var r=n.cards[e].updated_at&&n.cards[e].updated_at.low?n.cards[e].updated_at.low:0,a=n.cards[t].updated_at&&n.cards[t].updated_at.low?n.cards[t].updated_at.low:0;return r>a?-1:r<a?1:0})).map((function(e,t){if(t<6)return a.a.createElement(fn,{xs:12,sm:6,md:4,lg:3,xl:2,key:n.cards[e]._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){i.a.push("sp#".concat(n.cards[e]._id,"/dashboard"))}},a.a.createElement(Dn,{data:n.cards[e],expanded:!0,Avatar:!0,ignoreList:!0}))})))),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),a.a.createElement($,null,a.a.createElement(gs,null)),a.a.createElement(un,{style:{paddingBottom:33,marginTop:33}},a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_myDay"},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px"}},m?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px",display:"flex",alignItems:"center"}},a.a.createElement(H.a,{onClick:function(){g(!1)}},a.a.createElement(ae.a,{icon:"undo",color:Object(S.d)("menu"),title:Object(S.r)("$__backToMyDay")})),Object(S.r)("$__taskSuggestions")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("medium"),fontWeight:"bold",fontSize:"12px",marginBottom:"16px",display:"flex",alignItems:"center"},id:"view_dashboardSuggestionsAddButton"},"Clique no + para adicionar as tarefas ao seu dia."),a.a.createElement("div",null,N)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(S.r)("$__myDay"),N.length>0&&a.a.createElement("div",{style:(t={color:Object(S.d)("menu"),fontSize:"16px",marginTop:"7px",cursor:"pointer",textAlign:"left",padding:"7px"},Object(f.a)(t,"color","#f50057"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),t),onClick:function(){g(!0)},id:"view_dashboard_myDaySuggestionsOptions"},a.a.createElement(ae.a,{icon:"info",color:Object(S.d)("medium"),style:{marginRight:"15px"}}),Object(S.r)("$__clickHereToCheckTaskSuggestions"))),a.a.createElement(br,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_nextTasks"},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(S.r)("$__nextTasks")),a.a.createElement("div",null,a.a.createElement(E.a,{title:Object(S.r)("$__orderBy".concat(y)),color:"lightgray",icon:"IniDate"===y?"today":"EndDate"===y?"event":"text_rotate_vertical",onClick:function(){"IniDate"===y&&x("EndDate"),"EndDate"===y&&x("name"),"name"===y&&x("IniDate")},size:"21px",style:{padding:"0px !important"}}))),a.a.createElement("div",null,D)))))}))),ws=(r(1541),r(295)),js=r.n(ws);var Es=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ms)((function(e){var t=c.a.getState().session;a.a.useEffect((function(){return function(){}}),[]);var r=0;return t&&t.GlobalData&&(t.GlobalData.message&&(r+=1),t.GlobalData.history&&(r+=1),t.GlobalData.vocation&&(r+=1),t.GlobalData.legacy&&(r+=1)),a.a.createElement("div",{style:{width:"100%"}},r?a.a.createElement(un,null,t.GlobalData.strategicStatement?a.a.createElement(fn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ii,{style:{height:"calc(100% - 33px)"}},a.a.createElement(at,{title:Object(S.r)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.strategicStatement}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.message?a.a.createElement(fn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ii,{style:{height:"calc(100% - 33px)"}},a.a.createElement(at,{title:Object(S.r)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.message}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.vocation?a.a.createElement(fn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ii,{style:{height:"calc(100% - 33px)"}},a.a.createElement(at,{title:Object(S.r)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.vocation}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.history?a.a.createElement(fn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ii,{style:{height:"calc(100% - 33px)"}},a.a.createElement(at,{title:Object(S.r)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.history}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.values?a.a.createElement(fn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ii,{style:{height:"calc(100% - 33px)"}},a.a.createElement(at,{title:Object(S.r)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.values}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.legacy?a.a.createElement(fn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ii,{style:{height:"calc(100% - 33px)"}},a.a.createElement(at,{title:Object(S.r)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.legacy}}))))):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),a.a.createElement($,null,a.a.createElement(Os,null)),a.a.createElement(un,{style:{paddingBottom:33}},a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.r)("$__lastNews","*")),a.a.createElement(E.a,{title:Object(S.r)("$__save","*"),text:Object(S.r)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement($,null,a.a.createElement($l,{max:6,horizontal:!0})))),a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.r)("$__lastAddRadar","*")),a.a.createElement(E.a,{title:Object(S.r)("$__save","*"),text:Object(S.r)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement($,null,a.a.createElement(jl,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.r)("$__lastAddInsights","*")),a.a.createElement(E.a,{title:Object(S.r)("$__save","*"),text:Object(S.r)("$__viewAllInsights"),color:"white",icon:js.a,transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement($,null,a.a.createElement(xl,{max:6,horizontal:!0,noPagination:!0}))))))}))),Ss=r(599),ks=r.n(Ss);var Ls=function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(r.dataType,e.data),i=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),l=a.a.useState(null),s=Object(h.a)(l,2),u=s[0],d=s[1],p=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]})).map((function(e){return c.a.getState().db.cards[e]})).filter((function(e){return e._users&&!e.checklist&&!e.deleted&&e._users[o._id]&&e._users[o._id].myDay&&(!e.private||e.private&&e._users[n._id])&&_()(new Date(1e3*parseInt(e._users[o._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===i})).sort((function(e,t){return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e,t){return a.a.createElement(Dn,{db:"cards",key:t,data:e,showStatus:!0,onlyOption:!0})}));return a.a.createElement("div",{style:{width:"100%",minHeight:"120px",backgroundColor:"#FFFFFF",boxShadow:"0 0 9px 3px rgba(0,0,0,0.2)",position:"relative"}},a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),height:"43px",paddingLeft:"45px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(o.name,o.name)," (",p.length,")")),!u||o.image&&o.image!==u?a.a.createElement("img",{style:{width:"37px",height:"37px",top:"3x",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color"))},src:"".concat(o.image?o.image:ks.a),onError:function(e){e.target.src="".concat(ks.a)},onLoad:function(e){d("".concat(o.image?o.image:ks.a))},width:"100%"}):a.a.createElement("div",{style:{width:"37px",height:"37px",top:"3px",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color")),backgroundImage:'url("'.concat(u,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",maxHeight:"calc(50vh - 90px)",overflowX:"auto"}},p)))};function Cs(){Cs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Is=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ms)((function(e){var t=c.a.getState().db,r=t.dataType,n=t.users,o=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=Object(S.j)();if(a.a.useEffect((function(){return s||(c.a.getState().session.cards.adminViewLoader||m(),u(!0)),function(){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminView:!1})}))}}),[]),f&&f.plan&&!f.planAdmin&&!f.planModerate)return a.a.createElement(a.a.Fragment,null);var m=function(){var t=Object(p.a)(Cs().mark((function t(r){return Cs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminView:!c.a.getState().session.cards.adminView})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&r.filter((function(t){return t.name===c.a.getState().db.cards[e].type})).length>0})).map((function(e){return c.a.getState().db.cards[e]})),b=Object.keys(n).filter((function(e){return!n[e].deleted&&"user"===n[e].type&&(!n[e]._parent||""===n[e]._parent)&&g.filter((function(t){return t._users&&t._users[e]&&t._users[e].myDay&&_()(new Date(1e3*parseInt(t._users[e].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===o})).length>0})).sort((function(e,t){return n[e].name<n[t].name?-1:n[e].name>n[t].name?1:0})).map((function(e){return n[e]}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12,style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{fontSize:"33px",padding:"15px 0",fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.r)("$__dayTasks",1))),b.map((function(e){return a.a.createElement(fn,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},a.a.createElement(Ls,{data:e}))}))))})));var Ts=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ms)((function(){var e=window.location.hash.split("/");return e[0]=e[0].replace("#",""),a.a.createElement("div",null,a.a.createElement(fl,null),"tab"===e[0]&&"resume"===e[1]&&a.a.createElement($,null,a.a.createElement(Es,null)),"tab"===e[0]&&"dayTasks"===e[1]&&a.a.createElement($,null,a.a.createElement(Is,null)))}))),Fs=function(){return{contentCenter:{position:"absolute",top:"50%",left:"50%",zIndex:"3",transform:"translate(-50%,-50%)",textAlign:"center",color:W.O,padding:"0 15px",width:"100%",maxWidth:"880px"},title:Object(d.a)(Object(d.a)({},W.H),{},{fontSize:"13.7em",color:W.O,letterSpacing:"14px",fontWeight:"700"}),subTitle:{fontSize:"2.25rem",marginTop:"0",marginBottom:"8px"},description:{fontSize:"1.125rem",marginTop:"0",marginBottom:"8px"}}},Ns=Object(z.a)(Fs);function Ds(){Ds=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var As=Object(s.b)((function(e){return{showPrivate:e.controls.lockPrivate,history:e.db.history,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(null),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState([]),y=Object(h.a)(v,2),x=(y[0],y[1]),_=a.a.useState(0),O=Object(h.a)(_,2),w=O[0],j=O[1],k=a.a.useState(10),L=Object(h.a)(k,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(h.a)(T,2),N=F[0],D=(F[1],a.a.useState(P)),A=Object(h.a)(D,2),P=A[0],$=(A[1],a.a.useState([])),z=Object(h.a)($,2),M=z[0],B=z[1],Y=a.a.useState(0),R=Object(h.a)(Y,2),G=R[0],H=R[1],W=a.a.useState("created_at"),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(!0),K=Object(h.a)(X,2),J=K[0],Z=K[1],Q=a.a.useState(""),ee=Object(h.a)(Q,2),te=ee[0],re=ee[1],ne=a.a.useState(!0),oe=Object(h.a)(ne,2),ie=oe[0],ce=oe[1],le=a.a.useState({}),se=Object(h.a)(le,2),ue=se[0],de=se[1],pe=a.a.useState(""),fe=Object(h.a)(pe,2),he=fe[0],me=fe[1],ge=a.a.useState({all:{name:Object(S.r)("$__all",1),icon:"inventory",open:!1,size:0,type:"all"},users:{name:Object(S.r)("$__users",1),open:!1,size:0,type:"user"},plans:{name:Object(S.r)("$__plans",1),open:!1,size:0,type:"plan"},myCards:{name:Object(S.r)("$__unlinkedCards",1),open:!1,size:0,type:"myTask"}}),be=Object(h.a)(ge,2),ve=(be[0],be[1],window.location.hash.split("/"));ve[0]=ve[0].replace("#","");var ye=null;ve[0]&&36===ve[0].length&&c.a.getState().db.cards[ve[0]]&&c.a.getState().db.cards[ve[0]]._users&&c.a.getState().db.cards[ve[0]]._users[n._id]&&(ye=ve[0]),a.a.useEffect((function(){return xe({id:ye}),ei(),function(){B([]),de({}),ce(!0)}}),[]),a.a.useEffect((function(){g&&_e({id:g})}),[g]),a.a.useEffect((function(){j(0),ce(!0),x([]),l||s(!0);var e=setTimeout((function(){te&&_e({id:ye})}),1e3);return function(){return clearTimeout(e)}}),[te]),a.a.useEffect((function(){_e({id:ye})}),[N,w,C,V,J]);var xe=function(){var e=Object(p.a)(Ds().mark((function e(t,r){var n,a;return Ds().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ei({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||ue,ye&&(a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},ye,{name:c.a.getState().db.cards[ye].name,parent:c.a.getState().db.cards[ye]._parent,private:null,type:"plan",_id:ye,open:!0}))),n.map((function(e){a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},a[e._id]?a[e._id]:{}),e)))})),de(a));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),_e=function(){var e=Object(p.a)(Ds().mark((function e(t){var r;return Ds().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ti({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:C,skip:w*C,asc:!J,orderBy:V||"created_at",search:te});case 2:(r=e.sent)&&(H(r&&r[0]&&r[0].total?parseInt(r[0].total):0),B(r),ce(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Oe=[],we=function(e){var t=V,r=J;V===e?r=!J:t=e,q(t),Z(r)},je=function(){var e=Object(p.a)(Ds().mark((function e(t){var r,n,a,o,i,c,l=arguments;return Ds().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=l.length>1&&void 0!==l[1]&&l[1],n=t.id,a=void 0===n?null:n,o=t.type,i=void 0===o?null:o,c=ue,c=Object(d.a)(Object(d.a)({},c),{},Object(f.a)({},a,Object(d.a)(Object(d.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(ue).filter((function(e){return ue[e].parent===a})).length?xe({id:a,type:i},c):de(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ee=function(t,n){return a.a.createElement("div",{key:n,style:{cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7},onClick:function(e){(!t.private||t.private&&c.a.getState().controls.lockPrivate)&&(je({id:n},!ue[n]||!ue[n].open),b(n)),e.preventDefault(),e.stopPropagation()}},a.a.createElement(at,{private:!(!t.private||c.a.getState().controls.lockPrivate),unlockedPrivates:e.unlockedPrivates,setPrivate:function(t){var r=t?1:-1;t||0!==e.unlockedPrivates||(r=0),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,title:t.name,tooltipText:"".concat(t.private&&!c.a.getState().controls.lockPrivate?Object(S.r)("$__private"):t.name),icon:t.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===t.type}))[0].icon||"$__topic",fontSize:"12px"}),ue[n]&&ue[n].open?Se(n):a.a.createElement(a.a.Fragment,null))},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(ue).filter((function(t){return!e||e&&ue[t].parent===e})).length>0?Object.keys(ue).filter((function(t){return!e||e&&ue[t].parent===e})).sort((function(e,t){return ue[e].name.toLowerCase().trim()<ue[t].name.toLowerCase().trim()?-1:ue[e].name.toLowerCase().trim()>ue[t].name.toLowerCase().trim()?1:0})).map((function(e){return Ee(ue[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},a.a.createElement("div",{style:{backgroundColor:"#FFFFFF",position:"relative",padding:"7px 15px",float:"right",boxShadow:"0px 0px 7px 3px rgba(0,0,0,0.1)",display:"flex",alignItems:"center"}},a.a.createElement(tt,{label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:te,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(e){re(e.target.value)},onKeyDown:function(e){}}}),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(E.a,{id:"sideModule_saveButton",title:"created_at"===V&&J?Object(S.r)("$__mostRecent",1):Object(S.r)("$__olderFirst",1),color:"created_at"===V?Object(S.d)("color"):"gray",icon:"calendar_month",onClick:function(){we("created_at")},size:"25px"}),"created_at"===V&&a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},J?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(ae.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},J?"south":"north"))),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(E.a,{id:"sideModule_saveButton",title:"name"===V&&J?Object(S.r)("$__nameDesc",1):Object(S.r)("$__nameAsc",1),color:"name"===V?Object(S.d)("color"):"gray",icon:"sort_by_alpha",onClick:function(){we("name")},size:"25px"}),"name"===V&&a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},J?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(ae.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},J?"south":"north")))),a.a.createElement("div",{style:{position:"relative",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 7px 3px rgba(0,0,0,0.1)",clear:"both",marginTop:-10,minHeight:"calc(100vh - 150px)"}},a.a.createElement("div",{style:{position:"absolute",width:333,height:"100%",minHeight:1,padding:15,backgroundColor:"#f4f4f4",borderRight:"solid 0.77px lightGray",display:"flow-root"}},a.a.createElement("div",{style:{display:"flex",marginTop:-10}},a.a.createElement(at,{title:Object(S.r)("$__folders",1),icon:"folder",fontSize:"20px",color:Object(S.d)("menu")}),a.a.createElement(tt,{label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:he,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){me(e.target.value)},onKeyDown:function(e){}}})),a.a.createElement("div",{style:{position:"relative",height:"calc(100% - 33px)",overflowX:"auto",backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"solid 0.5px rgba(0,0,0,0.1)",padding:15}},Object.keys(ue).filter((function(e){return((!ve[0]||ve[0]&&36!==ve[0].length)&&!ue[e].parent||ve&&ve[0]&&36===ve[0].length&&ue[e]._id===ve[0])&&(""===he||he&&ue[e].name.toLowerCase().indexOf(he.toLowerCase().trim())>-1)})).sort((function(e,t){return ue[e].name.toLowerCase().trim()<ue[t].name.toLowerCase().trim()?-1:ue[e].name.toLowerCase().trim()>ue[t].name.toLowerCase().trim()?1:0})).map((function(e){return Ee(ue[e],e)})))),a.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:333,width:"calc(100% - 333px)",overflowY:"auto"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",minWidth:177}},a.a.createElement(at,{title:Object(S.r)("$__files",1),icon:"cloud",fontSize:"20px",color:Object(S.d)("menu")})),a.a.createElement("div",{style:{position:"relative",float:"right",display:"flex",alignItems:"center",marginTop:-10}},Object(S.r)("$__page")," ",w+1," ",Object(S.r)("$__of")," ",Math.ceil(G/C),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:G,page:w,onPageChange:function(e,t){j(t)},rowsPerPage:C,onRowsPerPageChange:function(e){I(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__filesPerPage")})))),ie?a.a.createElement(Or,null):M&&M.length>0?M.map((function(t,r){Oe.push(t.data);var o=Object(d.a)(Object(d.a)({},t.data),{},{createdBy:t.createdBy,in:t.in});return a.a.createElement("div",{key:"file_".concat(o._id).concat(r),style:{position:"relative",width:"100%",paddingTop:"7px",paddingLeft:"15px",clear:"both"}},a.a.createElement(di,{data:o,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:Oe,file:t})}(o._id)},admin:!!(o.createdBy._id===n._id||o.in._id===n._id||o.access&&parseInt(o.access)>2)}),a.a.createElement("div",{style:{clear:"both"}}))})):a.a.createElement(a.a.Fragment,null),G>10?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",w+1," ",Object(S.r)("$__of")," ",Math.ceil(G/C),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:G,page:w,onPageChange:function(e,t){j(t)},rowsPerPage:C,onRowsPerPageChange:function(e){I(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__filesPerPage")}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{style:{clear:"both"}})))})),Ps=r(739),$s=r.n(Ps),zs=(r(1542),r(719)),Ms=r.n(zs);function Bs(){Bs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var Ys="true"===String("true")?"".concat(String("CHEexohmzAHNEotLM0O.WzoOsvjRwlKh/sKKI2AFWaeL7zo4hC")):"".concat(String("qfUeuPdCjDALnPLSJvOVP3tffkxXKETIr9fzoj/kU6acJvFyc")),Rs=Object(z.a)(Hc);var Gs=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({email:null,password:null}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(h.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(null),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.a)(_,2),w=O[0],j=O[1],E=Rs(),k=function(){var t=Object(p.a)(Bs().mark((function t(){var r,a,o,i;return Bs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(-1!==window.location.origin.indexOf("localhost")||-1!==window.location.origin.indexOf("hom2022")||-1!==window.location.origin.indexOf("homologation")||-1!==window.location.origin.indexOf("a1b2c3d4")||-1!==window.location.origin.indexOf("192.168")||!(window.location.origin.indexOf("sonne.machen")>-1&&-1===n.email.indexOf("@sonne.global")||-1===window.location.origin.indexOf("sonne.machen")&&n.email.indexOf("@sonne.global")>-1)){t.next=4;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.r)("$__emailDomainNotPermitedForThisAddress",1))}),t.next=33;break;case 4:if(n.email){t.next=8;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.r)("$__alertLoginEmptyEmail",1))}),t.next=33;break;case 8:if(n.password){t.next=12;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.r)("$__alertLoginEmptyPassword",1))}),t.next=33;break;case 12:return j(!0),t.next=15,$s.a.hash(String(n.password),10);case 15:return r=t.sent,t.next=18,$s.a.hash(String(n.password),10);case 18:if(a=t.sent,!(o=Object(se.encode)("".concat(a,"//").concat(Ys)))){t.next=32;break}return t.prev=21,t.next=24,dt.a.post("/Login",Object(se.encode)(Object(se.encode)(JSON.stringify({lp:o,login:n.email,password:Object(se.encode)("".concat(r,"///").concat(Object(se.encode)(n.password),"///").concat(a))}))));case 24:(i=t.sent)&&(i.data&&400===i.data.code?e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.r)("$__".concat(i.data.error),1))}):i&&i.data&&i.data.twoFactor?(x(i.data.token),g(!0)):i.data.token&&(localStorage.setItem("TOKEN",i.data.token),e.callback&&e.callback({fn:"login",token:i.data.token}))),t.next=32;break;case 28:t.prev=28,t.t0=t.catch(21),console.log(t.t0),e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.r)("$__alertServerConectionLogin",1))});case 32:setTimeout((function(){j(!1)}),1500);case 33:case"end":return t.stop()}}),t,null,[[21,28]])})));return function(){return t.apply(this,arguments)}}(),L=function(){var t=Object(p.a)(Bs().mark((function t(){var r;return Bs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(j(!0),l&&(!l||6===l.length)){t.next=5;break}Object(S.c)({message:Object(S.r)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,dt.a.post("/M_User_TwoFactor",{action:"verify",code:l,token:y});case 7:(r=t.sent)&&r.data&&r.data.result?(localStorage.setItem("TOKEN",y),e.callback&&e.callback({fn:"login",token:y})):Object(S.c)({message:Object(S.r)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),s(null);case 10:setTimeout((function(){j(!1)}),1500);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),C=function(){var t=Object(p.a)(Bs().mark((function t(r){var n;return Bs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:Object(S.r)("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,dt.a.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:Object(S.r)("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:Object(S.r)("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:Object(S.r)("$__loginAlertRecoveryError")});case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:E.container},a.a.createElement(un,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(fn,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement(Ii,{db:"cards",login:!0},a.a.createElement(zi,{className:"".concat(E.cardHeader," ").concat(E.textCenter),color:"primary",style:{background:Object(S.d)("ColumnTitleColor"),boxShadow:"0 4px 20px 0 rgba(15,18,35,0.14), 0 7px 10px -5px rgba(15,18,35,0.4)"}},a.a.createElement("h4",{className:E.cardTitle},Object(S.r)("$__login"))),a.a.createElement(Di,null,m?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__token",1)),a.a.createElement(tt,{labelText:"token",id:"token_to_access",name:"token_to_access",formControlProps:{fullWidth:!0},value:l,inputProps:{onKeyDown:function(e){},onChange:function(e){s(e.target.value)},endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(Fa.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(Mc,{labelText:Object(S.r)("$__email"),id:"email",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},{email:e.target.value}))},onLoad:function(e){o(Object(d.a)(Object(d.a)({},n),{},{email:e.target.value}))},endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(Ms.a,{className:E.inputAdornmentIcon}))}}),a.a.createElement(Mc,{labelText:Object(S.r)("$__password"),id:"password",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},{password:e.target.value}))},onLoad:function(e){o(Object(d.a)(Object(d.a)({},n),{},{password:e.target.value}))},onKeyDown:function(e){13===e.keyCode&&k()},endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(Fa.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),a.a.createElement(Ee,{icon:"lock",text:Object(S.r)("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){C(n.email)}}))),a.a.createElement(Gc,{className:E.justifyContentCenter},m?a.a.createElement(X,{style:{backgroundColor:w?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return L()}},Object(S.r)("$__validateTokenAndSigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(Or,null)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(X,{style:{backgroundColor:w?"gray":Object(S.d)("menu"),color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return k()}},Object(S.r)("$__sigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(Or,null)):a.a.createElement(a.a.Fragment,null)))))))})),Hs=Object(z.a)(Fs);var Ws=Object(z.a)(Fs);var Us,Vs={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(d.a)(Object(d.a)({},W.l),{},{padding:"3px 0px",width:"100%",margin:"0px",background:Object(S.d)("ColumnTitleColor"),"&$reverse":{}}),reverse:{flexDirection:"row-reverse"},cardList:{width:"calc(100% - 6px)",padding:"0px",minHeight:"30px","&::-webkit-scrollbar-track":{borderRadius:"0px"},"&::-webkit-scrollbar":{width:"7px"},"&::-webkit-scrollbar-thumb":{background:Object(S.d)("medium"),opacity:"0.5 !important",borderRadius:"0px"}},button:{padding:"3px auto",cursor:"pointer",alignItems:"center",display:"flex",opacity:1,transition:"visibility 0.1s, opacity 0.5s linear"},cardAdd:{position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",display:"block",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",padding:"3px"}};var qs,Xs=w.default.div(Us||(Us=Object(u.a)(["\n margin:0 7px;\n min-width:180px;\n ","\n @media(min-width: 960px) {\n position:relative;\n max-height:",";\n \n ","\n }\n @media(max-width: 959px) {\n float:left;\n position: relative;\n }\n @media(max-width: 599px) {\n float:left;\n position: relative;\n }\n "])),(function(e){return e.columnStyle&&e.columnStyle.width?"width:calc(".concat(e.columnStyle.width," - 14px);"):"width:calc(100% - 14px);"}),(function(e){return e.columnStyle&&e.columnStyle.maxHeight?e.columnStyle.maxHeight:"calc(100% - 0px)"}),(function(e){return e.inLine?"display:block;\n ":"margin-bottom:0px !important;\n ".concat((function(e){return e.columnStyle&&e.columnStyle.width?"width:".concat(e.columnStyle.width,";"):"width:100%;"}),"\n ")})),Ks=Object(s.b)((function(e){return{search:e.search,agileOrderBy:e.controls.agileOrderBy,agileOrderDesc:e.controls.agileOrderDesc,groupByColor:e.db.groupByColor,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Vs)(Object(n.memo)((function(e){var t=c.a.getState(),r=t.search,o=t.session,i=t.db,l=Object(n.useRef)({}),s=Object(n.useRef)({}),u=Object(n.useRef)({}),p=Object(n.useRef)({});a.a.useEffect((function(){e.groupByColor||(p.current={})}),[e.groupByColor]);var h=window.location.hash.split("/");h[0]=h[0].replace("#",""),36!==h[0].length&&(h[0]=null);var m=e.cards;r&&r.cards&&(r.cards.startDate||r.cards.endDate)&&(m=m.filter((function(e){return!!(e&&r.cards.startDate&&e.startDate&&e.startDate>=r.cards.startDate&&r.cards.endDate&&e.endDate&&e.endDate<=r.cards.endDate)})).map((function(e){return e}))),r.text&&(m=m.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1)})).map((function(e){return e}))),m=(m=m.filter((function(e){return!(e.status&&!(e&&e.status&&r.cards.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&r.cards.priority[e.priority]||r.cards.priority.null&&!e.priority)})).map((function(e){return e})),r.users.selected&&Object.keys(r.users.selected).length>0&&(m=m.filter((function(e){if(e&&e._users&&Object.keys(e._users).filter((function(e){return r.users.selected[e]})).length>0)return!0})).map((function(e){return e}))),Object.keys(r.units.selected).length>0&&(m=r.units.selected.unassigned?m.filter((function(e){if(!e._planId||e._planId&&i.cards[e._planId]&&!i.cards[e._planId].client)return!0})).map((function(e){return e})):m.filter((function(e){var t=!1;return Object.keys(i.cards).filter((function(e){if(i.cards[e].client&&r.units.selected[i.cards[e].client])return!0})).map((function(r){e._planId&&e._planId===i.cards[r]._id&&(t=!0)})),t})).map((function(e){return e}))),Object.keys(r.groups.selected).length>0&&(m=r.groups.selected.unassigned?m.filter((function(e){if(!e._planId||e._planId&&i.cards[e._planId]&&!i.cards[e._planId].client)return!0})).map((function(e){return e})):m.filter((function(e){var t=!1;return Object.keys(i.cards).filter((function(e){if(i.cards[e].client&&r.groups.selected[i.cards[e].client])return!0})).map((function(r){e._planId&&e._planId===i.cards[r]._id&&(t=!0)})),t})).map((function(e){return e}))),Object.keys(r.plans.selected).filter((function(e){return e})).length>0&&(m=m.filter((function(e){if(r.plans.selected[e._planId])return!0})).map((function(e){return e}))),r.tags.length>0&&(m=m.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return r.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var g=String(o.dashboard.period).replace("$__last","");g=g.replace("Days","");var b=_()(new Date).tz("America/Sao_Paulo").subtract(parseInt(g),"d").format("YYYY-MM-DDT00:00"),v=_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(m=m.filter((function(e){if("completed"===e.status&&e.completed_at&&(e.completed_at.low&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=v&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b||e.completed_at&&!e.completed_at.low&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=v&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b)||"completed"!==e.status&&e.updated_at&&(e.updated_at.low&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=v&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b||e.updated_at&&!e.updated_at.low&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=v&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=b))return!0})).map((function(e){return e}))),e.showDeleted||c.a.getState().controls.deleted||(m=m.filter((function(e){return!e.deleted})).map((function(e){return e}))),m=m.sort((function(t,r){var n,a,o=(null===t||void 0===t||null===(n=t.order)||void 0===n?void 0:n.low)||!isNaN(null===t||void 0===t?void 0:t.order)||String(t.order)?parseInt(t.order):0,i=(null===r||void 0===r||null===(a=r.order)||void 0===a?void 0:a.low)||!isNaN(null===r||void 0===r?void 0:r.order)||String(r.order)?parseInt(r.order):0;if("name"===e.agileOrderBy&&(o=t.name.trim().toLowerCase(),i=r.name.trim().toLowerCase()),"startDate"===e.agileOrderBy&&(o=t.startDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(t.startDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z","-").concat(t.name),i=r.startDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(r.startDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z","-").concat(r.name)),"endDate"===e.agileOrderBy&&(o=t.endDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(t.endDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z","-").concat(t.name),i=r.endDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(r.endDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z","-").concat(r.name)),e.groupByColor&&h.indexOf("overview")>-1){if(t&&t._parent&&t._parent!==h[0]){var l=Object(st.r)(t)||{color:"rgba(255, 255, 255, 1)"};if(!l.parentId&&t._parent&&(l.parentId=t._parent),l.parentId&&c.a.getState().db.cards[l.parentId]){var s=c.a.getState().db.cards[l.parentId].name;o="".concat(s,"-").concat(o)}}if(r&&r._parent&&r._parent!==h[0]){var u=Object(st.r)(r)||{color:"rgba(255, 255, 255, 1)"};if(!u.parentId&&r._parent&&(u.parentId=r._parent),u.parentId&&c.a.getState().db.cards[u.parentId]){var d=c.a.getState().db.cards[u.parentId].name;i="".concat(d,"-").concat(i)}}}if("DESC"===e.agileOrderDesc){if(o<i)return-1;if(o>i)return 1}if("ASC"===e.agileOrderDesc){if(o>i)return-1;if(o<i)return 1}return 0})).map((function(e){return e}));var y=Object(S.r)(e.column.name,1),x=null,O={};c.a.getState().db.cards[h[0]]&&c.a.getState().db.cards[h[0]].customColumns&&(O=JSON.parse(c.a.getState().db.cards[h[0]].customColumns)),O&&O[e.column.name.replace("$__","")]&&O[e.column.name.replace("$__","")].name&&(y=Object(S.r)(O[e.column.name.replace("$__","")].name,1)),O&&O[e.column.name.replace("$__","")]&&O[e.column.name.replace("$__","")].icon&&(x=Object(S.r)(O[e.column.name.replace("$__","")].icon,1));var w=[];function j(t){var r=t.index,n=t.style,o=m[r],i="",l="";if(e.groupByColor&&!o.color&&h.indexOf("overview")>-1){var s=Object(st.r)(o);!s.parentId&&o._parent&&o._parent!==h[0]&&(s.parentId=o._parent),s&&s.parentId&&-1===w.indexOf(s.parentId)&&c.a.getState().db.cards[s.parentId]&&(i=c.a.getState().db.cards[s.parentId].name,l=s.color,w.push(s.parentId),p.current=Object(d.a)(Object(d.a)({},p.current),{},Object(f.a)({},o._id,{title:c.a.getState().db.cards[s.parentId].name,color:s.color||"#FFFFFF"})))}return a.a.createElement(a.a.Fragment,null,a.a.createElement(Zt.b,{draggableId:o._id,index:r,key:o._id,isDragDisable:e.isDragDisable||!1},(function(t,c){var s;return a.a.createElement("div",{style:n},e.groupByColor&&p.current[o._id]&&h.indexOf("overview")>-1?a.a.createElement("div",{style:{width:"100%",padding:3,color:"gray",marginTop:17,borderBottom:"solid 3px ".concat((null===(s=p.current[o._id])||void 0===s?void 0:s.color)||"")}},p.current[o._id].title):a.a.createElement(a.a.Fragment,null),a.a.createElement(E,{separator:e.groupByColor&&h.indexOf("overview")>-1&&i?{title:i,color:l}:null,provided:t,isDragging:null===c||void 0===c?void 0:c.isDragging,index:r,snapshot:c,clone:"CL"}))})))}function E(t){var r,n=t.provided,o=t.index,i=t.snapshot,c=(t.clone,m[o]);return a.a.createElement("div",Object.assign({},n.draggableProps,n.dragHandleProps,{ref:n.innerRef}),a.a.createElement(Dn,{separator:e.groupByColor&&h.indexOf("overview")>-1&&(null===p||void 0===p||null===(r=p.current[c._id])||void 0===r?void 0:r.title)?null===p||void 0===p?void 0:p.current[c._id]:null,data:c,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:i.isDragging&&!i.isDropAnimating,snapshot:i,cardColorPicker:!!e.cardColorPicker,manualExpanded:(null===u||void 0===u?void 0:u.current[c._id])||!1,onResize:function(e){!function(e,t){var r;(null===l||void 0===l||null===(r=l.current)||void 0===r?void 0:r.resetAfterIndex)&&l.current.resetAfterIndex(0);s.current=Object(d.a)(Object(d.a)({},s.current),{},Object(f.a)({},e,t))}(c._id,e)},onExpand:function(e){(!u.current[c._id]&&e||"false"===String(e)&&u.current[c._id])&&function(e,t){var r;(null===l||void 0===l||null===(r=l.current)||void 0===r?void 0:r.resetAfterIndex)&&l.current.resetAfterIndex(0);u.current=Object(d.a)(Object(d.a)({},u.current),{},Object(f.a)({},e,t))}(c._id,e)}}))}function k(e){var t=m[e];return s.current[t._id]+7||67}return a.a.createElement(Zt.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(t){return a.a.createElement(Xs,Object.assign({},!e.isDropDisabled&&t.draggableProps,e,{ref:t.innerRef}),a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&t.dragHandleProps,a.a.createElement(wn,Object.assign({title:y,icon:x||e.column.icon||"topic",color:Object(S.d)("menu"),style:{padding:"7px"}},h.length>0&&h[1]&&"overview"===h[1]&&c.a.getState().db.cards[h[0]]&&c.a.getState().db.cards[h[0]].planType&&"flow"===c.a.getState().db.cards[h[0]].planType&&c.a.getState().db.cards[h[0]]._users&&c.a.getState().db.cards[h[0]]._users[o._id]&&c.a.getState().db.cards[h[0]]._users[o._id].access&&parseInt(c.a.getState().db.cards[h[0]]._users[o._id].access)>3?{permitIcon:!0,editable:!0,onEdit:function(t){Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:h[0]}}),{customColumns:JSON.stringify(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[h[0]]&&c.a.getState().db.cards[h[0]].customColumns?JSON.parse(c.a.getState().db.cards[h[0]].customColumns):{}),{},Object(f.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(S.r)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(S.d)("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)}))),a.a.createElement(Zt.c,{droppableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",type:"card",isDropDisabled:e.column.isDropDisabled,direction:"".concat(e.inLine?"horizontal":"vertical"),isCombineEnabled:e.isCombineEnabled,mode:"virtual",renderClone:function(e,t,r){return a.a.createElement(E,{provided:e,isDragging:null===t||void 0===t?void 0:t.isDragging,index:r.source.index,snapshot:t,style:{margin:0},clone:!0})}},(function(t){return a.a.createElement("div",{ref:t.innerRef,style:{width:"100%",height:e.inLineAdd?"calc(100% - 60px)":"calc(100% - 10px)"}},a.a.createElement(ha.a,{style:{width:"100%",height:"100%"}},(function(e){var r=e.height,n=e.width;return a.a.createElement(fa.b,{className:"List",height:r,width:n,ref:l,itemCount:m.length,itemSize:k,outerRef:t.innerRef,itemData:m,style:{height:"100%"}},j)})))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ee,{text:Object(S.r)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:h[0]?h[0]:null,rows:m.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})))}))}))));function Js(){Js=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Zs=w.default.div(qs||(qs=Object(u.a)(["\nheight:100%;\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n position:relative;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),Qs=Object(s.b)((function(e,t){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(p.a)(Js().mark((function r(n){var a,o,i,l,s,u,p,h,m,g,b,v;return Js().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().functions.socket,o=n.destination,i=n.source,l=n.draggableId,s=t.cards,!n.combine){r.next=5;break}return r.abrupt("return");case 5:if(o){r.next=7;break}return r.abrupt("return",!1);case 7:if(o.droppableId!==i.droppableId||o.id!==i.index){r.next=9;break}return r.abrupt("return",!1);case 9:if(u=i.droppableId,p=o.droppableId,h=Array.from(e.cards.filter((function(e){return e.status===u})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id}))),u!==p||c.a.getState().db.orderByTitle){r.next=21;break}return(m=Array.from(e.cards.filter((function(e){return e.status===u})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(i.index,1),m.splice(o.index,0,l),m.map((function(e,t){s[e]=Object(d.a)(Object(d.a)({},s[e]),{},{order:{low:t}})})),g=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:h.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.status===p})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(o.index,0,l),h.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),b.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),v=Object(d.a)(Object(d.a)({},t),{},{cards:Object(d.a)(Object(d.a)({},t.cards),{},Object(f.a)({},l,Object(d.a)(Object(d.a)({},t.cards[l]),{},{status:p,completed_at:"completed"===p?{low:_()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:_()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:h});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(p.a)(Js().mark((function e(t){return Js().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(p.a)(Js().mark((function e(t){return Js().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(Zt.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(Zt.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(Zs,Object.assign({},e,{ref:t.innerRef}),c.a.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(Ks,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),isDropDisabled:!0,column:n,cards:e.cards.filter((function(e){return e.status===t.value||"notStarted"===t.value&&!e.status})).map((function(e){return Object(d.a)(Object(d.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(d.a)({flex:r,width:"25%"},e.columnStyle?e.columnStyle:{}),viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter)}))})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))}));var eu=Object(s.b)((function(e){return{history:e.db.history,cards:e.db.cards,viewList:e.db.viewList,agileOrderBy:e.controls.agileOrderBy,agileOrderDesc:e.controls.agileOrderDesc}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=t.search,l=r.dataType,s=a.a.useState(!1),u=Object(h.a)(s,2),p=u[0],f=u[1],m=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),g=(_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),Object(S.j)(),window.location.hash.split("/"));if(g[0]=g[0].replace("#",""),a.a.useEffect((function(){p||f(!0)}),[r.cards,o,r.users]),window.location.hash.split("/")[0].replace("#","")||i.a.push("t#tab/myTasks"),!r.cards)return null;var b=Object.keys(e.cards).filter((function(t){return e.cards[t]&&"chatGroup"!==e.cards[t].type&&"plan"!==e.cards[t].type&&"step"!==e.cards[t].type&&"link"!==e.cards[t].type&&"insight"!==e.cards[t].type&&l.filter((function(r){return r.name===e.cards[t].type})).length>0&&(!e.cards[t].checklist||e.cards[t].checklist&&e.cards[t].showCard)&&!e.cards[t].deleted})).map((function(t){return e.cards[t]}));return b=c.a.getState().session.cards.adminView?b.filter((function(e){if(!e.private||e.private&&e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0)return!0})):b.filter((function(e){if(e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0)return!0})),g[1]&&"allTasks"===g[1]&&(b=b.filter((function(e){return l.filter((function(t){return t.name===e.type}))[0].myTasks&&"objective"!==e.type&&"goal"!==e.type&&"plan"!==e.type&&-1===e.type.indexOf("guideline")})),"allTasks"),g[1]&&"myTasks"===g[1]&&(b=b.filter((function(e){return l.filter((function(t){return t.name===e.type}))[0].myTasks&&"objective"!==e.type&&"goal"!==e.type&&"plan"!==e.type&&-1===e.type.indexOf("guideline")&&e._users&&Object.keys(e._users).filter((function(t){return t===n._id&&e._users[t].isResponsible})).length>0})),"myTasks"),"tab"===g[0]&&"planningCards"===g[1]&&(b=b.filter((function(e){return l.filter((function(t){return t.name===e.type}))[0].myTasks&&"objective"!==e.type&&"goal"!==e.type&&"plan"!==e.type&&-1===e.type.indexOf("guideline")&&e._planId})),"planningCards"),"tab"===g[0]&&"guidelines"===g[1]&&(b=b.filter((function(e){if(e.type.indexOf("guideline")>-1)return!0})),"guidelines"),"tab"===g[0]&&"unreaded"===g[1]&&(b=b.filter((function(e){if(Object(st.k)(e._id).total>0)return!0})),"unreaded"),"tab"===g[0]&&"objectives"===g[1]&&(b=b.filter((function(e){return"objective"===e.type})),"objectives"),"tab"===g[0]&&"goals"===g[1]&&(b=b.filter((function(e){return"goal"===e.type})),"goals"),"tab"===g[0]&&"myDay"===g[1]&&(b=b.filter((function(e){return e._users&&e._users[n._id]&&e._users[n._id].myDay&&_()(new Date(1e3*e._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===m})).map((function(e){return e})),"myDay"),"tab"===g[0]&&"ourDay"===g[1]&&(b=b.filter((function(e){return!(!e||!e._users)&&Object.keys(e._users).filter((function(t){return t&&e._users[t]&&e._users[t].myDay&&_()(new Date(1e3*e._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===m})).length>0})).map((function(e){return e})),"ourDay"),"tab"===g[0]&&"private"===g[1]&&(b=b.filter((function(e){return e.private})).map((function(e){return e})),"nextTasks"),"tab"===g[0]&&"nextTasks"===g[1]&&(b=b.filter((function(e){return e.endDate&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=_()(new Date(m)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&_()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=_()(new Date(m)).add(10,"days").format("YYYY-MM-DD")})).map((function(e){return e})),"nextTasks"),"tab"===g[0]&&"lateTasks"===g[1]&&(b=b.filter((function(e){return e.endDate&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(m)).tz("America/Sao_Paulo").format()&&"completed"!==e.status})).map((function(e){return e})),"lateTasks"),"tab"===g[0]&&"unlinkedCards"===g[1]&&(b=b.filter((function(e){return!e.parent&&!e._parent})).map((function(e){return e})),"lateTasks"),a.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},a.a.createElement(fl,null),a.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"7px"}},a.a.createElement(bl,null)),a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(wn,{title:null,icon:null,color:Object(S.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:"$__orderByStartDate",icon:"today",color:"startDate"===e.agileOrderBy?Object(S.d)("color"):Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{agileOrderBy:"startDate"}))}},{title:"$__orderByEndDate",icon:"event",color:"endDate"===e.agileOrderBy?Object(S.d)("color"):Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{agileOrderBy:"endDate"}))}},{title:"$__orderByName",icon:"sort",color:"name"===e.agileOrderBy?Object(S.d)("color"):Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{agileOrderBy:"name"}))}},{title:"DESC"===e.agileOrderDesc?"$__asc":"$__desc",icon:"DESC"===e.agileOrderDesc?"text_rotation_down":"text_rotate_up",color:Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{agileOrderDesc:"DESC"===e.agileOrderDesc?"ASC":"DESC"}))}}]})),a.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},a.a.createElement(Qs,{cards:b,inLine:r.viewList,showConnectedIn:!0,columnStyle:Object(d.a)({},r.viewList?{width:"100%"}:{maxHeight:"calc(100vh - 190px)",width:"25%"})}),a.a.createElement("div",{style:{clear:"both"}})))}));var tu=Object(s.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(nl)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2);return r[0],r[1],a.a.createElement("div",{style:{width:"100%"}},"Resume")})));var ru=function(e){var t=Ei.a.ExcelFile,r=Ei.a.ExcelFile.ExcelSheet,n=Ei.a.ExcelFile.ExcelColumn,o=e.data,i=[],c=[];return o.map((function(e){e.users.filter((function(e){return!e.deleted})).sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()})).map((function(e){0===i.filter((function(t){return t.id===e.id})).length&&i.push(e)})),e.users.filter((function(e){return e.deleted})).sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()})).map((function(e){0===c.filter((function(t){return t.id===e.id})).length&&c.push(e)}))})),a.a.createElement(t,{filename:"".concat(_()().tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_").concat(Object(S.r)("$__companies"),"_").concat(Object(S.r)("$__users")),element:a.a.createElement(E.a,{title:Object(S.r)("$__export"),text:Object(S.r)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:o.sort((function(e,t){return e.name<t.name})),name:Object(S.r)("$__accounts")},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__company",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__signaturePlan",1)),value:"plan"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__activeUsersCount",1)),value:"usersCount"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__usedDisk",1)),value:"diskUsed"})),a.a.createElement(r,{data:i.sort((function(e,t){return e.name<t.name})),name:"USUARIOS ATIVOS"},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__lastSessionDate",1)),value:"lastSession"})),a.a.createElement(r,{data:c.sort((function(e,t){return e.name<t.name})),name:"USU\xc1RIOS REMOVIDOS"},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__removed",1)),value:"deleted"})),o.map((function(e,t){return a.a.createElement(r,{data:e.users,name:e.name,key:t},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.r)("$__removed",1)),value:"deleted"}))})))};function nu(){nu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var au=Object(s.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(nl)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState([]),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(null),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState("name"),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!0),w=Object(h.a)(O,2),j=w[0],k=w[1],L=c.a.getState().db.plans;a.a.useEffect((function(){C()}),[]);var C=function(){var e=Object(p.a)(nu().mark((function e(){var t,r;return nu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("Adm_ReqAccounts");case 2:t=e.sent,r=[],t&&(t.data.map((function(e){var t=0;if(0===r.filter((function(t){return t.id===e.id})).length){e.users.filter((function(e){return e.filesSize})).map((function(e){t+=parseInt(e.filesSize)})),t>0&&(t=Object(S.i)(t));var n=e.account.created_at&&e.account.created_at.low?String(e.account.created_at.low):e.account.created_at,a=e&&e.account&&e.account.plan&&L.filter((function(t){return t.value.indexOf(e.account.plan)})).length>0?e.account.plan:"p0",o=Array.from(e.users);o.flatMap((function(e){(e.deleted||e.unityDeleted)&&(e.deleted="SIM"),e.created_at=pa()(1e3*e.created_at).format("DD/MM/YYYY HH:mm:ss"),e.lastSession=e.lastSession?pa()(1e3*e.lastSession).format("DD/MM/YYYY HH:mm:ss"):""})),r.push(Object(d.a)(Object(d.a)({id:e.id},e.account),{},{created_at:pa()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.r)(L.filter((function(e){return e.value.indexOf(a)>-1}))[0].label,"*"),diskUsed:t,usersCount:e.users.length,users:o})),"ENEVA"===e.account.name&&console.log(e,Object(d.a)(Object(d.a)({id:e.id},e.account),{},{created_at:pa()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.r)(L.filter((function(e){return e.value.indexOf(a)>-1}))[0].label,"*"),diskUsed:t,usersCount:e.users.length,users:o}))}})),o(t.data),u(r));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(e){x===e?k((function(e){return!e})):_(e)},T=function(e){var t=e.data,r=e.index,n=t.filesSize?parseInt(t.filesSize):0;return n>0&&(n=Object(S.i)(n)),a.a.createElement("div",null,a.a.createElement("div",{style:Object(d.a)(Object(d.a)({border:"solid 1px #f6f6f6",width:"100%",padding:7,overflowY:"auto",display:"flex"},t.deleted?{color:"red"}:{}),{},{marginBottom:7},r%2?{background:"linear-gradient(33deg, rgba(255, 255, 255, 1), rgba(247,247,247, 1))"}:{background:"linear-gradient(77deg, rgba(247,247,247, 1), rgba(255, 255, 255, 1))"})},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",t.id),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px",overflow:"hidden",textOverflow:"ellipsis"}},a.a.createElement("div",{style:{width:"100%",position:"relative",float:"left"}},t.name)," ",t.unity?a.a.createElement("div",{style:{fontSize:10,width:"100%",position:"relative",float:"left"}},"(",t.unity,")"):""),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},t.email),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"}},t.created_at),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"}},t.lastSession)))},F=function(e){var t=e.data,r=e.index,n=t&&t.account&&t.account.plan&&L.filter((function(e){return e.value.indexOf(t.account.plan)>-1})).length>0?t.account.plan:"p0",o=t.users.filter((function(e){return!e.deleted})).length,i=0;return t.users.filter((function(e){return e.filesSize})).map((function(e){i+=parseInt(e.filesSize)})),i>0&&(i=Object(S.i)(i)),a.a.createElement("div",{style:Object(d.a)({position:"relative",width:"100%",padding:7,marginBottom:3},t.account.deleted?Object(d.a)({},r%2?{background:"linear-gradient(33deg, rgba(237,20,61,0.1), rgba(237,20,61,0.2))"}:{background:"linear-gradient(33deg, rgba(237,20,61,0.2), rgba(237,20,61,0.1))"}):Object(d.a)({},r%2?{background:"linear-gradient(33deg, rgba(255, 255, 255, 1), rgba(247,247,247, 1))"}:{background:"linear-gradient(77deg, rgba(247,247,247, 1), rgba(255, 255, 255, 1))"}))},a.a.createElement("div",{style:{width:"100%",padding:7,overflowY:"auto",display:"flex",marginBottom:3}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",t.id),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},t.account.name),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.k)(t.account.created_at)),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},L.filter((function(e){return e.value.indexOf(n)>-1}))[0]&&L.filter((function(e){return e.value.indexOf(n)>-1}))[0].label?Object(S.r)("".concat(L.filter((function(e){return e.value.indexOf(n)>-1}))[0].label)):""),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px",cursor:"pointer",display:"flex"},onClick:function(){g===t.id?b(null):b(t.id)}},a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__showUsers","*"),color:Object(S.d)("lightgrey"),icon:g===t.id?"expand_less":"expand_more",onClick:function(){b(g===t.id?null:t.id)},size:"25px"}),o),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},i)),g===t.id?a.a.createElement("fieldset",{style:{borderRadius:5,width:"100%",overflow:"auto",position:"relative"}},a.a.createElement("legend",{style:{display:"flex"}},Object(S.r)("$__users"),a.a.createElement(E.a,{transparent:!0,title:Object(S.r)("$__hide","*"),color:Object(S.d)("lightgrey"),icon:"expand_less",onClick:function(){b(null)},size:"25px"})),a.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:Object(S.d)("menu"),fontSize:"11px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"},onClick:function(){I("id")}},"#",Object(S.r)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("name")}},Object(S.r)("$__name")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"},onClick:function(){I("email")}},Object(S.r)("$__email")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("createdAt")}},Object(S.r)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("lastSession")}},Object(S.r)("$__lastSession"))),t.users.sort((function(e,t){var r="",n="";return"id"===x&&(r=e.id,n=t.id),"name"===x&&(r=e.name.toLowerCase(),n=t.name.toLowerCase()),"email"===x&&(r=e.email.toLowerCase(),n=t.email.toLowerCase()),"createdAt"===x&&(r=e.created_at,n=t.created_at),"lastSession"===x&&(r=e.lastSession,n=t.lastSession),r<n?j?-1:1:r>n?j?1:-1:0})).map((function(e,t){return a.a.createElement(T,{data:e,index:t,key:t})}))):a.a.createElement(a.a.Fragment,null))};return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ru,{data:s}),a.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:Object(S.d)("menu")}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",Object(S.r)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},Object(S.r)("$__company")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.r)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.r)("$__plan")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.r)("$__users")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.r)("$__diskUsed"))),a.a.createElement("div",null,n.filter((function(e){return!g||g===e.id})).sort((function(e,t){var r=e.account.name.toLowerCase(),n=t.account.name.toLowerCase();return r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement(F,{index:t,data:e,key:e.account._id})}))))})));function ou(){ou=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var iu=Object(s.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(nl)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1],l=c.a.getState().functions.socket,s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],f=u[1],m=a.a.useState(0),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(25),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(""),j=Object(h.a)(w,2),E=j[0],k=j[1];a.a.useEffect((function(){i(c.a.getState().languages)}),[JSON.stringify(c.a.getState().languages)]);var L=function(){var e=Object(p.a)(ou().mark((function e(t,r,n,a){return ou().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?l.emit("language.UPD",{alias:r,locale:n,text:a}):l.emit("data",{module:"language",method:"post",action:"addLocale"},{alias:r,locale:n,text:a});case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",b+1," ",Object(S.r)("$__of")," ",Math.ceil(Object.keys(o).length/_),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:Object.keys(o).length,page:b,onChangePage:function(e,t){v(t)},rowsPerPage:_,onChangeRowsPerPage:function(e){O(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__aliasPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(tt,{label:Object(S.r)("$__search",1),variant:Object(S.d)("fieldVariant"),value:E,onChange:function(e){k(e.target.value)}}),a.a.createElement(Ee,{text:d?Object(S.r)("$__all","*"):Object(S.r)("$__onlyEmpty","*"),icon:d?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){f(!d)}})),a.a.createElement(Ye.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.r)("$__alias",1)),a.a.createElement("div",{className:t.column},Object(S.r)("$__translation",1))),a.a.createElement("div",{className:t.body},a.a.createElement("ul",null,o&&Object.keys(o)&&Object.keys(o).length>0&&Object.keys(o).filter((function(e){if((!E||E&&(e.indexOf(E)>-1||o[e]&&o[e].locales&&o[e].locales.filter((function(e){return e.name.toLowerCase().indexOf(E.toLowerCase())>-1})).length>0))&&(d&&o[e]&&(!o[e].locales||o[e].locales&&(0===!o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length||o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&!o[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0].name||0===o[e].locales.filter((function(e){return"en-US"===e.locale})).length||o[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&!o[e].locales.filter((function(e){return"en-US"===e.locale}))[0].name||0===o[e].locales.filter((function(e){return"es-ES"===e.locale})).length||o[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&!o[e].locales.filter((function(e){return"es-ES"===e.locale}))[0].name))||!d))return!0})).sort((function(e,t){return e<t?-1:e>t?1:0})).map((function(e,r){if(r<=(b+1)*_&&r>=b*_)return a.a.createElement("li",{key:e.trim()},a.a.createElement("div",{className:t.column},e),a.a.createElement("div",{className:t.column2},a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Portugu\xeas - Brasil"),a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(wn,{key:"".concat(e,"_pt-BR"),title:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0].name,_id:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0]._id,editable:!0,onEdit:function(t,r){L(r,e,"pt-BR",t.name)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))),a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Ingl\xeas - Internacional"),a.a.createElement(wn,{key:"".concat(e,"_en-US"),editable:!0,title:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale}))[0].name,_id:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale}))[0]._id,onEdit:function(t,r){L(r,e,"en-US",t.name)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0})),a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Espanhol"),a.a.createElement(wn,{key:"".concat(e,"_es-ES"),editable:!0,title:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale}))[0].name,_id:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale}))[0]._id,onEdit:function(t,r){L(r,e,"es-ES",t.name)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))))}))))))})));var cu=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(ms)((function(e){var t=c.a.getState().session,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=a.a.useState(null),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(null),u=Object(h.a)(s,2),d=u[0],p=u[1];return t._access.master?(window.location.hash.split("/")[0].replace("#",""),a.a.createElement("div",null,!r[0]&&a.a.createElement(tu,null),"tab"===r[0]&&"accounts"===r[1]&&a.a.createElement(au,null),"tab"===r[0]&&"languages"===r[1]&&a.a.createElement(iu,null),"tab"===r[0]&&"tests"===r[1]&&a.a.createElement("div",{style:{width:"300px"}},a.a.createElement(eo,{type:"datetime",onChangeStartDate:function(e){console.log(_()(e).format("YYYY-MM-DD 23:59:59").unix("X")),l(_()(e).unix("X"))},onChangeEndDate:function(e){p(_()(e).unix("X"))},range:!0,startDate:i?new Date(1e3*i):null,endDate:d?new Date(1e3*d):null,onClear:function(){l(null),p(null)}})))):a.a.createElement("div",null,"ACCESS DENIED")}))),lu={badge:{borderRadius:"12px",padding:"5px 12px",textTransform:"uppercase",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:W.O,textAlign:"center",verticalAlign:"baseline",display:"inline-block"},primary:{backgroundColor:W.z[0]},warning:{backgroundColor:W.N[0]},danger:{backgroundColor:W.j[0]},success:{backgroundColor:W.G[0]},info:{backgroundColor:W.u[0]},rose:{backgroundColor:W.D[0]},gray:{backgroundColor:W.q[0]}};Object(z.a)(lu);var su=function(e){return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:"0px",padding:"0 0 50px",width:"-webkit-fill-available","&:before":{left:"15px"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 50px",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",paddingLeft:"15px",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:{color:W.O,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",left:"50%",marginLeft:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadge:{left:"7px"},timelineBadgeInverted:{color:W.O,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",right:"50%",marginRight:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadgeInverted:{right:"7px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.b)+", 0.4)"},info:{backgroundColor:W.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.u[0])+", 0.4)"},success:{backgroundColor:W.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.G[0])+", 0.4)"},danger:{backgroundColor:W.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.j[0])+", 0.4)"},warning:{backgroundColor:W.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.N[0])+", 0.4)"},primary:{backgroundColor:W.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(W.r)(W.b)+", 0.14), 0 7px 10px -5px rgba("+Object(W.r)(W.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:{maxWidth:"calc(100% - 70px)",float:"right",padding:"7px",marginBottom:"5px",marginRight:"40px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:Object(S.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(W.r)(W.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:"0px",display:"flex",alignItems:"center"},timelineDate:{display:"flex",alignItems:"center",padding:"5px",backgroundColor:"#CCCCCC"},timelineBody:{overflowWrap:"anywhere",fontSize:"12px",lineHeight:"21px",position:"relative",width:"100%",float:"left"},timelineLog:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:{position:"absolute",bottom:"0px",minHeight:"50px",padding:"10px",height:"auto",width:"calc(100% - 0px)",backgroundColor:"rgba(240,240,240,1)",zIndex:10},files:{display:"inline-table",position:"relative"},textEditor:{},textEditorIcon:{cursor:"pointer",color:Object(S.d)("color")},progressBar:{backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"30px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"relative",float:"left",marginBottom:"33px","& img":{maxWidth:"20%",height:"auto",marginTop:"30px",marginRight:"7px"},"& .data":{"& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}};function uu(){uu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var du=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(su)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.functions,l=(r.chat,r.timeline),s=i.socket,u=a.a.useState(e.stories||{}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=[];a.a.useEffect((function(){y()}),[e.stories,e.nodeId,JSON.stringify(l)]);var y=function(){var t={};l[o._id]&&Object.keys(l[o._id]).filter((function(t){return l[o._id][t]&&l[o._id][t].user&&l[o._id][t].user._id&&l[o._id][t].user._id===e.nodeId})).map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e,l[o._id][e]))})),l[e.nodeId]&&Object.keys(l[e.nodeId]).map((function(r){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},r,l[e.nodeId][r]))})),b(t)},x=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:v,file:t})},_=function(){var t=Object(p.a)(uu().mark((function t(){return uu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users",type:e.type?e.type:"comment"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"15px"}},a.a.createElement("ul",{className:t.timelineSimple,id:"tms_".concat(e.nodeId),style:{zIndex:1}},g&&Object.keys(g).length>0&&Object.keys(g).sort((function(e,t){return parseInt(g[e].created_at)<parseInt(g[t].created_at)?-1:parseInt(g[e].created_at)>parseInt(g[t].created_at)?1:0})).map((function(r,n){var i=g[r];return!e.showUnReaded&&n>Object.keys(g).length-4?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];v.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(ia,{openLightBox:function(e){x(e)},storie:i,reply:i.reply?g[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&i&&i.user&&i.user._id!==o._id&&(!i.readedBy||i.readedBy&&!i.readedBy[o._id])?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];v.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(ia,{openLightBox:function(e){x(e)},storie:i,reply:i.reply?g[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),a.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),a.a.createElement(gn,{nodeId:e.nodeId,onSending:function(){_()}}))})));function pu(){pu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var fu=Object(z.a)((function(){return{unReaded:{background:"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(250, 250, 250, 0))",padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",maxWidth:"100%",opacity:1},Readed:{padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",opacity:.6,maxWidth:"100%","&:hover":{opacity:1}}}}));var hu=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=c.a.getState(),l=i.db,s=i.chat,u=i.timeline,f=e.data,m=fu();a.a.useEffect((function(){n||o(!0)}));var g="cards";f.nodeId&&c.a.getState().db.users[f.nodeId]&&(g="users");var b=function(){var t=Object(p.a)(pu().mark((function t(r,n){return pu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.a.getState().db[n][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},s),{},{open:!0,db:n,nodeId:r,loading:!1})):(Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Notifications/Index/openChat()"}),{id:[r],db:n}),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},s),{},{open:!0,db:n,nodeId:r,loading:!0}))),e.openChat(r,n);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if("timeline"===f.module&&(!f.inNode||!f.inNode.type||!c.a.getState().db||!c.a.getState().db[g]))return a.a.createElement(a.a.Fragment,null);if(!f.byUser||f.byUser&&!l.users[f.byUser]||f.inNode&&f.inNode.type&&f.inNode._id&&!c.a.getState().db[g][f.inNode._id])return a.a.createElement(a.a.Fragment,null);var v=function(){var e="";return e=_()().tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*f.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Object(S.r)("$__today",1)," ").concat(_()(1e3*f.created_at).tz("America/Sao_Paulo").format("HH:MM")):_()().tz("America/Sao_Paulo").format("YYYY")===_()(1e3*f.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*f.created_at).tz("America/Sao_Paulo").format("DD/MM HH:MM")):"".concat(_()(1e3*f.created_at).tz("America/Sao_Paulo").format("YYYY/DD/MM HH:MM")),a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{style:{position:"relative",alignItems:"center",display:"flex",textSize:"10px",width:"100%",color:Object(S.d)("medium"),justifyContent:"space-between"}},a.a.createElement(si,{alt:l.users[f.byUser].name,src:l.users[f.byUser].image||null,size:"sm"},l.users[f.byUser].name.substr(0,1)),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.r)(f.description)," - ",e,f.readed&&a.a.createElement(ae.a,{icon:"done_all",color:Object(S.d)("medium"),title:"$__readed"}))))};return a.a.createElement("div",{className:f.readed?m.Readed:m.unReaded},a.a.createElement("div",{style:{textAlign:"center",width:"100%",padding:"7px",maxWidth:"100%"}}),"timeline"===f.module&&!e.showTimeline&&f.inNode&&f.inNode.type&&f.inNode._id&&c.a.getState().db[g]&&c.a.getState().db[g][f.inNode._id]&&u[f.inNode._id]&&u[f.inNode._id][f.nodeId]&&a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:function(){var t;"User"===f.inNode.type&&(f&&f.inNode&&f.inNode._id&&c.a.getState().db&&c.a.getState().db.users&&c.a.getState().db.users[f.inNode._id]&&u[f.inNode._id]&&Object.keys(u[f.inNode._id]).length>0&&u[f.inNode._id][f.nodeId]&&(t=u[f.inNode._id][f.nodeId].user._id),b(t,"users"));"Card"===f.inNode.type&&("chatGroup"!==c.a.getState().db.cards[f.inNode._id].type?e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideMudule),{},{db:"cards",id:f.inNode._id,module:"cardEdit",activeModule:"timeline",data:c.a.getState().db.cards[f.inNode._id]})):b(f.inNode._id,"cards"))}},a.a.createElement(ia,{storie:f&&f.inNode&&f.inNode._id&&c.a.getState().db&&c.a.getState().db[g]&&c.a.getState().db[g][f.inNode._id]&&u[f.inNode._id]&&Object.keys(u[f.inNode._id]).length>0&&u[f.inNode._id][f.nodeId]?u[f.inNode._id][f.nodeId]:{},boxStyle:{width:"calc(100% - 10px) !important"},db:g})),"card"===f.module&&l[g]&&l[g][f.nodeId]&&a.a.createElement("div",{style:"chatGroup"===c.a.getState().db.cards[f.nodeId].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.nodeId].type&&b(f.nodeId,"cards")}},a.a.createElement(v,null),a.a.createElement(Dn,{db:"cards",data:c.a.getState().db.cards[f.nodeId],expanded:!0,onlyOption:"chatGroup"===c.a.getState().db.cards[f.nodeId].type,onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.nodeId].type&&b(f.nodeId,"cards")}})),e.showTimeline&&l[g]&&l[g][f.inNode._id]&&a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:"chatGroup"===c.a.getState().db.cards[f.inNode._id].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.inNode._id].type&&b(f.inNode._id,"cards")}},a.a.createElement(v,null),a.a.createElement(Dn,{db:"cards",data:c.a.getState().db.cards[f.inNode._id],expanded:!0,onlyOption:"chatGroup"===c.a.getState().db.cards[f.inNode._id].type,onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.inNode._id].type&&b(f.inNode._id,"cards")}}))),a.a.createElement(fn,{xs:12,sm:12,md:8,lg:8,xl:8},a.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},a.a.createElement(du,{nodeId:f.inNode._id,stories:f&&f.inNode&&f.inNode._id&&c.a.getState().db.cards[f.inNode._id]&&u[f.inNode._id]?u[f.inNode._id]:{},db:"cards"})))))})),mu=function(e){var t,r;return{bar:{position:"fixed",top:"0px",left:"0px",width:"147px",height:"calc(100vh - 0px)"},item:{height:"47px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={width:"100%",padding:"7px",color:Object(S.d)("menuButtonColor",.8),"&:hover":{color:Object(S.d)("menuButtonColor",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"0px"},display:"flex",fontSize:"12px",fontWeight:"bold",alignItems:"center"},Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:Object(S.d)("menuButtonColor",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"0px",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",cursor:"pointer"},themeExample:(r={},Object(f.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(f.a)(r,e.breakpoints.down("sm"),{left:"0 !important",right:"auto !important"}),r),module:{position:"fixed",top:"0px",left:"147px",width:"50px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)",borderRight:"solid 4px ".concat(Object(S.d)("color"))},moduleExpanded:{position:"fixed",top:"0",left:"147px",width:"311px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",zIndex:"100 !important",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Object(S.d)("menuButtonColor"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},logoImg:{width:"66%",marginTop:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function gu(){gu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var bu=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(mu)((function(e){var t=c.a.getState(),r=t.db,n=(t.session,t.chat),o=t.notifications,l=t.timeline,s=e.classes,u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(null),v=Object(h.a)(b,2),y=v[0],x=v[1],_=window.location.hash.split("/");_[0]=_[0].replace("#",""),a.a.useEffect((function(){m||g(!0)}),[o]);var O=function(){var t=Object(p.a)(gu().mark((function t(r,a,o){var c,l=arguments;return gu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=l.length>3&&void 0!==l[3]?l[3]:"users",!r||window.location.pathname===r&&a!==y||i.a.push(r),x(a),"chat"!==a||o?"chat"===a&&o?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},n),{},{open:!0,db:c,nodeId:o})):e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},n),{},{open:!1})):e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},n),{},{open:!0}));case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),w=[],j=[];Object.keys(o).sort((function(e,t){return parseInt(o[e].created_at)>parseInt(o[t].created_at)?-1:1})).filter((function(e){return"card"===o[e].module})).sort((function(e,t){return o[e].created_at.low-o[t].created_at.low})).map((function(e,t){-1===j.indexOf(o[e].nodeId)&&(w.push(e),j.push(o[e].nodeId))}));var E=[],k=[];return Object.keys(o).sort((function(e,t){return parseInt(o[e].created_at)>parseInt(o[t].created_at)?-1:1})).filter((function(e){return"timeline"===o[e].module})).sort((function(e,t){return o[e].created_at.low-o[t].created_at.low})).map((function(e,t){o[e].inNode&&o[e].inNode._id&&-1===k.indexOf(o[e].inNode._id)&&(E.push(e),k.push(o[e].inNode._id))})),r.myTasksMenuExpanded,a.a.createElement("div",null,a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{className:s.moduleTitle},Object(S.r)("$__notifications"))),a.a.createElement(fn,{xs:12,sm:6,md:4,lg:4,xl:4},a.a.createElement("div",{className:s.moduleTitle},Object(S.r)("$__cardsUpdated")),w.map((function(e){if(!_[1]||_[1]&&("important"===_[1]||"favorite"===_[1]||"archive"===_[1]||"latest"===_[1]))return a.a.createElement(hu,{data:o[e],key:e})}))),a.a.createElement(fn,{xs:12,sm:6,md:8,lg:8,xl:8},a.a.createElement("div",{className:s.moduleTitle},Object(S.r)("$__timelineUpdated")),E.map((function(e){if(!_[1]||_[1]&&("important"===_[1]||"favorite"===_[1]||"archive"===_[1]||"latest"===_[1]))return a.a.createElement(hu,{data:o[e],key:e,openChat:function(e,t){return O(null,"chat",e,t)},showTimeline:!0,timeline:o[e]&&o[e].inNode&&o[e].inNode._id&&r.cards[o[e].inNode._id]&&l[o[e].inNode._id]?l[o[e].inNode._id]:{}})})))))}))),vu={root:{position:"relative",width:"100%",backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"#FFFFFF !important"},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(S.d)("color")}},bar:{borderRadius:7}};var yu=Object(de.a)(vu)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.root},a.a.createElement(_r.a,null))})),xu=r(1763),_u={checkRoot:{padding:"14px","&:hover":{backgroundColor:"unset"}},radioRoot:{padding:"16px","&:hover":{backgroundColor:"unset"}},labelRoot:{marginLeft:"-14px"},checkboxAndRadio:{position:"relative",display:"block",marginTop:"10px",marginBottom:"10px"},checkboxAndRadioHorizontal:{position:"relative",display:"block","&:first-child":{marginTop:"10px"},"&:not(:first-child)":{marginTop:"-14px"},marginTop:"0",marginBottom:"0"},checked:{color:W.z[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+Object(W.r)(W.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+Object(W.r)(W.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},disabledCheckboxAndRadio:{"& $checkedIcon,& $uncheckedIcon,& $radioChecked,& $radioUnchecked":{borderColor:W.b,opacity:"0.26",color:W.b}},label:{cursor:"pointer",paddingLeft:"0",color:W.q[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+Object(W.r)(W.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"39px",marginRight:"0","@media (min-width: 992px)":{float:"right"}},labelHorizontalRadioCheckbox:{paddingTop:"22px"},labelLeftHorizontal:{color:"rgba("+Object(W.r)(W.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:W.j[0]},radio:{color:W.z[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+W.z[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+Object(W.r)(W.b)+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:W.q[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:W.q[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:W.D[0],"& > span:first-child":{borderColor:W.D[0]}}},iconCheckboxChecked:{color:W.D[0],"& > span:first-child":{borderColor:W.D[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:W.z[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+Object(W.r)(W.b)+", 0.4)",color:W.O+" !important",border:"1px solid rgba("+Object(W.r)(W.b)+", .54)"},switchIconChecked:{borderColor:W.z[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+Object(W.r)(W.q[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+Object(W.r)(W.z[0])+", 1) !important"},"& $switchIcon":{borderColor:W.z[0]}}},Ou=Object(d.a)(Object(d.a)({},_u),{},{cardTitle:Object(d.a)(Object(d.a)({},W.d),{},{textAlign:"center"}),container:Object(d.a)(Object(d.a)({},W.e),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+Object(W.r)(W.b)+", 0.14), 0 6px 30px 5px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.b)+", 0.2)",marginBottom:"100px",padding:"40px 0px",marginTop:"15vh"},center:{textAlign:"center"},right:{textAlign:"right"},left:{textAlign:"left"},form:{padding:"0 20px",position:"relative"},socialTitle:{fontSize:"18px"},inputAdornment:{marginRight:"18px",position:"relative"},inputAdornmentIcon:{color:W.q[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+Object(W.r)(W.b)+", 0.26)"}});function wu(){wu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ju=Object(z.a)(Ou);r(1543);function Eu(){Eu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function Su(e,t,r){var n=Array.from(e),a=n.splice(t,1),o=Object(h.a)(a,1)[0];return n.splice(r,0,o),n}function ku(e){var t=e.draggableStyle,r=e.virtualStyle,n=e.isDragging,a=Object(d.a)(Object(d.a)({},r),t);return Object(d.a)(Object(d.a)({},a),{},{height:n?a.height:a.height-8,left:n?a.left:a.left+8,width:n?t.width:"calc(".concat(a.width," - ").concat(16,"px)"),marginBottom:8})}var Lu=function(e){var t=e.provided,r=e.item,n=e.style,o=e.isDragging;return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:ku({draggableStyle:t.draggableProps.style,virtualStyle:n,isDragging:o}),className:"item ".concat(o?"is-dragging":""),ref:t.innerRef}),a.a.createElement(Dn,{data:r,db:"cards",isDragging:o,manualExpanded:e.manualExpanded||!1,onResize:function(t,r){e.onResize&&e.onResize(t)},onExpand:function(t){e.onExpand&&e.onExpand(t)}}))},Cu=a.a.memo((function(e){var t=e.index,r=e.column,o=e.discount,i=Object(n.useRef)(),c=Object(n.useRef)({}),l=Object(n.useRef)({});Object(n.useLayoutEffect)((function(){var e=i.current;e&&e.scrollTo(0)}),[t]);var s=function(t){var r=t.data,n=t.index,o=t.style,s=r[n];return s?a.a.createElement(Zt.b,{draggableId:s._id,index:n,key:s._id},(function(t){return a.a.createElement(Lu,{provided:t,item:s,style:o,manualExpanded:e.cardsExpanded||(null===l||void 0===l?void 0:l.current[s._id])||!1,onResize:function(e){!function(e,t){var r;(null===i||void 0===i||null===(r=i.current)||void 0===r?void 0:r.resetAfterIndex)&&i.current.resetAfterIndex(0),c.current=Object(d.a)(Object(d.a)({},c.current),{},Object(f.a)({},e,t))}(s._id,e)},onExpand:function(e){!function(e,t){var r;"undefined"!==String(t)&&"null"!==String(t)&&((null===i||void 0===i||null===(r=i.current)||void 0===r?void 0:r.resetAfterIndex)&&i.current.resetAfterIndex(0),l.current=Object(d.a)(Object(d.a)({},l.current),{},Object(f.a)({},e,t)))}(s._id,e)}})})):null},u=r.items;return a.a.createElement(Zt.c,{droppableId:r.id,mode:"virtual",renderClone:function(t,r,n){var o=u[n.source.index];return a.a.createElement(Lu,{provided:t,isDragging:r.isDragging,item:o,manualExpanded:e.cardsExpanded||(null===l||void 0===l?void 0:l.current[o._id])||!1,snapshot:r})}},(function(t,n){var l=n.isUsingPlaceholder?u.length+1:u.length;return a.a.createElement(ha.a,{style:{width:"100%",height:"calc(100% - ".concat(o+47,"px)"),overflowY:"auto",position:"relative"}},(function(n){var o=n.height;n.width;return a.a.createElement(fa.b,{width:279,height:o,itemCount:l,itemSize:function(e){var t,n;return n=(null===(t=r.items[e])||void 0===t?void 0:t._id)||null,c.current[n]+7||67},itemData:r.items,className:"task-list",ref:i,style:Object(d.a)(Object(d.a)({},e.style?e.style:{}),{},{height:"100%"}),outerRef:t.innerRef},s)}))}))})),Iu=a.a.memo((function(e){var t=e.column,r=e.index,n=a.a.useState(!1),o=Object(h.a)(n,2),i=o[0],l=(o[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0],p=(s[1],a.a.useState(!1)),f=Object(h.a)(p,2),m=f[0],g=f[1];a.a.useEffect((function(){var e=new ResizeObserver((function(){g(v.current.clientHeight)}));return e.observe(v.current),function(){return e.disconnect()}}),[v]);var b=c.a.getState().db.cards[t.id],v=a.a.useRef(),y=0;return b.showSumValues&&t.items&&t.items.length>0&&t.items.filter((function(e){return e.value})).length>0&&t.items.filter((function(e){return e.value})).map((function(e){y+=parseFloat(e.value)})),a.a.createElement(Zt.b,{draggableId:t.id,index:r},(function(n){return a.a.createElement("div",Object.assign({className:"column"},n.draggableProps,{ref:n.innerRef}),a.a.createElement("div",Object.assign({ref:v},n.dragHandleProps),a.a.createElement(wn,{title:"".concat(t.name," (").concat(t.items.length,")"),icon:t.icon||null,color:Object(S.d)("menu"),style:{padding:"7px",width:"100%"},placeholder:Object(S.r)("$__columnName"),customButtons:[{name:Object(S.r)("$__columnSettings",1),icon:"more_horiz",color:Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:t.id,module:"columnEdit",activeModule:"columnEdit",data:c.a.getState().db.cards[t.id]}))},show:"hover"}]}),b&&b.description&&!i?a.a.createElement(Tl.a,{arrow:!0,title:a.a.createElement(a.a.Fragment,null,b.description)},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10,padding:"0px 15px",maxHeight:68,textOverflow:"ellipsis",overflow:"hidden",paddingBottom:15}},b.description.substr(0,133),"...")):a.a.createElement(a.a.Fragment,null),b.showSumValues&&y>0&&!u?a.a.createElement("div",{style:{position:"relative",width:"100%",color:"black",fontWeight:"bold",fontSize:12,padding:"0px 15px",paddingBottom:15}},"R$ ",y):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement(Cu,Object.assign({column:t,index:r},e,{discount:m||0})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"15px 7px"}},a.a.createElement(Ee,{text:Object(S.r)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:t.id,rows:t.items.length}}))}})))}))}));var Tu=Object(s.b)((function(e){return{cards:e.db.cards,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Object(n.useState)(cr(e.nodeId,{deleted:!1})),r=Object(h.a)(t,2),o=r[0],i=r[1],l=Object(n.useState)(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(n.useState)(!1),b=Object(h.a)(g,2),v=b[0],y=b[1];function x(){return(x=Object(p.a)(Eu().mark((function t(r){var n,a,i,l,s,u,p,h,m,g,b;return Eu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(y(!1),r.destination){t.next=3;break}return t.abrupt("return");case 3:if("column"!==r.type){t.next=10;break}return n=Su(o.columnOrder,r.source.index,r.destination.index),a={},n.map((function(e,t){a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e]),{},{step:"".concat(t)})))})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),a)})),JSON.stringify(n)!==JSON.stringify(o.columnOrder)&&nr(n,"step"),t.abrupt("return");case 10:if(r.source.droppableId!==r.destination.droppableId){t.next=19;break}return i=o.columns[r.source.droppableId],l=Su(i.items,r.source.index,r.destination.index),s={},u=[],l.map((function(e,t){s=Object(d.a)(Object(d.a)({},s),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e._id]),{},{order:"".concat(t+1)}))),-1===u.indexOf(e._id)&&u.push(e._id)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),s)})),nr(u,"order"),t.abrupt("return");case 19:p=o.columns[r.source.droppableId],h=p.items[r.source.index],m=c.a.getState().db.cards[r.destination.droppableId],g=c.a.getState().db.cards[p.items[r.source.index]._id],b=or(e,g._id,m._id),m.requireApproval?b=Object(d.a)(Object(d.a)({},b),{},{_requireApproval:!0}):!m.requireApproval&&h._requireApproval&&(b=Object(d.a)(Object(d.a)({},b),{},{_requireApproval:null})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},h._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[h._id]),b),{},{_parent:r.destination.droppableId})))}));case 26:case"end":return t.stop()}}),t)})))).apply(this,arguments)}a.a.useEffect((function(){i(cr(e.nodeId,{deleted:!1}))}),[e.cards,e.nodeId]);var _=function(){var t=Object(p.a)(Eu().mark((function t(r){var n;return Eu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rr(r);case 2:(n=t.sent)&&e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),n)}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement(Zt.a,{onDragEnd:function(e){return x.apply(this,arguments)},onDragStart:function(){y(!0)}},a.a.createElement("div",{className:"app",style:{overflowY:"auto",height:"-webkit-fill-available"}},a.a.createElement(Zt.c,{droppableId:"all-droppables",direction:"horizontal",type:"column"},(function(t){return a.a.createElement("div",Object.assign({},t.droppableProps,{className:"columns",ref:t.innerRef}),o.columnOrder.map((function(t,r){return a.a.createElement(Iu,Object.assign({},e,{key:t,column:o.columns[t],index:r},e.columProps?e.columProps:{}))})),a.a.createElement("div",{className:"column",style:{display:v?"none":"flex",justifyContent:"center"}},u?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFFFFF",width:279,padding:7}},a.a.createElement(wn,{style:{width:"100%"},title:null,color:Object(S.d)("menu"),editable:!0,permitIcon:!0,onEdit:function(t){m(!1),_(Object(d.a)(Object(d.a)({},t),{},{_parent:e.nodeId,type:"step",step:String(o.columnOrder.length),checklist:!0}))},placeholder:Object(S.r)("$__columnName"),onCancel:function(){m(!1)}})):a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFFFFF",color:"black",padding:15,width:279}},a.a.createElement(E.a,{title:Object(S.r)("$__addColumn"),text:Object(S.r)("$__addColumn"),color:"lightgrey",textColor:"lightgrey",icon:"add_box",onClick:function(){m(!0)},size:"25px"}))),t.placeholder)}))))})),Fu={container:Object(d.a)(Object(d.a)({},W.l),{},{position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",display:"block",minWidth:"240px !important",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",minHeight:"50px"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("color"),fontWeight:"500"}},indicators:{position:"relative",float:"left",width:"100%",padding:"0 5px",height:"auto",display:"flex"},indicatorsIcon:{margin:"0px 0px"},image:{position:"relative",float:"left",width:"100%",maxWidth:"100%",backgroundColor:"rgb(0,0,0)",backgroundSize:"cover",backgroundPosition:"center"},progress:{position:"relative",float:"left",padding:"0 12px",width:"calc(100% - 15x)"},description:{position:"relative",float:"left",padding:"5px"},dates:{position:"relative",float:"left",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(S.d)("medium"),fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},users:{position:"absolute",bottom:"2px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};var Nu,Du,Au=Object(de.a)(Fu)(Object(n.memo)((function(e){var t=e.data,r=c.a.getState().db,n=[],o=r.cards,i=function(e,t){if(!t.isDropAnimating)return Object(d.a)({},e);var r=t.dropAnimation,n=r.moveTo,a=(r.curve,r.duration,"translate(".concat(n.x,"px, ").concat(n.y,"px)"));return Object(d.a)(Object(d.a)({},e),{},{clear:"both",transition:"all 0.1s ease",transform:"".concat(a," ").concat(""),border:"solid 3px ".concat(Object(S.d)("color")),backgroundColor:Object(S.d)("color"),padding:"3px"})};return Object.keys(o).map((function(e){return o[e]._parent===t._id&&(n[o[e].type]=null==n[o[e].type]?1:n[o[e].type]+1),!1})),a.a.createElement(Zt.b,{draggableId:t.id?t.id:t._id?t._id:null,index:Math.floor(10*Math.random()),key:t.id?t.id:t._id?t._id:null,isDragDisable:t.isDragDisable||e.isDragDisable||!1},(function(t,r){return a.a.createElement("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:i(t.draggableProps.style,r)}),a.a.createElement(Dn,{data:e.data,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:r.isDragging&&!r.isDropAnimating,snapshot:r,cardColorPicker:!!e.cardColorPicker}))}))})));var Pu,$u=w.default.div(Nu||(Nu=Object(u.a)(["\n margin:0 7px;\n min-width:180px;\n ","\n @media(min-width: 960px) {\n position:relative;\n max-height:",";\n \n ","\n }\n @media(max-width: 959px) {\n float:left;\n position: relative;\n }\n @media(max-width: 599px) {\n float:left;\n position: relative;\n }\n "])),(function(e){return e.columnStyle&&e.columnStyle.width?"width:calc(".concat(e.columnStyle.width," - 14px);"):"width:calc(100% - 14px);"}),(function(e){return e.columnStyle&&e.columnStyle.maxHeight?e.columnStyle.maxHeight:"calc(100% - 0px)"}),(function(e){return e.inLine?"display:block;\n ":"margin-bottom:0px !important;\n ".concat((function(e){return e.columnStyle&&e.columnStyle.width?"width:".concat(e.columnStyle.width,";"):"width:100%;"}),"\n ")})),zu=w.default.div(Du||(Du=Object(u.a)(["\nposition:relative;\nheight:100%;\nwidth:100%;\nmax-height:",";\n",";\n ",";\n","\n"])),(function(e){return e.columnStyle&&e.columnStyle.maxHeight?e.columnStyle.maxHeight:"calc(100% - 30px)"}),(function(e){return e.columnStyle&&e.columnStyle.maxWidth?e.columnStyle.maxWidth:"250px"}),(function(e){return e.isDraggingOver?"background-color:".concat(Object(S.d)("color"),"; opacity:0.5;"):""}),(function(e){return e.inLine?"\n display:table;\n margin-bottom:33px":"display:block;\n min-height: 150px !important;\n padding-bottom:15px;\n overflow-y: auto;\n "})),Mu=Object(s.b)((function(e){return{search:e.search,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Vs)((function(e){_()().tz("America/Sao_Paulo").format("YYYY/MM/DD");var t=c.a.getState(),r=t.search,n=t.session,o=t.db,i=e.classes,l=a.a.useState(""),s=Object(h.a)(l,2),u=(s[0],s[1],a.a.useState(!1)),p=Object(h.a)(u,2),m=p[0],g=(p[1],window.location.hash.split("/"));g[0]=g[0].replace("#",""),36!==g[0].length&&(g[0]=null);var b=e.cards;r&&r.cards&&(r.cards.startDate||r.cards.endDate)&&(b=b.filter((function(e){return!!(e&&r.cards.startDate&&e.startDate&&e.startDate>=r.cards.startDate&&r.cards.endDate&&e.endDate&&e.endDate<=r.cards.endDate)})).map((function(e){return e}))),r.text&&(b=b.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1)})).map((function(e){return e}))),b=(b=b.filter((function(e){return!(e.status&&!(e&&e.status&&r.cards.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&r.cards.priority[e.priority]||r.cards.priority.null&&!e.priority)})).map((function(e){return e})),r.users.selected&&Object.keys(r.users.selected).length>0&&(b=b.filter((function(e){if(e&&e._users&&Object.keys(e._users).filter((function(e){return r.users.selected[e]})).length>0)return!0})).map((function(e){return e}))),Object.keys(r.units.selected).length>0&&(b=r.units.selected.unassigned?b.filter((function(e){if(!e._planId||e._planId&&o.cards[e._planId]&&!o.cards[e._planId].client)return!0})).map((function(e){return e})):b.filter((function(e){var t=!1;return Object.keys(o.cards).filter((function(e){if(o.cards[e].client&&r.units.selected[o.cards[e].client])return!0})).map((function(r){e._planId&&e._planId===o.cards[r]._id&&(t=!0)})),t})).map((function(e){return e}))),Object.keys(r.groups.selected).length>0&&(b=r.groups.selected.unassigned?b.filter((function(e){if(!e._planId||e._planId&&o.cards[e._planId]&&!o.cards[e._planId].client)return!0})).map((function(e){return e})):b.filter((function(e){var t=!1;return Object.keys(o.cards).filter((function(e){if(o.cards[e].client&&r.groups.selected[o.cards[e].client])return!0})).map((function(r){e._planId&&e._planId===o.cards[r]._id&&(t=!0)})),t})).map((function(e){return e}))),Object.keys(r.plans.selected).filter((function(e){return e})).length>0&&(b=b.filter((function(e){if(r.plans.selected[e._planId])return!0})).map((function(e){return e}))),r.tags.length>0&&(b=b.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return r.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var v=String(n.dashboard.period).replace("$__last","");v=v.replace("Days","");var x=_()(new Date).tz("America/Sao_Paulo").subtract(parseInt(v),"d").format("YYYY-MM-DDT00:00"),O=_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(b=b.filter((function(e){if("completed"===e.status&&e.completed_at&&(e.completed_at.low&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=O&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=x||e.completed_at&&!e.completed_at.low&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=O&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=x)||"completed"!==e.status&&e.updated_at&&(e.updated_at.low&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=O&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=x||e.updated_at&&!e.updated_at.low&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=O&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=x))return!0})).map((function(e){return e}))),e.showDeleted||c.a.getState().controls.deleted||(b=b.filter((function(e){return!e.deleted})).map((function(e){return e})));var w=i.cardList+" "+y()(Object(f.a)({},i.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1)),j=Object(S.r)(e.column.name,1),E={};return c.a.getState().db.cards[g[0]]&&c.a.getState().db.cards[g[0]].customColumns&&(E=JSON.parse(c.a.getState().db.cards[g[0]].customColumns)),E&&E[e.column.name.replace("$__","")]&&E[e.column.name.replace("$__","")].name&&(j=Object(S.r)(E[e.column.name.replace("$__","")].name,1)),a.a.createElement(Zt.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(t){var r,o;return a.a.createElement($u,Object.assign({},!e.isDropDisabled&&t.draggableProps,e,{ref:t.innerRef}),a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&t.dragHandleProps,a.a.createElement(wn,Object.assign({title:j,icon:(null===(r=E[e.column.name.replace("$__","")])||void 0===r?void 0:r.icon)?null===(o=E[e.column.name.replace("$__","")])||void 0===o?void 0:o.icon:e.column.icon||"topic",color:Object(S.d)("menu"),style:{padding:"7px"}},g.length>0&&g[1]&&"overview"===g[1]&&c.a.getState().db.cards[g[0]]&&c.a.getState().db.cards[g[0]].planType&&"operational"===c.a.getState().db.cards[g[0]].planType&&c.a.getState().db.cards[g[0]]._users&&c.a.getState().db.cards[g[0]]._users[n._id]&&c.a.getState().db.cards[g[0]]._users[n._id].access&&parseInt(c.a.getState().db.cards[g[0]]._users[n._id].access)>3?{editable:!0,onEdit:function(t){Object(st.O)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:g[0]}}),{customColumns:JSON.stringify(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[g[0]]&&c.a.getState().db.cards[g[0]].customColumns?JSON.parse(c.a.getState().db.cards[g[0]].customColumns):{}),{},Object(f.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(S.r)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(S.d)("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)}))),a.a.createElement(Zt.c,{droppableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",type:"card",isDropDisabled:e.column.isDropDisabled,direction:"".concat(e.inLine?"horizontal":"vertical"),isCombineEnabled:e.isCombineEnabled},(function(t,r){return a.a.createElement(zu,Object.assign({className:w,ref:t.innerRef},t.droppableProps,{isDraggingOver:r.isDraggingOver,inLine:e.inLine},e),b.sort((function(t,r){var n="ASC"===e.orderByTitlePosition?t.name.toLowerCase():r.name.toLowerCase(),a="ASC"===e.orderByTitlePosition?r.name.toLowerCase():t.name.toLowerCase();return n<a?-1:n>a?1:0})).map((function(t){if(t)return a.a.createElement("div",{key:t._id||t.id?t._id:null},a.a.createElement(Au,{data:t,inLine:e.inLine,isDragDisable:e.column.isDragDisable,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,inLineAdd:e.inLineAdd||!1,viewButton:e.viewButton||!1,cardColorPicker:!!e.cardColorPicker}))})),e.inLineAdd&&!m&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ee,{text:Object(S.r)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:g[0]?g[0]:null,rows:b.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))}))})));function Bu(){Bu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Yu=w.default.div(Pu||(Pu=Object(u.a)(["\nheight:100%;\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n position:relative;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),Ru=Object(s.b)((function(e,t){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(p.a)(Bu().mark((function r(n){var a,o,i,l,s,u,p,h,m,g,b,v;return Bu().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().functions.socket,o=n.destination,i=n.source,l=n.draggableId,s=t.cards,!n.combine){r.next=5;break}return r.abrupt("return");case 5:if(o){r.next=7;break}return r.abrupt("return",!1);case 7:if(o.droppableId!==i.droppableId||o.id!==i.index){r.next=9;break}return r.abrupt("return",!1);case 9:if(u=i.droppableId,p=o.droppableId,h=Array.from(e.cards.filter((function(e){return e.status===u})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id}))),u!==p||c.a.getState().db.orderByTitle){r.next=21;break}return(m=Array.from(e.cards.filter((function(e){return e.status===u})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(i.index,1),m.splice(o.index,0,l),m.map((function(e,t){s[e]=Object(d.a)(Object(d.a)({},s[e]),{},{order:{low:t}})})),g=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:h.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.status===p})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(o.index,0,l),h.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),b.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),v=Object(d.a)(Object(d.a)({},t),{},{cards:Object(d.a)(Object(d.a)({},t.cards),{},Object(f.a)({},l,Object(d.a)(Object(d.a)({},t.cards[l]),{},{status:p,completed_at:"completed"===p?{low:_()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:_()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:h});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(p.a)(Bu().mark((function e(t){return Bu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(p.a)(Bu().mark((function e(t){return Bu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(Zt.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(Zt.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(Yu,Object.assign({},e,{ref:t.innerRef}),c.a.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(Mu,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),isDropDisabled:!0,column:n,cards:e.cards.filter((function(e){return e.status===t.value||"notStarted"===t.value&&!e.status})).map((function(e){return Object(d.a)(Object(d.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(d.a)({flex:r,width:"25%"},e.columnStyle?e.columnStyle:{}),viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter)}))})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))}));var Gu=Object(s.b)((function(e,t){return{db:e.db}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.db,r=t.dataType,n=window.location.hash.split("/");if(n[0]=n[0].replace("#",""),!t.cards)return a.a.createElement("div",null);var o=Object.keys(t.cards).filter((function(a){if(!t.cards[a].checklist&&t.cards[a]._planId===n[0]&&("actions"===e.type&&t.cards[a]&&t.cards[a].type&&"objective"!==t.cards[a].type&&"goal"!==t.cards[a].type&&"plan"!==t.cards[a].type&&"link"!==t.cards[a].type&&"insight"!==t.cards[a].type&&"chatGroup"!==t.cards[a].type&&-1===t.cards[a].type.indexOf("guideline")&&"swot"!==r.filter((function(e){return e.name===t.cards[a].type}))[0].module||"guidelines"===e.type&&t.cards[a].type.indexOf("guideline")>-1||"objectives"===e.type&&t.cards[a].type.indexOf("objective")>-1||"goals"===e.type&&t.cards[a].type.indexOf("goal")>-1))return!0})).map((function(e){return t.cards[e]}));return a.a.createElement("div",null,a.a.createElement(wn,{title:null,icon:null,color:Object(S.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:t.orderByTitle?"$__orderByName":"$__orderByManualOrder",icon:t.orderByTitle?"sort":"format_list_numbered",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitle:!t.orderByTitle}))}},t.orderByTitle&&{title:"ASC"===t.orderByTitlePosition?"$__asc":"$__desc",icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitlePosition:"ASC"===t.orderByTitlePosition?"DESC":"ASC"}))}}]}),a.a.createElement(Ru,{cards:o}))})),Hu=r(1043),Wu=r(1733);function Uu(){Uu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Vu=Object(s.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r,n,o,i,l,s,u,f,m,g,b,v,y,x,O,w,j=c.a.getState(),E=j.db,k=(j.session,a.a.useState(!1)),L=Object(h.a)(k,2),C=L[0],I=L[1],T=a.a.useState(1),F=Object(h.a)(T,2),N=F[0],D=F[1],A=a.a.useState(1),P=Object(h.a)(A,2),z=P[0],M=P[1],B=a.a.useState(1),Y=Object(h.a)(B,2),R=Y[0],G=Y[1],H=a.a.useState({editor:!1,text:"",height:"auto"}),W=Object(h.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(h.a)(q,2),K=X[0],J=X[1],Z=a.a.useState({type:"comment",disabledSend:!1}),Q=Object(h.a)(Z,2),ee=Q[0],te=Q[1],re=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),ne=window.location.hash.split("/");ne[0]=ne[0].replace("#",""),36!==ne[0].length&&(ne[0]=null);var oe=Object(S.j)(),ie=Object(st.t)(ne[0]);a.a.useEffect((function(){C||(V(E.cards[ne[0]]&&E.cards[ne[0]].note?Object(d.a)(Object(d.a)({},U),{},{text:E.cards[ne[0]].note?E.cards[ne[0]].note:""}):Object(d.a)({},U)),I(!0))}));var ce=function(){var t=Object(p.a)(Uu().mark((function t(r){return Uu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!U.text&&!r){t.next=6;break}return t.next=3,Object(st.G)(e,!1,Object(d.a)(Object(d.a)({},E.cards[ne[0]]),{},{note:r?null:U.text}));case 3:t.sent&&Object(S.c)({message:Object(S.r)("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),V({editor:!1,text:r?"":U.text,height:"auto"});case 6:J(!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();if(!ne[0]||!ne[0]||!E.cards[ne[0]])return a.a.createElement(a.a.Fragment,null);var le=Object(st.k)(ne[0]),se={};return(null===(t=E.cards[ne[0]])||void 0===t?void 0:t.customColumns)&&(se=JSON.parse(E.cards[ne[0]].customColumns)),a.a.createElement("div",{style:{marginLeft:"-15px"}},a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:6,md:6,lg:6,style:{padding:0}},a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Ii,{style:{marginTop:"0"}},a.a.createElement(at,{title:Object(S.r)("$__planResume",1),icon:"blur_on",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},moreButton:!0,optionsProps:{transparent:!0,btColor:Object(S.d)("colorText")},options:ie&&parseInt(ie)>3||oe.owner||oe.planAdmin||oe.planEdit||oe.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:ne[0],module:"cardEdit",activeModule:"cardEdit",data:E.cards[ne[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),a.a.createElement(Di,null,a.a.createElement("div",{style:{width:"100%",color:Object(S.d)("menu")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.r)("$__name",1),":")," ",E.cards[ne[0]].name),a.a.createElement("div",{style:{width:"100%",color:Object(S.d)("menu")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.r)("$__description",1),":")," ",E.cards[ne[0]].description),!E.cards[ne[0]].isTemplate&&E.cards[ne[0]]&&E.cards[ne[0]]._users&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.r)("$__users","*"),":"),a.a.createElement(Nt,{_id:ne[0],noLimit:!0,avatarSize:"33px",permission:!0}))))),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",null,a.a.createElement(Ii,{style:{marginTop:"0"}},a.a.createElement(wn,{title:Object(S.r)("$__notes",1),icon:"note",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[].concat(Object(Ne.a)(U.text&&!U.editor?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){ce(!0)}},{title:"$__edit",icon:"edit",onClick:function(){V(Object(d.a)(Object(d.a)({},U),{},{editor:!0}))}}]:[]),[K&&{title:"$__saveNote",icon:"save",onClick:function(){ce()}},U.editor&&{title:"$__cancel",icon:"cancel",onClick:function(){V(Object(d.a)(Object(d.a)({},U),{},{text:E.cards[ne[0]].note,editor:!1})),J(!1)}}])}),a.a.createElement(Di,{style:{display:"flex",justifyContent:"center"}},U.text||U.editor?U.editor?a.a.createElement(Wu.a,{style:{borderRadius:"7px",border:"0px",padding:"7px",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontSize:"16px",minWidth:"calc(100% - 0px)",maxWidth:"calc(100% - 0px)"},placeholder:Object(S.r)("$__planNotePlaceholder"),onChange:function(e){J(!0),V(Object(d.a)(Object(d.a)({},U),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==E.cards[ne[0]].note||(J(!1),V(Object(d.a)(Object(d.a)({},U),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},U.text):a.a.createElement("div",{style:{fontSize:"16px",width:"100%"},onClick:function(){V(Object(d.a)(Object(d.a)({},U),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:Object(S.o)(U.text)}}):a.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer"},onClick:function(){V(Object(d.a)(Object(d.a)({},U),{},{editor:!0}))}},a.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},a.a.createElement(ae.a,{size:"33px",color:"rgba(0,0,0,0.2)"},"add")),a.a.createElement("div",{style:{color:"rgba(0,0,0,0.2)",fontSize:"22px",fontWeight:"bold",marginLeft:"15px"}},Object(S.r)("$__addNote")))))))),a.a.createElement(fn,{xs:12,sm:6,md:6,lg:6},a.a.createElement("div",null,a.a.createElement(Ii,{style:{marginTop:"0",height:"500px"}},a.a.createElement(wn,{title:Object(S.r)("$__timeline",1),icon:"blur_on",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{name:"$__timeline",icon:"timeline",actionsSize:"22px",count:le.comment,onClick:function(){te({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",count:le.log,onClick:function(){te({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",count:le.timer,onClick:function(){te({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",count:le.kpi,onClick:function(){te({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),a.a.createElement(Di,null,a.a.createElement(Ea,Object(d.a)({nodeId:ne[0],db:"cards",loadTimeline:!0},ee)))))),a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12},a.a.createElement(un,null,!E.cards[ne[0]]||""===E.cards[ne[0]].planType||"operational"!==E.cards[ne[0]].planType&&"flow"!==E.cards[ne[0]].planType?a.a.createElement(fn,{xs:12,sm:6,md:6,lg:3},a.a.createElement(Ii,null,a.a.createElement(at,{title:Object(S.r)("$__matrix",1),icon:Do.a,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(zi,{style:{height:"300px",display:"flex"}},a.a.createElement(Hu.a,{data:{name:"root",children:[{name:Object(S.r)("$__guidelines",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&E.cards[e].type.indexOf("guideline")>-1})).length},{name:Object(S.r)("$__strength",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"strength"===E.cards[e].type})).length},{name:Object(S.r)("$__weakness",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"weakness"===E.cards[e].type})).length},{name:Object(S.r)("$__opportunity",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"opportunity"===E.cards[e].type})).length},{name:Object(S.r)("$__threat",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"threat"===E.cards[e].type})).length}]},margin:{top:20,right:20,bottom:20,left:20},id:"name",colors:{scheme:"purpleRed_green"},colorBy:"id",childColor:{from:"color",modifiers:[["brighter",.4]]},padding:1,leavesOnly:!0,enableLabels:!0,label:"value",labelTextColor:"#FFFFFF",borderColor:{from:"color",modifiers:[["darker",.3]]},animate:!1})),a.a.createElement(Di,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.r)("$__total",1),": ",Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&(E.cards[e].type.indexOf("guideline")>-1||"strength"===E.cards[e].type||"weakness"===E.cards[e].type||"opportunity"===E.cards[e].type||"threat"===E.cards[e].type)})).length)),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{icon:Do.a}),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__guidelines",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&E.cards[e].type.indexOf("guideline")>-1})).length)),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,null,"arrow_upward"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__strength",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"strength"===E.cards[e].type})).length)),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,null,"arrow_downward"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__weakness",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"weakness"===E.cards[e].type})).length)),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,null,"trending_up"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__opportunity",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"opportunity"===E.cards[e].type})).length)),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,null,"trending_down"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__threat",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"threat"===E.cards[e].type})).length))))):a.a.createElement(fn,{xs:12,sm:6,md:6,lg:3},a.a.createElement(Ii,null,a.a.createElement(at,{title:(null===(r=se)||void 0===r||null===(n=r.guidelines)||void 0===n?void 0:n.name)?se.guidelines.name:Object(S.r)("$__guidelines",1),icon:(null===(o=se)||void 0===o||null===(i=o.guidelines)||void 0===i?void 0:i.icon)?se.guidelines.icon:Do.a,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(zi,{style:{height:"300px",display:"flex"}},a.a.createElement(wi.a,{data:[].concat(Object(Ne.a)(E.status.map((function(e,t){return{id:Object(S.r)(e.label,1),label:Object(S.r)(e.label,1),value:Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&!E.cards[t].deleted&&E.cards[t].type.indexOf("guideline")>-1&&E.cards[t].status&&E.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(S.r)("$__late",1),label:Object(S.r)("$__late",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&E.cards[e].type.indexOf("guideline")>-1&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Di,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.r)("$__total",1),": ",Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&E.cards[e].type.indexOf("guideline")>-1})).length)),E.status.map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)(e.label,1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&!E.cards[t].deleted&&E.cards[t].type.indexOf("guideline")>-1&&E.cards[t].status&&E.cards[t].status===e.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__late",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&E.cards[e].type.indexOf("guideline")>-1&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length))))),a.a.createElement(fn,{xs:12,sm:6,md:6,lg:3},a.a.createElement(Ii,null,a.a.createElement(at,{title:(null===(l=se)||void 0===l||null===(s=l.objectives)||void 0===s?void 0:s.name)?se.objectives.name:Object(S.r)("$__objectives",1),icon:(null===(u=se)||void 0===u||null===(f=u.objectives)||void 0===f?void 0:f.icon)?se.objectives.icon:"gps_fixed",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(zi,{style:{height:"300px",display:"flex"}},a.a.createElement(wi.a,{data:[].concat(Object(Ne.a)(E.status.map((function(e,t){return{id:Object(S.r)(e.label,1),label:Object(S.r)(e.label,1),value:Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&!E.cards[t].checklist&&!E.cards[t].deleted&&"objective"===E.cards[t].type&&E.cards[t].status&&E.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(S.r)("$__late",1),label:Object(S.r)("$__late",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&"objective"===E.cards[e].type&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Di,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.r)("$__total",1),": ",Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&!E.cards[e].checklist&&"objective"===E.cards[e].type})).length)),E.status.map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)(e.label,1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&"objective"===E.cards[t].type&&E.cards[t].status&&!E.cards[t].checklist&&E.cards[t].status===e.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__late",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&"objective"===E.cards[e].type&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length))))),a.a.createElement(fn,{xs:12,sm:6,md:6,lg:3},a.a.createElement(Ii,null,a.a.createElement(at,{title:(null===(m=se)||void 0===m||null===(g=m.goals)||void 0===g?void 0:g.name)?se.goals.name:Object(S.r)("$__goals",1),icon:(null===(b=se)||void 0===b||null===(v=b.goals)||void 0===v?void 0:v.icon)?se.goals.icon:"flag",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(zi,{style:{height:"300px",display:"flex"}},a.a.createElement(wi.a,{data:[].concat(Object(Ne.a)(E.status.map((function(e,t){return{id:Object(S.r)(e.label,1),label:Object(S.r)(e.label,1),value:Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&"goal"===E.cards[t].type&&!E.cards[t].checklist&&!E.cards[t].deleted&&E.cards[t].status&&E.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(S.r)("$__late",1),label:Object(S.r)("$__late",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&"goal"===E.cards[e].type&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Di,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.r)("$__total",1),": ",Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"goal"===E.cards[e].type})).length)),E.status.map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)(e.label,1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&"goal"===E.cards[t].type&&!E.cards[t].checklist&&!E.cards[t].deleted&&E.cards[t].status&&E.cards[t].status===e.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__late",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].checklist&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&"goal"===E.cards[e].type&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length))))),a.a.createElement(fn,{xs:12,sm:6,md:6,lg:3},a.a.createElement(Ii,null,a.a.createElement(at,{title:(null===(y=se)||void 0===y||null===(x=y.actions)||void 0===x?void 0:x.name)?se.actions.name:Object(S.r)("$__actions",1),icon:(null===(O=se)||void 0===O||null===(w=O.actions)||void 0===w?void 0:w.icon)?se.actions.icon:"play_arrow",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(zi,{style:{height:"300px",display:"flex"}},a.a.createElement(wi.a,{data:[].concat(Object(Ne.a)(E.status.map((function(e,t){return{id:Object(S.r)(e.label,1),label:Object(S.r)(e.label,1),value:Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&!E.cards[t].deleted&&E.cards[t].status&&E.cards[t].status===e.value&&("iniciative"===E.cards[t].type||"task"===E.cards[t].type||"meeting"===E.cards[t].type||"iniciative"===E.cards[t].type||"myTask"===E.cards[t].type||!E.cards[t].checklist||E.cards[t].checklist&&E.cards[t].showCard)})).length,color:e.color}}))),[{id:Object(S.r)("$__late",1),label:Object(S.r)("$__late",1),value:Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&("iniciative"===E.cards[e].type||"task"===E.cards[e].type||"meeting"===E.cards[e].type||"iniciative"===E.cards[e].type||"myTask"===E.cards[e].type||!E.cards[e].checklist||E.cards[e].checklist&&E.cards[e].showCard)&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:["#929497","#011E41","#EBA900","#5A7F71","red"],margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Di,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.r)("$__total",1),": ",Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&("iniciative"===E.cards[e].type||"task"===E.cards[e].type||"meeting"===E.cards[e].type||"iniciative"===E.cards[e].type||"myTask"===E.cards[e].type||!E.cards[e].checklist||E.cards[e].checklist&&E.cards[e].showCard)})).length)),E.status.map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)(e.label,1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(t){return E.cards[t]._planId===ne[0]&&!E.cards[t].deleted&&("iniciative"===E.cards[t].type||"task"===E.cards[t].type||"meeting"===E.cards[t].type||"iniciative"===E.cards[t].type||"myTask"===E.cards[t].type||!E.cards[t].checklist||E.cards[t].checklist&&E.cards[t].showCard)&&E.cards[t].status&&E.cards[t].status===e.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__late",1))),a.a.createElement("div",null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&("iniciative"===E.cards[e].type||"task"===E.cards[e].type||"meeting"===E.cards[e].type||"iniciative"===E.cards[e].type||"myTask"===E.cards[e].type||!E.cards[e].checklist||E.cards[e].checklist&&E.cards[e].showCard)&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length)))))))),a.a.createElement(un,null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"!==E.cards[e].status&&E.cards[e].startDate&&_()(new Date(1e3*E.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length>0&&a.a.createElement(fn,{md:6,xs:12},a.a.createElement(Ii,null,a.a.createElement(at,{title:Object(S.r)("$__nextActivities",1),icon:"pending_actions",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,null,a.a.createElement(un,null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&E.cards[e].startDate&&_()(new Date(1e3*E.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(re)).tz("America/Sao_Paulo").format()})).sort((function(e,t){var r=E.cards[e].completed_at&&E.cards[e].completed_at.low?parseInt(E.cards[e].completed_at.low):"string"===typeof E.cards[e].completed_at?E.cards[e].completed_at:0,n=E.cards[t].completed_at&&E.cards[t].completed_at.low?parseInt(E.cards[t].completed_at.low):"string"===typeof E.cards[t].completed_at?E.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=7*(z-1)&&t<7*z)return a.a.createElement(Dn,{db:"cards",key:e,data:E.cards[e],inLine:!0})})),Math.ceil(Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"!==E.cards[e].status&&E.cards[e].startDate&&_()(new Date(1e3*E.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length/7)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(yi.a,{page:z,count:Math.ceil(Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"!==E.cards[e].status&&E.cards[e].startDate&&_()(new Date(1e3*E.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){M(t)}})))))),Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"!==E.cards[e].status&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length>0&&a.a.createElement(fn,{md:6,xs:12},a.a.createElement(Ii,null,a.a.createElement(at,{title:Object(S.r)("$__lateActivities",1),icon:"pending_actions",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,null,a.a.createElement(un,null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&"completed"!==E.cards[e].status&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).sort((function(e,t){var r=E.cards[e].completed_at&&E.cards[e].completed_at.low?parseInt(E.cards[e].completed_at.low):"string"===typeof E.cards[e].completed_at?E.cards[e].completed_at:0,n=E.cards[t].completed_at&&E.cards[t].completed_at.low?parseInt(E.cards[t].completed_at.low):"string"===typeof E.cards[t].completed_at?E.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=7*(R-1)&&t<7*R)return a.a.createElement(Dn,{db:"cards",key:e,data:E.cards[e],inLine:!0})})),Math.ceil(Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"!==E.cards[e].status&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length/7)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(yi.a,{page:R,count:Math.ceil(Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"!==E.cards[e].status&&E.cards[e].endDate&&_()(new Date(1e3*E.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(re)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){G(t)}})))))),Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"===E.cards[e].status})).length>0&&a.a.createElement(fn,{md:6,xs:12},a.a.createElement(Ii,null,a.a.createElement(at,{title:Object(S.r)("$__lastCompletedCards",1),icon:"pending_actions",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,null,a.a.createElement(un,null,Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&(!E.cards[e].checklist||E.cards[e].checklist&&E.cards[e].showCard)&&"completed"===E.cards[e].status})).sort((function(e,t){var r=E.cards[e].completed_at&&E.cards[e].completed_at.low?parseInt(E.cards[e].completed_at.low):"string"===typeof E.cards[e].completed_at?E.cards[e].completed_at:0,n=E.cards[t].completed_at&&E.cards[t].completed_at.low?parseInt(E.cards[t].completed_at.low):"string"===typeof E.cards[t].completed_at?E.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=7*(N-1)&&t<7*N)return a.a.createElement(Dn,{db:"cards",key:e,data:E.cards[e],inLine:!0})})),Math.ceil(Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"===E.cards[e].status})).length/7)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(yi.a,{page:N,count:Math.ceil(Object.keys(E.cards).filter((function(e){return E.cards[e]._planId===ne[0]&&"completed"===E.cards[e].status})).length/7),onChange:function(e,t){D(t)}})))))),Object.keys(E.cards).filter((function(e){if(E.cards[e]._planId===ne[0]&&E.cards[e]._users&&Object.keys(E.cards[e]._users).filter((function(t){return E.cards[e]._users[t].myDay&&_()(new Date(1e3*E.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===re})).length>0)return!0})).length>0&&a.a.createElement(fn,{md:6,xs:12},a.a.createElement(Ii,null,a.a.createElement(at,{title:Object(S.r)("$__todayTasks",1),icon:"today",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Di,null,a.a.createElement(un,null,Object.keys(E.cards).filter((function(e){if(E.cards[e]._planId===ne[0]&&!E.cards[e].deleted&&E.cards[e]._users&&Object.keys(E.cards[e]._users).filter((function(t){return E.cards[e]._users[t].myDay&&_()(new Date(1e3*E.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===re})).length>0)return!0})).map((function(e){return a.a.createElement(Dn,{db:"cards",key:e,data:E.cards[e]})})))))),a.a.createElement(fn,{md:6,xs:12},a.a.createElement($,null,a.a.createElement(Wi,{nodeId:ne[0]})))))}));var qu,Xu=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(vl)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(25),d=Object(h.a)(u,2),p=d[0],f=d[1],m=window.location.hash.split("/");m[0]=m[0].replace("#","");var g={};return g=36===m[0].length?(g=Object.keys(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===m[0]&&"insight"===r.cards[e].type&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})):(g=Object.keys(r.cards).filter((function(e){return!r.cards[e]._parent&&"insight"===r.cards[e].type})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),a.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(g).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",l+1," ",Object(S.r)("$__of")," ",Math.ceil(Object.keys(g).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:Object.keys(g).length,page:l,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__insightsPerPage")}))),a.a.createElement(un,null,Object.keys(g).map((function(e,t){if(t<=(l+1)*p&&t>=l*p)return a.a.createElement(fn,{key:g[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dn,{db:"cards",data:g[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(g).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",l+1," ",Object(S.r)("$__of")," ",Math.ceil(Object.keys(g).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:Object.keys(g).length,page:l,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__insightsPerPage")}))))}))),Ku=r(1731),Ju=r(1835),Zu=r(1836),Qu=r(1834),ed=r(591),td=Object(z.a)({avatar:{backgroundColor:ed.a[100],color:ed.a[600]}});function rd(e){td();var t=e.open,r=(e.selectedValue,e.onClose);return a.a.createElement(Yt.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&a.a.createElement(Qu.a,{id:"simple-dialog-title"},e.title),a.a.createElement(R.a,null,e.options.map((function(e,t){return a.a.createElement(Ku.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},a.a.createElement(Ju.a,null,a.a.createElement(ae.a,{icon:e.icon})),a.a.createElement(Zu.a,{primary:Object(S.r)(e.name,1)}))}))))}function nd(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(h.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(Ee,{text:e.text?e.text:null,icon:e.icon?e.icon:"add_box",size:e.iconSize?e.iconSize:null,iconColor:e.iconColor?e.iconColor:Object(S.d)("medium"),onClick:function(){o(!0)}}),a.a.createElement(rd,{selectedValue:l,open:n,onClose:function(){var e;o(!1),s(e)},options:e.options}))}function ad(){ad=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var od,id=w.default.div(qu||(qu=Object(u.a)(["\n background-color:none;\n "]))),cd=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=c.a.getState().functions.socket,i=a.a.useState(e.defaultName?e.defaultName:""),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),36!==y[0].length&&(y[0]=null);var x=function(){var t=Object(p.a)(ad().mark((function t(){var r;return ad().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=c.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"add"},{_parent:y[0],planId:y[0]&&36===y[0].length?y[0]:null,name:s,type:e.cardType,status:"notStarted"},function(){var e=Object(p.a)(ad().mark((function e(t){return ad().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("card.UPD",{cardId:t.id,cardData:Object(d.a)(Object(d.a)({},t.data),{},{_parent:y[0],_timeline:Object(f.a)({},t.log._id,Object(d.a)(Object(d.a)({},t.log),{},{_parent:[t.id]})),_users:Object(f.a)({},n._id,{name:c.a.getState().db.users[n._id].name?c.a.getState().db.users[n._id].name:null,displayName:c.a.getState().db.users[n._id].displayName?c.a.getState().db.users[n._id].displayName:null,image:c.a.getState().db.users[n._id].image?c.a.getState().db.users[n._id].image:null,access:5,_id:n._id})})});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),u("");case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=function(){var t=Object(p.a)(ad().mark((function t(n){var a,i,l,s,u;return ad().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,i=n.source,l=n.draggableId,a){t.next=3;break}return t.abrupt("return",!1);case 3:if(a.droppableId!==i.droppableId||a.id!==i.index){t.next=5;break}return t.abrupt("return",!1);case 5:return(s=e.cards).splice(i.index,1),s.splice(a.index,0,l),ut.a.put("cards/reorder",{cards:s}),u={},s.map((function(e,t){return(u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},e,r.cards[e])))[e].order||(u[e].order.low=t),u[e].order.low=t,!0})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),u)})),o.emit("card.UPD",u),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(){var e=Object(p.a)(ad().mark((function e(t){return ad().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=Object(p.a)(ad().mark((function e(t){return ad().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement(Zt.a,{onDragEnd:_,onDragStart:O,onDragUpdate:w},a.a.createElement(Zt.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,n){return a.a.createElement(id,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),e.cards.map((function(e,t){return a.a.createElement(Zt.b,{draggableId:e,index:t,key:e},(function(t,n){return a.a.createElement(Dn,{provided:t,snapshot:n,data:r.cards[e],db:"cards",viewButton:!0,selectOption:!0})}))})),t.placeholder)}))),!b&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ee,{text:Object(S.r)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){v(!b)}})),b&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(tt,{label:Object(S.r)("$__nameOfCard"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)},onBlur:function(e){""===e.target.value&&v(!b)},onKeyDown:function(e){13===e.keyCode&&s&&x(),27===e.keyCode&&(v(!b),u(""))}},autoFocus:!0,value:s,placeholder:Object(S.r)("$__titleOfCard_placeholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return x()}},a.a.createElement(ae.a,{color:"green",icon:"save",title:Object(S.r)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){v(!b),u("")}},a.a.createElement(ae.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.r)("$__cancel","*"),size:e.actionsSize||"25px"}))))))}));function ld(){ld=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var sd=w.default.div(od||(od=Object(u.a)(["\n","\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return!e.inLine&&e.styles&&e.styles.discountHeight&&"height:calc(100vh - ".concat(e.styles.discountHeight,"px);")}),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),ud=Object(s.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){o||(i(!0),Object(st.I)(e))}));var l=function(){var r=Object(p.a)(ld().mark((function r(n){var a,o,i,l,s,u,p,h,m,g,b,v,y;return ld().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().functions.socket,o=n.destination,i=n.source,l=n.draggableId,!n.combine){r.next=4;break}return r.abrupt("return");case 4:if(o){r.next=6;break}return r.abrupt("return",!1);case 6:if(o.droppableId!==i.droppableId||o.id!==i.index){r.next=8;break}return r.abrupt("return",!1);case 8:if(s=i.droppableId,u=o.droppableId,p=Array.from(e.cards.filter((function(e){return e.type===s&&!e.deleted})).sort((function(e,t){return e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)<parseInt(t.order.low)?-1:e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)>parseInt(t.order.low)?1:0})).map((function(e){return e._id}))),s!==u){r.next=21;break}return(h=Array.from(e.cards.filter((function(e){return e.type===s&&!e.deleted})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)>parseInt(t.order.low)?1:0})).map((function(e){return e._id})))).splice(i.index,1),h.splice(o.index,0,l),m={},h.map((function(e,r){m[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},{order:{low:r}})})),g=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t.cards),m)}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:h,columnName:"type",sourceCards:[]}),r.abrupt("return");case 21:p.splice(i.index,1),b=Array.from(e.cards.filter((function(e){return e.type===u})).sort((function(e,t){return e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id}))),console.log(b),b.splice(o.index,0,l),v=Object(d.a)({},t.cards),p.map((function(e,t){v=Object(d.a)(Object(d.a)({},v),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},v[e]?v[e]:{}),{},{order:{low:t}})))})),b.map((function(e,t){v=Object(d.a)(Object(d.a)({},v),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},v[e]?v[e]:{}),{},{order:{low:t}})))})),y=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},v),{},Object(f.a)({},l,Object(d.a)(Object(d.a)({},v[l]),{},{type:u,order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},y)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"type",sourceCards:p});case 31:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement(Zt.a,{onDragEnd:l},a.a.createElement(Zt.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return a.a.createElement(sd,Object.assign({},e,{ref:r.innerRef}),t.swot.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(Mu,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),column:n,cards:e.cards.filter((function(e){return e.type===t.value})).sort((function(e,t){var r=0,n=0;return e.order&&String(e.order.low)&&(r=e.order.low),t.order&&String(t.order.low)&&(n=t.order.low),parseInt(r)<parseInt(n)?-1:parseInt(r)>parseInt(n)?1:0})).map((function(e){return Object(d.a)(Object(d.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,columnStyle:{minWidth:"300px"},viewButton:e.viewButton||!1,locked:!(!e.lockColumns||-1!==e.lockColumns.indexOf(t.value)),manualOrder:!0,isDropDisabled:!0}))})),r.placeholder)})))}));var dd,pd=Object(s.b)((function(e,t){return{store:e,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=c.a.getState().db,n=r.dataType,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=r.cards,p=window.location.hash.split("/");p[0]=p[0].replace("#",""),p[0]&&36!==p[0].length&&(p[0]=null),a.a.useEffect((function(){l||(s(!0),j())}));var m={};Object.keys(r.cards).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&(r.cards[e]._planId===p[0]||r.cards[e]._parent===p[0])})).map((function(e){m=Object(d.a)(Object(d.a)({},m),{},Object(f.a)({},e,r.cards[e]))}));var g,b=Object.keys(m).filter((function(e){return!0===m[e]._selected&&m[e].type&&m[e].type.indexOf("guideline")>-1&&m[e]._parent===p[0]}))[0]||null,v=Object.keys(m).filter((function(e){return!0===m[e]._selected&&m[e].type&&"objective"===m[e].type}))[0]||null,y=Object.keys(m).filter((function(e){return!0===m[e]._selected&&m[e].type&&"goal"===m[e].type}))[0]||null,x=Object.keys(m).filter((function(e){return"guidelineR"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),_=Object.keys(m).filter((function(e){return"guidelineC"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),O=Object.keys(m).filter((function(e){return"guidelineE"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),w=Object.keys(m).filter((function(e){return"guidelineD"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),j=function(){var t=Object(d.a)({},c.a.getState().db.cards);Object.keys(m).map((function(e){m[e]&&m[e]._selected&&(m[e]._selected=!1)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t),m)}))};y?g=Object.keys(m).filter((function(e){return m[e]._parent===y&&!m[e].checklist})):v?g=Object.keys(m).filter((function(e){return m[e]._parent===v&&!m[e].checklist})):b&&(g=Object.keys(m).filter((function(e){return m[e]._parent===b&&!m[e].checklist})));var E=Object.keys(m).filter((function(e){return m[e]._parent===p[0]})),k=m&&Object.keys(m).filter((function(e){return m[e]&&m[e]._selected&&m[e].type&&m[e].type.indexOf("guideline")>-1}));return a.a.createElement("div",{style:{width:"inherit"}},!v&&a.a.createElement(a.a.Fragment,null,a.a.createElement(M.a,{smDown:!0},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",marginRight:"14px",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(S.r)("$__internalAspects",1)),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(S.r)("$__externalAspects",1))),a.a.createElement(M.a,{smUp:!0},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 7px)",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(S.r)("$__s.W.O.T","*"))),a.a.createElement(ud,(t={cards:E.map((function(e){return m[e]})),showSelected:Object.keys(m).filter((function(e){return!0===m[e]._selected})).length>0,lockColumns:k.length>0&&"guidelineD"===m[k[0]].type?["strength","threat"]:k.length>0&&"guidelineR"===m[k[0]].type?["strength","opportunity"]:k.length>0&&"guidelineE"===m[k[0]].type?["weakness","threat"]:k.length>0&&"guidelineC"===m[k[0]].type?["weakness","opportunity"]:null,columnStyle:{minWidth:"calc(25% - 14px)"},showOrder:!0},Object(f.a)(t,"showSelected",Object.keys(m).filter((function(e){return!0===m[e]._selected})).length>0),Object(f.a)(t,"inLineAdd",!0),t))),a.a.createElement(un,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 28px)",marginRight:"14px",marginLeft:"14px",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(ae.a,{icon:Do.a,color:Object(S.d)("textColor"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},b?Object(S.r)("$__planning",1):"MATRIX SWOT"))),b?a.a.createElement(a.a.Fragment,null,a.a.createElement(fn,{md:3,sm:12,xs:12},a.a.createElement("div",null,a.a.createElement(wn,{title:"MATRIX SWOT",icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&u[b]&&u[b].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(Dn,{data:u[b],db:"cards",selectOption:!0,expanded:!0}),a.a.createElement(Ee,{icon:"undo",text:Object(S.r)("$__backToMatrix","*"),onClick:function(){j("guideline")}})),v&&a.a.createElement("div",null,a.a.createElement(wn,{title:Object(S.r)("$__objective",1),icon:n.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&u[v]&&u[v].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(Dn,{data:u[v],db:"cards",selectOption:!0,expanded:!0})),y&&a.a.createElement("div",null,a.a.createElement(wn,{title:Object(S.r)("$__goal",1),icon:n.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__new",icon:"add_box",color:Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"goal"===e.name}))[0].iniModule,db:"cards",data:{type:"goal",_parent:v,status:"notStarted"}}))}}]}),e.hidePrivate&&u[y]&&u[y].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(Dn,{data:u[y],db:"cards",selectOption:!0,expanded:!0}))),a.a.createElement(fn,{md:9,sm:12,xs:12},a.a.createElement(wn,{title:v&&!y?Object(S.r)("$__goals",1):v?Object(S.r)("$__actions",1):Object(S.r)("$__objectives",1),icon:v&&!y?n.filter((function(e){return"goal"===e.name}))[0].icon:v?"view_column":n.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},actionButtonsStyle:{position:"absolute",top:0,bottom:0,display:"flex",itemAligns:"center"},customButtons:[y?{component:a.a.createElement(nd,{iconColor:Object(S.d)("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:Object(S.r)("$__".concat(t.name),1),onClick:function(){return e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",db:"cards",data:{type:t.name,_parent:y,status:"notStarted"}}))}}}))})}:{title:"$__new",icon:"add_box",color:Object(S.d)("color"),actionsSize:"22px",show:!0,onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"objective"===e.name}))[0].iniModule,db:"cards",data:v?{type:"goal",_parent:v,status:"notStarted"}:{type:"objective",_parent:b,status:"notStarted"}}))}}]}),a.a.createElement(Ru,{cards:g.map((function(e){return m[e]})),viewButton:!0}))):a.a.createElement(fn,{md:12},a.a.createElement(un,{style:{paddingBottom:"33px"}},a.a.createElement(fn,{md:3,sm:12,xs:12},a.a.createElement(wn,{title:Object(S.r)("$__guidelineR",1),icon:n.filter((function(e){return"guidelineR"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.r)("$__guidelineRtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.r)("$__guidelineRdetails",1))),a.a.createElement(cd,{cards:x,cardType:"guidelineR"})),a.a.createElement(fn,{md:3,sm:12,xs:12},a.a.createElement(wn,{title:Object(S.r)("$__guidelineD",1),icon:n.filter((function(e){return"guidelineD"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.r)("$__guidelineDtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.r)("$__guidelineDdetails",1))),a.a.createElement(cd,{cards:w,cardType:"guidelineD"})),a.a.createElement(fn,{md:3,sm:12,xs:12},a.a.createElement(wn,{title:Object(S.r)("$__guidelineC",1),icon:n.filter((function(e){return"guidelineC"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.r)("$__guidelineCtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.r)("$__guidelineCdetails",1))),a.a.createElement(cd,{cards:_,cardType:"guidelineC"})),a.a.createElement(fn,{md:3,sm:12,xs:12},a.a.createElement(wn,{title:Object(S.r)("$__guidelineE",1),icon:n.filter((function(e){return"guidelineE"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.r)("$__guidelineEtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.r)("$__guidelineEdetails",1))),a.a.createElement(cd,{cards:O,cardType:"guidelineE"}))))))}));function fd(){fd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var hd=w.default.div(dd||(dd=Object(u.a)(["\nposition:absolute;\nheight:100%;\n","\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return!e.inLine&&e.styles&&e.styles.discountHeight&&"height:calc(100vh - ".concat(e.styles.discountHeight,"px);")}),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),md=Object(s.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=r.dataType,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState({}),g=Object(h.a)(m,2),b=g[0],v=g[1];a.a.useEffect((function(){}),[]);var y=window.location.hash.split("/");y[0]=y[0].replace("#",""),36!==y[0].length&&(y[0]=null);var x={};Object.keys(r.cards).filter((function(t){var a=Object(st.k)(t);if(r.cards[t]&&(!r.cards[t].private||r.cards[t].private&&r.cards[t]._users[n._id])&&(r.cards[t]._planId===y[0]||r.cards[t]._parent===y[0])&&(e.showCompleted||!e.showCompleted&&"completed"!==r.cards[t].status)&&(!e.onlyUnReaded||e.onlyUnReaded&&a.total>0))return!0})).map((function(e){x=Object(d.a)(Object(d.a)({},x),{},Object(f.a)({},e,r.cards[e]))}));var _=Object.keys(x).filter((function(e){return x[e]&&x[e].type&&!0===x[e]._selected&&x[e].type.indexOf("guideline")>-1})).length>0?Object.keys(x).filter((function(e){return x[e]&&x[e].type&&!0===x[e]._selected&&x[e].type.indexOf("guideline")>-1}))[0]:null,O=Object.keys(x).filter((function(e){return x[e]&&!0===x[e]._selected&&"objective"===x[e].type})).length>0?Object.keys(x).filter((function(e){return x[e]&&!0===x[e]._selected&&"objective"===x[e].type}))[0]:null,w=Object.keys(x).filter((function(e){return!0===x[e]._selected&&"goal"===x[e].type})).length>0?Object.keys(x).filter((function(e){return!0===x[e]._selected&&"goal"===x[e].type}))[0]:null,j=[{value:"guidelines",type:"guideline",label:"$__guidelines",icon:"alt_route",viewButton:!0,selectedParent:null},{value:"objectives",type:"objective",label:"$__objectives",icon:o.filter((function(e){return"objective"===e.name}))[0].icon,viewButton:!0,selectedParent:_},{value:"goals",type:"goal",label:"$__goals",icon:o.filter((function(e){return"goal"===e.name}))[0].icon,viewButton:!0,selectedParent:O||_},{value:"actions",type:"iniciative",label:"$__actions",icon:"double_arrow",selectedParent:w||O||_}],k={};k.guidelines=Object.keys(x).filter((function(e){return(x[e]._parent===y[0]||x[e]._planId===y[0])&&x[e].type&&x[e].type.indexOf("guideline")>-1}))||null,k.objectives=Object.keys(x).filter((function(e){return x[e].type&&"objective"===x[e].type&&(k.guidelines.indexOf(x[e]._parent)>-1||!_&&x[e]._planId===y[0])}))||null,k.objectives=Object.keys(x).filter((function(e){return"objective"===x[e].type&&!x[e].checklist&&(_&&x[e]._parent===_||!_&&x[e]._planId===y[0])})),k.objectives2=Object.keys(x).filter((function(e){if("objective"===x[e].type&&x[e]._parent!==_&&!x[e].checklist&&k.objectives.indexOf(x[e]._parent)>-1)return!0})),k.objectives2.map((function(e){-1===k.objectives.indexOf(e)&&k.objectives.push(e)})),k.goals=Object.keys(x).filter((function(e){return x[e].type&&"goal"===x[e].type&&(!O&&k.objectives.indexOf(x[e]._parent)>-1||O&&x[e]._parent===O||!O&&_&&x[e]._parent===_||!_&&!O&&x[e]._planId===y[0])}))||null,k.goals2=Object.keys(x).filter((function(e){return"goal"===x[e].type&&!x[e].checklist&&k.goals.indexOf(x[e]._parent)>-1})),k.goals2.map((function(e){-1===k.goals.indexOf(e)&&k.goals.push(e)})),k.actions=Object.keys(x).filter((function(e){return x[e].type&&!x[e].checklist&&"plan"!==x[e].type&&"objective"!==x[e].type&&"goal"!==x[e].type&&"feed"!==x[e].type&&"link"!==x[e].type&&"insight"!==x[e].type&&"link"!==x[e].type&&"chatGroup"!==x[e].type&&-1===x[e].type.indexOf("guideline")&&o.filter((function(t){return t.name===x[e].type})).length>0&&"swot"!==o.filter((function(t){return t.name===x[e].type}))[0].module&&(w&&x[e]._parent===w||!w&&O&&(x[e]._parent===O||k.goals.indexOf(x[e]._parent)>-1)||!w&&!O&&_&&(x[e]._parent===_||k.objectives.indexOf(x[e]._parent)>-1||k.goals.indexOf(x[e]._parent)>-1)||!w&&!O&&!_&&(!_&&k.guidelines.indexOf(x[e]._parent)>-1||!O&&k.objectives.indexOf(x[e]._parent)>-1||!w&&k.goals.indexOf(x[e]._parent)>-1)||!w&&!O&&!_&&!_&&!O&&!w&&x[e]._planId===y[0])}))||null,k.guidelines=k.guidelines.map((function(e){return x[e]})),k.objectives=k.objectives.map((function(e){return x[e]})),k.goals=k.goals.map((function(e){return x[e]})),k.actions=k.actions.map((function(e){return x[e]}));var L=function(){var t=Object(p.a)(fd().mark((function t(n){var a,o,i,l,s,p,h,m,g,b,y,_,O;return fd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,o=n.source,i=n.draggableId,r.cards,!n.combine){t.next=5;break}return Object(S.c)({message:"".concat(Object(S.r)("$__confirmLink",1),": ").concat(c.a.getState().db.cards[i].name," >>> ").concat(c.a.getState().db.cards[n.combine.draggableId]?c.a.getState().db.cards[n.combine.draggableId].name:""),variant:"warning",persist:!0,horizontal:"right",confirm:function(){Object(st.y)(e,{cardId:i,cardToLink:n.combine.draggableId})}}),t.abrupt("return");case 5:if(a){t.next=7;break}return t.abrupt("return",!1);case 7:if(a.droppableId!==o.droppableId||a.id!==o.index){t.next=9;break}return t.abrupt("return",!1);case 9:if(l=o.droppableId,s=a.droppableId,p=Array.from(Object.keys(x).filter((function(e){return x[e].status===l})).sort((function(e,t){return x[e].order&&x[t].order&&String(x[e].order.low)&&String(x[t].order.low)&&parseInt(x[e].order.low)<parseInt(x[t].order.low)?-1:1})).map((function(e){return e._id}))),l!==s||!c.a.getState().db.orderByTitle){t.next=14;break}return t.abrupt("return");case 14:if(l!==s||c.a.getState().db.orderByTitle){t.next=31;break}return h=c.a.getState().functions.socket,m="iniciative"===l?"action":l,(g=Array.from(k["".concat(m,"s")].filter((function(e){return e.status&&"completed"!==e.status})).sort((function(e,t){var r,n,a=(null===e||void 0===e||null===(r=e.order)||void 0===r?void 0:r.low)||!isNaN(null===e||void 0===e?void 0:e.order)||e.order?parseInt(e.order):0,o=(null===t||void 0===t||null===(n=t.order)||void 0===n?void 0:n.low)||!isNaN(null===t||void 0===t?void 0:t.order)||t.order?parseInt(t.order):0;return a<o?-1:a>o?1:0})).map((function(e){return e._id})))).splice(o.index,1),t.next=21,setTimeout(500);case 21:return g.splice(a.index,0,i),t.next=24,setTimeout(500);case 24:return h.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:g}),b=Object(d.a)({},c.a.getState().db.cards),t.next=28,new Promise((function(e,t){g.map((function(t,r){b=Object(d.a)(Object(d.a)({},b),{},Object(f.a)({},t,Object(d.a)(Object(d.a)({},b[t]),{},{order:"".concat(r+1)}))),r+1===g.length&&e(!0)}))}));case 28:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),b)})),t.abrupt("return");case 31:if(p.splice(o.index,1),(y=Array.from(Object.keys(x).filter((function(e){return e.status===s})).sort((function(e,t){return x[e].order&&x[t].order&&String(x[e].order.low)&&String(x[t].order.low)&&parseInt(x[e].order.low)<parseInt(x[t].order.low)?-1:1})).map((function(e){return e._id})))).splice(a.index,0,i),p.map((function(e,t){r.cards[e].order&&r.cards[e].order.low?r.cards[e].order.low=parseInt(t):r.cards[e]=Object(d.a)(Object(d.a)({},r.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(t))))})),y.map((function(e,t){r.cards[e].order&&r.cards[e].order.low?r.cards[e].order.low=parseInt(t):r.cards[e]=Object(d.a)(Object(d.a)({},r.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(t))))})),_=Object(st.s)(i),O={_id:i,type:a.droppableId,_childrens:_,_objectives:k.objectives.filter((function(e){return _[e._id]})).map((function(e){return e})),_goals:k.goals.filter((function(e){return _[e._id]})).map((function(e){return e}))},"goal"!==r.cards[i].type||"guideline"!==a.droppableId){t.next=42;break}return Object(S.c)({message:Object(S.r)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheObjectiveColumn",1),variant:"error",persist:!1,horizontal:"center"}),v({}),t.abrupt("return");case 42:if(-1!==r.cards[i].type.indexOf("guideline")||"objective"===r.cards[i].type||"goal"===r.cards[i].type||"guideline"!==a.droppableId&&"objective"!==a.droppableId){t.next=46;break}return Object(S.c)({message:Object(S.r)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheGoalsColumn",1),variant:"error",persist:!1,horizontal:"center"}),v({}),t.abrupt("return");case 46:r.cards[i].type.indexOf("guideline")>-1&&"guideline"!==r.cards[i].type?Object(S.c)({message:Object(S.r)("$__youCantMoveGuidelineWithSwotLinked",1),variant:"error",persist:!1,horizontal:"center"}):"guideline"===r.cards[i].type&&"guideline"!==a.droppableId&&(k.objectives.filter((function(e){return e._parent===i})).length>0||k.goals.filter((function(e){return e._parent===i})).length>0)||r.cards[i].type.indexOf("objective")>-1&&"guideline"!==a.droppableId&&"objective"!==a.droppableId&&k.goals.filter((function(e){return e._parent===i})).length>0?(v(O),u(!0)):Object(S.c)({message:"".concat(Object(S.r)("$__confirmTransformIn",1),": ").concat(Object(S.r)("$__".concat(a.droppableId))),variant:"warning",persist:!0,horizontal:"right",confirm:function(){C(O),r.cards[r.cards[i]._parent].type.indexOf(a.droppableId)>-1&&Object(st.y)(e,{cardId:i,cardToLink:r.cards[r.cards[i]._parent]._parent})},cancel:function(){v({})}});case 47:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(){var t=Object(p.a)(fd().mark((function t(r){var n;return fd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,b&&b._id&&(n=b),t.next=4,Object(st.N)(e,n);case 4:e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},n._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n._id]),{},{type:n.type})))})),v({});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var t=Object(p.a)(fd().mark((function t(r){var n;return fd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="goals"===r?b._goals:b._objectives,k[r].filter((function(e){return b._childrens[e._id]})).map(function(){var t=Object(p.a)(fd().mark((function t(a,o){return fd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.filter((function(e){return e._id===a._id})).map((function(e){e.type="goals"===r?"task":"goal"})),t.next=3,Object(st.N)(e,{_id:a._id,type:"goals"===r?"task":"goal"});case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),v(Object(d.a)(Object(d.a)({},b),"goals"===r?{_goals:n}:{_objectives:n}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=Object(p.a)(fd().mark((function t(){return fd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.N)(e,{_id:b._id,type:b.type});case 2:u(!1),v({});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Zt.a,{onDragEnd:L},a.a.createElement(Zt.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(hd,Object.assign({},e,{ref:t.innerRef}),j.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(Ks,Object.assign({},e,{key:t.value,columnId:t.type,isDropDisabled:!0,column:n,cards:k&&k[t.value]?k[t.value]:[],index:r,columnsSettings:!1,locked:!1,columnStyle:{minWidth:"200px"},viewButton:t.viewButton,isCombineEnabled:!0,inLineAdd:!0,selectedParent:t.selectedParent,cardColorPicker:!!e.showColors}))})),t.placeholder)}))),a.a.createElement(Yt.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:s},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(at,{title:Object(S.r)("$__attention",1),icon:"label",onCancel:function(){u(!1),v({})}})),a.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},b._childrens&&!b._skipGoals&&b._goals.length>0&&b._goals.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"gray"}},Object(S.r)("$__YouHaveLinkedGoals"),a.a.createElement("p",{style:{color:"red"}},Object(S.r)("$__ThisActionCanOnlyBeUndoneManually"))),b._goals.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(t,r){return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(Dn,{db:"cards",data:t,noShadow:!0}),a.a.createElement(H.a,{onClick:function(){Object(st.N)(e,{_id:t._id,type:"task"})}},a.a.createElement(ae.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.r)("$__transformInTask")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__skipAll"),text:Object(S.r)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){v(Object(d.a)(Object(d.a)({},b),{},{_skipGoals:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__changeAllInTasks"),text:Object(S.r)("$__changeAllInTasks"),icon:"change_circle",size:"25px",onClick:function(){I("goals"),v(Object(d.a)(Object(d.a)({},b),{},{_skipGoals:!0}))}})))),b._childrens&&!b._skipObjectives&&b._objectives.length>0&&b._objectives.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"gray"}},Object(S.r)("$__YouHaveLinkedObjectives"),a.a.createElement("p",{style:{color:"red"}},Object(S.r)("$__ThisActionCanOnlyBeUndoneManually"))),b._objectives.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(t,r){return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(Dn,{db:"cards",data:t,noShadow:!0}),a.a.createElement(H.a,{onClick:function(){Object(st.N)(e,{_id:t._id,type:"goal"})}},a.a.createElement(ae.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.r)("$__transformInGoal")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__skipAll"),text:Object(S.r)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){v(Object(d.a)(Object(d.a)({},b),{},{_skipObjectives:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__changeAllInGoal"),text:Object(S.r)("$__changeAllInGoal"),icon:"change_circle",size:"25px",onClick:function(){I("objectives"),v(Object(d.a)(Object(d.a)({},b),{},{_skipObjectives:!0}))}}))),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),icon:"cancel",size:"25px",onClick:function(){u(!1),v({})}}))),(b&&b._childrens&&Object.keys(b._childrens).length>0&&0===b._goals.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).length&&0===b._objectives.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).length||(b._skipGoals&&b._goals.length>0||b&&b._goals&&0===b._goals.length)&&(b._skipObjectives&&b._objectives.length>0||b&&b._objectives&&0===b._objectives.length))&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"red"}},Object(S.r)("$__clickInSaveToFinishMigration")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__cancel"),text:Object(S.r)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){u(!1),v({})}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(S.r)("$__save"),text:Object(S.r)("$__save"),icon:"done_all",size:"25px",onClick:function(){T()}})))))))})),gd=Object(z.a)(hl);var bd=Object(s.b)((function(e){return{store:{search:e.search,users:e.db.users}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=gd(),r=c.a.getState(),n=(r.usersStatus,r.db),o=r.search,i=r.session,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],p=s[1],m=a.a.useState(""),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(""),x=Object(h.a)(y,2),O=x[0],w=x[1],j=a.a.useState(""),E=Object(h.a)(j,2),k=E[0],L=E[1],C=[],I=window.location.hash.split("/");I[0]=I[0].replace("#",""),36!==I[0].length&&(I[0]=null);var T=window.location.pathname.split("/"),F="/".concat(T[1]),N=1;if(I[0]){var D=n.cards[I[0]]||{};(N=D&&D._users&&Object.keys(D._users).length>0?D._users[Object.keys(D._users).find((function(e){return e.indexOf(i._id)>-1}))]:0)&&N.access&&(N=N.access)}var A=function(t,r){c.a.getState().search.units.selected[t]&&Object.keys(c.a.getState().search.units.selected).filter((function(e){return c.a.getState().search.units.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{units:Object(d.a)(Object(d.a)({},c.a.getState().search.units),{},{selected:{}})},r?{groups:{selected:{}}}:{})):e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{units:Object(d.a)(Object(d.a)({},c.a.getState().search.units),{},{selected:Object(d.a)(Object(d.a)({},c.a.getState().search.units.selected&&c.a.getState().search.units.selected),{},Object(f.a)({},t,!c.a.getState().search.units.selected[t]))})},r?{groups:{selected:{}}}:{}))};return I[1]&&Fp.filter((function(e){return e.path===F})).length>0&&Fp.filter((function(e){return e.path===F}))[0].tabs&&Fp.filter((function(e){return e.path===F}))[0].tabs.length>0?(Fp.filter((function(e){return e.path===F}))[0].tabs&&Fp.filter((function(e){return e.path===F}))[0].tabs).map((function(e){e.path===I[1]&&(C=e.searchFields)})):Fp.filter((function(e){return e.path===F})).length>0&&Fp.filter((function(e){return e.path===F}))[0].searchFields&&(C=Fp.filter((function(e){return e.path===F}))[0].searchFields),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},C&&C.length>0&&C.indexOf("text")>-1&&a.a.createElement("div",{className:t.textField,style:{width:"100%"}},a.a.createElement(tt,{className:t.noLabelLight,label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:o.text,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(t){e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{text:t.target.value}))},onKeyDown:function(e){"27"===String(e.which)&&p(!1)}}})),C.indexOf("period")>-1&&a.a.createElement(a.a.Fragment,null,"PERIOD"),C.indexOf("date")>-1?a.a.createElement(a.a.Fragment,null,a.a.createElement(eo,{type:"datetime",onChangeStartDate:function(t){var r={startDate:_()(t).unix("x")};(!c.a.getState().search.cards.endDate||c.a.getState().search.cards.endDate<_()(t).unix("x"))&&(r=Object(d.a)(Object(d.a)({},r),{},{endDate:_()("".concat(_()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),r)}))},onChangeEndDate:function(t){e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{endDate:_()(t).unix("x")})}))},range:!0,startDate:c.a.getState().search.cards.startDate?new Date(1e3*c.a.getState().search.cards.startDate):null,endDate:c.a.getState().search.cards.endDate?new Date(1e3*c.a.getState().search.cards.endDate):null,onClear:function(){e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{startDate:null,endDate:null})}))}})):a.a.createElement(a.a.Fragment,null),C.indexOf("tags")>-1?a.a.createElement(Aa,{dbNode:"tag",options:c.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:o.tags,placeholder:Object(S.r)("$__tags"),onChange:function(t){e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{tags:t}))}}):a.a.createElement(a.a.Fragment,null),C.indexOf("status")>-1&&a.a.createElement(Mi.a,{style:{width:"100%",padding:0}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__status")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.status).map((function(e,t){if(o.cards.status[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(n.status.filter((function(t){return t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:n.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(Ri.a,{style:{minWidth:"100%"},control:a.a.createElement(it,{checked:!(!c.a.getState().search.cards.status||!c.a.getState().search.cards.status.all),onChange:function(){var t={};n.status.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e.value,!c.a.getState().search.cards.status.all))})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{status:Object(d.a)(Object(d.a)({},t),{},{all:!c.a.getState().search.cards.status.all})})}))},color:"default"}),label:Object(S.r)("$__allStatus")}),n.status.map((function(t,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Ri.a,{style:{minWidth:"100%"},control:a.a.createElement(it,{indeterminate:!!c.a.getState().search.cards.status.all,checked:!(!c.a.getState().search.cards.status||!c.a.getState().search.cards.status[t.value]),onChange:function(){var r=c.a.getState().search.cards.status;r.all&&n.status.map((function(e){r[e.value]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{status:Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.value,!!r.all||!c.a.getState().search.cards.status[t.value]))})}))},color:"default"}),label:Object(S.r)(t.label)}))}))))),C.indexOf("priority")>-1&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__priority")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.priority).map((function(e,t){if(o.cards.priority[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(n.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:n.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(Ri.a,{style:{minWidth:"100%"},control:a.a.createElement(it,{checked:!(!c.a.getState().search.cards.priority||!c.a.getState().search.cards.priority.all),onChange:function(){var t=c.a.getState().search.cards.priority;t.all?n.priority.map((function(e){t[String(e.value)]=!1})):n.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{priority:Object(d.a)(Object(d.a)({},t),{},{all:!c.a.getState().search.cards.priority.all})})}))},color:"default"}),label:Object(S.r)("$__allPriorities")}),n.priority.map((function(t,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Ri.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:a.a.createElement(it,{indeterminate:!(!c.a.getState().search.cards.priority||!c.a.getState().search.cards.priority.all),checked:!(!c.a.getState().search.cards.priority||!c.a.getState().search.cards.priority[t.value]),onChange:function(){var r=c.a.getState().search.cards.priority;r.all&&n.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{priority:Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.value,!!r.all||!c.a.getState().search.cards.priority[t.value]))})}))},color:"default"}),label:Object(S.r)(t.label)}))}))))),C.indexOf("risk")>-1&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__risk")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.risk).map((function(e,t){if(o.cards.risk[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(n.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:n.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(Ri.a,{style:{minWidth:"100%"},control:a.a.createElement(it,{checked:!(!c.a.getState().search.cards.risk||!c.a.getState().search.cards.risk.all),onChange:function(){var t=c.a.getState().search.cards.risk;t.all?n.priority.map((function(e){t[String(e.value)]=!1})):n.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{risk:Object(d.a)(Object(d.a)({},t),{},{all:!c.a.getState().search.cards.risk.all})})}))},color:"default"}),label:Object(S.r)("$__allPriorities")}),n.priority.map((function(t,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Ri.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:a.a.createElement(it,{indeterminate:!(!c.a.getState().search.cards.risk||!c.a.getState().search.cards.risk.all),checked:!(!c.a.getState().search.cards.risk||!c.a.getState().search.cards.risk[t.value]),onChange:function(){var r=c.a.getState().search.cards.risk;r.all&&n.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{risk:Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.value,!!r.all||!c.a.getState().search.cards.risk[t.value]))})}))},color:"default"}),label:Object(S.r)(t.label)}))}))))),C.indexOf("complexity")>-1&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__complexity")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.complexity).map((function(e,t){if(o.cards.complexity[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(n.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:n.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(Ri.a,{style:{minWidth:"100%"},control:a.a.createElement(it,{checked:!(!c.a.getState().search.cards.complexity||!c.a.getState().search.cards.complexity.all),onChange:function(){var t=c.a.getState().search.cards.complexity;t.all?n.priority.map((function(e){t[String(e.value)]=!1})):n.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{complexity:Object(d.a)(Object(d.a)({},t),{},{all:!c.a.getState().search.cards.complexity.all})})}))},color:"default"}),label:Object(S.r)("$__allPriorities")}),n.priority.map((function(t,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Ri.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:a.a.createElement(it,{indeterminate:!(!c.a.getState().search.cards.complexity||!c.a.getState().search.cards.complexity.all),checked:!(!c.a.getState().search.cards.complexity||!c.a.getState().search.cards.complexity[t.value]),onChange:function(){var r=c.a.getState().search.cards.complexity;r.all&&n.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{complexity:Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.value,!!r.all||!c.a.getState().search.cards.complexity[t.value]))})}))},color:"default"}),label:Object(S.r)(t.label)}))}))))),C.indexOf("impact")>-1&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.r)("$__impact")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(o.cards.impact).map((function(e,t){if(o.cards.impact[e]&&"all"!==e)return a.a.createElement(Ge.a,{title:Object(S.r)(n.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:n.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(Ri.a,{style:{minWidth:"100%"},control:a.a.createElement(it,{checked:!(!c.a.getState().search.cards.impact||!c.a.getState().search.cards.impact.all),onChange:function(){var t=c.a.getState().search.cards.impact;t.all?n.priority.map((function(e){t[String(e.value)]=!1})):n.priority.map((function(e){t[String(e.value)]=!0})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{impact:Object(d.a)(Object(d.a)({},t),{},{all:!c.a.getState().search.cards.impact.all})})}))},color:"default"}),label:Object(S.r)("$__allPriorities")}),n.priority.map((function(t,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Ri.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(t.color)},control:a.a.createElement(it,{indeterminate:!(!c.a.getState().search.cards.impact||!c.a.getState().search.cards.impact.all),checked:!(!c.a.getState().search.cards.impact||!c.a.getState().search.cards.impact[t.value]),onChange:function(){var r=c.a.getState().search.cards.impact;r.all&&n.priority.map((function(e){r[String(e.value)]=!1,r.all=!1})),e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().search.cards),{},{impact:Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.value,!!r.all||!c.a.getState().search.cards.impact[t.value]))})}))},color:"default"}),label:Object(S.r)(t.label)}))}))))),n.users&&Object.keys(n.users).length>0&&Object.keys(n.users).filter((function(e){if(n.users[e]&&n.users[e].type&&"user"!==n.users[e].type&&!n.users[e].deleted&&Object.keys(n.cards).filter((function(t){return n.cards[t]&&n.cards[t].client&&n.cards[t].client===e&&n.cards[t]._users&&n.cards[t]._users[i._id]})).length>0)return!0})).length>0&&C.indexOf("units")>-1&&o&&o.groups&&o.groups.selected&&0===Object.keys(o.groups.selected).length&&o.plans&&o.plans.selected&&0===Object.keys(o.plans.selected).length&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},Object(S.r)("$__units"),a.a.createElement(ct.a,{max:6},Object.keys(c.a.getState().search.units.selected).length>0&&Object.keys(c.a.getState().search.units.selected).map((function(e,t){return a.a.createElement(Ge.a,{title:n.users[e].name,key:t},a.a.createElement(Se.a,{alt:n.users[e].name,src:n.users[e].image||null},n.users[e].name.substr(0,1)))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(tt,{className:t.noLabelLight,label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:O,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(e){w(e.target.value)}}}),Object.keys(n.users).filter((function(e){return"user"!==n.users[e].type&&!n.users[e].deleted&&Object.keys(n.cards).filter((function(t){return n.cards[t]&&n.cards[t].client&&n.cards[t].client===e&&n.cards[t]._users&&n.cards[t]._users[i._id]})).length>0&&(""===O||n.users[e].name.toLowerCase().indexOf(O.toLowerCase())>-1)})).map((function(e){return a.a.createElement(a.a.Fragment,{key:e},a.a.createElement(Ri.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Se.a,{alt:n.users[e].name,src:n.users[e].image||null},n.users[e].name.substr(0,1)),a.a.createElement(it,{checked:!(!c.a.getState().search.units.selected||!c.a.getState().search.units.selected[e]),onChange:function(){!function(e){c.a.getState().search.groups.selected&&Object.keys(c.a.getState().search.groups.selected).length>0?Object(S.c)({message:Object(S.r)("$__alertGroupsFilterClear",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){A(e,!0)}}):A(e,!1)}(e)},color:"default"})),label:n.users[e].name||n.users[e].name}))}))))),n.users&&Object.keys(n.users).length>0&&C.indexOf("users")>-1&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},Object(S.r)("$__users"),a.a.createElement(ct.a,{max:6},Object.keys(c.a.getState().search.users.selected).length>0&&Object.keys(c.a.getState().search.users.selected).map((function(e,t){return a.a.createElement(Ge.a,{title:n.users[e].name,key:t},a.a.createElement(Se.a,{alt:n.users[e].name,src:n.users[e].image||null},n.users[e].name.substr(0,1)))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(tt,{className:t.noLabelLight,label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:b,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(e){v(e.target.value)}}}),Object.keys(n.users).filter((function(e){if("user"===n.users[e].type&&!n.users[e].deleted&&(0===Object.keys(o.units.selected).length||Object.keys(o.units.selected).length>0&&Object.keys(o.units.selected).filter((function(t){return t===e})).length>0)&&(!I[0]&&Object.keys(n.cards).filter((function(t){return n.cards[t]._users[e]&&"chatGroup"!==n.cards[t].type&&"plan"!==n.cards[t].type})).length>0||I[0]&&36===I[0].length&&Object.keys(n.cards).filter((function(t){return(n.cards[t]._planId===I[0]||n.cards[t]._id===I[0])&&n.cards[t]._users[e]&&"chatGroup"!==n.cards[t].type&&"plan"!==n.cards[t].type})).length>0)&&(""===b||""!==b&&(n.users[e]&&n.users[e].name&&n.users[e].name.toLowerCase().indexOf(b.toLowerCase())>-1||n.users[e].email.toLowerCase().indexOf(b.toLowerCase())>-1)))return!0})).sort((function(e,t){return n.users[e].name.trim().toLowerCase()<n.users[t].name.trim().toLowerCase()?-1:n.users[e].name.trim().toLowerCase()>n.users[t].name.trim().toLowerCase()?1:0})).map((function(t){return n.users&&n.users[t]&&n.users[t]._id&&a.a.createElement(a.a.Fragment,{key:t},a.a.createElement(Ri.a,{key:t,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Ae.a,{overlap:"rectangular",color:"secondary"},a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:n.users[t]._id},a.a.createElement(Se.a,{alt:n.users[t].name,src:n.users[t].image||null},n.users[t].name.substr(0,1)))),a.a.createElement(it,{checked:!(!c.a.getState().search.users.selected||!c.a.getState().search.users.selected[t]),onChange:function(){!function(t){c.a.getState().search.users.selected[t]&&Object.keys(c.a.getState().search.users.selected).filter((function(e){return c.a.getState().search.users.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().search.users),{},{selected:{}})})):e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().search.users),{},{selected:Object(d.a)(Object(d.a)({},c.a.getState().search.users.selected&&c.a.getState().search.users.selected),{},Object(f.a)({},t,!c.a.getState().search.users.selected[t]))})}))}(t)},color:"default"})),label:n.users[t].name}))}))))),Object.keys(n.cards).filter((function(e){return"plan"===n.cards[e].type&&!n.cards[e].deleted&&!n.cards[e].archived&&n.cards[e]._users&&n.cards[e]._users[i._id]&&Object.keys(n.cards).filter((function(t){return!n.cards[t].deleted&&n.cards[t]._planId===e&&n.cards[t]._users&&n.cards[t]._users[i._id]})).length>0})).length>0&&C.indexOf("plans")>-1&&a.a.createElement(Mi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(ae.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},Object(S.r)("$__plans"),a.a.createElement(ct.a,{max:6},Object.keys(c.a.getState().search.plans.selected).length>0&&Object.keys(c.a.getState().search.plans.selected).map((function(e,t){return a.a.createElement(Ge.a,{title:n.cards[e].name,key:t},a.a.createElement(Se.a,{alt:n.cards[e].name,src:n.cards[e].image||null,style:{width:33,height:33}},n.cards[e].name.substr(0,1)))}))))),a.a.createElement(Bi.a,{style:{minWidth:"100%",width:"100%"}},a.a.createElement(Gi.a,{style:{width:"100%"}},a.a.createElement(tt,{className:t.noLabelLight,label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:k,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("color")},"search")),onChange:function(e){L(e.target.value)}}}),Object.keys(n.cards).filter((function(e){return"plan"===n.cards[e].type&&!n.cards[e].deleted&&!n.cards[e].archived&&n.cards[e]._users&&n.cards[e]._users[i._id]&&Object.keys(n.cards).filter((function(t){return!n.cards[t].deleted&&n.cards[t]._planId===e&&n.cards[t]._users&&n.cards[t]._users[i._id]})).length>0&&(0===Object.keys(o.units.selected).length&&0===Object.keys(o.groups.selected).length||Object.keys(o.units.selected).length>0&&Object.keys(o.units.selected).filter((function(t){return t===n.cards[e].client})).length>0||Object.keys(o.groups.selected).length>0&&Object.keys(o.groups.selected).filter((function(t){return t===n.cards[e].client})).length>0)&&(""===k||n.cards[e].name.toLowerCase().indexOf(k.toLowerCase())>-1)})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(t){return a.a.createElement(a.a.Fragment,{key:t},a.a.createElement(Ri.a,{key:t,style:{width:"calc(100% - 15px)",paddingRight:"15px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Se.a,{alt:n.cards[t].name,src:n.cards[t].image||null},n.cards[t].name.substr(0,1)),a.a.createElement(it,{checked:!(!c.a.getState().search.plans.selected||!c.a.getState().search.plans.selected[t]),onChange:function(){!function(t){c.a.getState().search.plans.selected[t]&&Object.keys(c.a.getState().search.plans.selected).filter((function(e){return c.a.getState().search.plans.selected[e]})).length<=1?e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{plans:Object(d.a)(Object(d.a)({},c.a.getState().search.plans),{},{selected:{}})})):e.reduxFunction("ASYNC","SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().search),{},{plans:Object(d.a)(Object(d.a)({},c.a.getState().search.plans),{},{selected:Object(d.a)(Object(d.a)({},c.a.getState().search.plans.selected&&c.a.getState().search.plans.selected),{},Object(f.a)({},t,!c.a.getState().search.plans.selected[t]))})}))}(t)},color:"default"})),label:n.cards[t].name||n.cards[t].name,title:n.cards[t].name||n.cards[t].name}))}))))),a.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){p(!u)}},a.a.createElement(Ee,{reverse:!0,icon:"clear_all",text:Object(S.r)("$__removeFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR",{})}}))))})),vd=Object(z.a)((function(e){return{iconButtonStyleTransaparent:{padding:3,margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{padding:3,margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var yd=function(e){var t=vd(),r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useRef(null),l=function(t){c.current&&c.current.contains(t.target)||(i(!1),e.onClose&&e.onClose())};return a.a.createElement("div",{style:Object(d.a)({zIndex:"100 !important"},e.style?e.style:{})},a.a.createElement(Ge.a,{title:Object(S.r)("$__options",1)},e.hideText?a.a.createElement(ze.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!o&&e.onOpen&&e.onOpen(),o&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(ae.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"})):a.a.createElement(H.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!o&&e.onOpen&&e.onOpen(),o&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(S.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},Object(S.r)("$__filter")),a.a.createElement(ae.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:"filter_alt"})))),a.a.createElement(Re.a,{open:o,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(e){var t=e.TransitionProps;e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:l},a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(bd,{onChange:function(e){console.log(e)}})))))})))};function xd(){xd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var _d=Object(s.b)((function(e){return{groupByColor:e.db.groupByColor,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!0),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),k=j[0],L=j[1],C=window.location.hash.split("/");C[0]=C[0].replace("#",""),a.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{deleted:!1}))}}),[]),a.a.useEffect((function(){_&&I()}),[_]);var I=function(){var t=Object(p.a)(xd().mark((function t(){var r;return xd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(!0),(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),t.next=5,Object(Ke.b)(e,{idRel:r[0],cardLoad:"deleted"});case 5:t.sent&&L(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=0;return Object.keys(t.cards).filter((function(e){var r=Object(st.k)(e);if(t.cards[e]&&!t.cards[e].deleted&&(t.cards[e]._planId===C[0]||t.cards[e]._parent===C[0])&&(o||!o&&"completed"!==t.cards[e].status)&&r.total>0)return!0})).map((function(e){var t=Object(st.k)(e);T+=t.total})),a.a.createElement("div",null,a.a.createElement(fn,{md:12,sm:12,xs:12},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(yd,{style:{marginRight:"7px"}}),a.a.createElement(We,{text:Object(S.r)("$__options"),icon:"settings",horizontalButton:!0,size:"21px",color:"lightgray",btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?Object(S.r)("$__orderByAsc"):Object(S.r)("$__orderByDesc"),icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitlePosition:"ASC"===c.a.getState().db.orderByTitlePosition?"DESC":"ASC"}))}},{name:t.orderByTitle?Object(S.r)("$__manualOrder"):Object(S.r)("$__orderByName"),icon:t.orderByTitle?"drag_handle":"format_list_numbered_rtl",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitle:!c.a.getState().db.orderByTitle}))}},{name:u?Object(S.r)("$__hideCatenationColors"):Object(S.r)("$__showCatenationColors"),icon:"palette",color:u?"lightGray":Object(S.d)("menu"),onClick:function(){f((function(e){return!e}))}},{name:Object(S.r)("$__groupByColor"),icon:"gradient",color:t.groupByColor?Object(S.d)("menu"):"lightGray",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{groupByColor:!t.groupByColor}))}}]}),a.a.createElement("div",{style:{marginLeft:"7px",display:"flex",alignItems:"center"}},a.a.createElement(E.a,{title:o?Object(S.r)("$__hideCompleted","*"):Object(S.r)("$__showCompleted","*"),text:o?Object(S.r)("$__hideCompleted","*"):Object(S.r)("$__showCompleted","*"),color:o?Object(S.d)("menu"):"lightGray",icon:o?"toggle_on":"toggle_off",onClick:function(){i((function(e){return!e}))},size:"21px",style:{padding:"0px !important"}}),T>0?a.a.createElement(E.a,{title:b?Object(S.r)("$__hideUnreaded","*"):Object(S.r)("$__showUnreaded","*"),text:b?Object(S.r)("$__hideUnreaded","*"):Object(S.r)("$__showUnreaded","*"),color:b?Object(S.d)("menu"):"lightGray",icon:b?"toggle_on":"toggle_off",onClick:function(){v((function(e){return!e}))},badgeContent:T,size:"21px",style:{marginLeft:"7px",padding:"0px !important"}}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(E.a,{title:c.a.getState().controls.deleted?Object(S.r)("$__hideDeleted"):Object(S.r)("$__showDeleted"),color:c.a.getState().controls.deleted?"red":"lightgray",load:k,icon:"recycling",onClick:function(){O((function(e){return!e})),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{deleted:!_}))},size:"21px",style:{padding:"0px !important"}}))))),a.a.createElement(fn,{md:12,style:{marginLeft:"-30px"}},a.a.createElement(md,{nodeId:C[0]||null,showCompleted:o,showColors:u,onlyUnReaded:b,styles:{discountHeight:140}})))}));var Od=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(vl)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(25),d=Object(h.a)(u,2),p=d[0],f=d[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=(g[0],g[1],window.location.hash.split("/"));b[0]=b[0].replace("#","");var v={};return v=36===b[0].length?(v=Object.keys(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===b[0]&&"link"===r.cards[e].type&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})):(v=Object.keys(r.cards).filter((function(e){return!r.cards[e]._parent&&"link"===r.cards[e].type})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),a.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(v).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",l+1," ",Object(S.r)("$__of")," ",Math.ceil(Object.keys(v).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:Object.keys(v).length,page:l,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__cardsPerPage")}))),a.a.createElement(un,null,Object.keys(v).map((function(e,t){if(t<=(l+1)*p&&t>=l*p)return a.a.createElement(fn,{key:v[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dn,{db:"cards",data:v[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(v).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.r)("$__page")," ",l+1," ",Object(S.r)("$__of")," ",Math.ceil(Object.keys(v).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(rl.a,{component:"div",count:Object.keys(v).length,page:l,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.r)("$__cardsPerPage")}))))}))),wd=r(576),jd=r.n(wd);var Ed=Object(s.b)((function(e){return{store:{plans:Object.keys(e.db.cards).filter((function(t){return"plan"===e.db.cards[t].type}))}}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=t.search,i=Object(S.j)(),l=window.location.hash.split("/");l[0]=l[0].replace("#","");var s=[];return s=Object.keys(r.cards).filter((function(e){return"plan"===r.cards[e].type&&("trash"!==l[1]&&!r.cards[e].deleted||"trash"===l[1]&&r.cards[e].deleted)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return r.cards[e]})),s=i&&!i.owner&&!i.planAdmin&&!i.planEdit&&!i.planRead&&!i.planModerate&&r.cards&&n&&n._id||!r.adminView?Object.keys(r.cards).filter((function(e){return r.cards[e]&&"plan"===r.cards[e].type&&(!r.cards[e].private||r.cards[e].private&&r.cards[e]._users&&r.cards[e]._users[n._id])&&("templates"===l[1]||"templates"!==l[1]&&r.cards[e]._users&&Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||"admin"===l[1]&&r.cards[e]._users&&0===Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return r.cards[e]})):Object.keys(r.cards).filter((function(e){return r.cards[e]&&"plan"===r.cards[e].type&&r.cards[e]._users&&(Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||!r.cards[e].private&&Object.keys(r.cards[e]._users).filter((function(e){return e!==n._id})).length>0)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return r.cards[e]})),o.text&&(s=s.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(o.text.toLowerCase())>-1)})).map((function(e){return e}))),s=(s=s.filter((function(e){return!!(e&&e.status&&o.cards.status[e.status]||!e.status&&o.cards.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&o.cards.priority[e.priority]||o.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(o.users.selected).length>0&&(s=s.filter((function(e){var t=!1;if(!o.users.selected.unassigned||e._users&&0!==Object.keys(e._users).length){if(!o.users.selected.unassigned&&e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).filter((function(e){o.users.selected[e]&&(t=!0)})),t}else t=!0})).map((function(e){return e}))),Object.keys(o.units.selected).length>0&&(s=s.filter((function(e){return!(!o.units.selected.unassigned||e.client)||(!(!e.client||!o.units.selected[e.client]||!0!==o.units.selected[e.client])||void 0)})).map((function(e){return e}))),o.tags.length>0&&(s=s.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return o.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),a.a.createElement(un,{style:{marginTop:"7px"}},s&&s.length>0&&s.filter((function(e){if((!e._planId||e._planId&&0===s.filter((function(t){return t._id===e._planId})).length)&&("templates"!==l[1]&&(!e.isTemplate||e.isTemplate&&"trash"===l[1])||"templates"===l[1]&&e.isTemplate)&&("archived"===l[1]&&e.archived||"archived"!==l[1]&&!e.archived)&&("trash"===l[1]&&e.deleted||"trash"!==l[1]&&!e.deleted))return!0})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){var t;return a.a.createElement(fn,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dn,(t={db:"cards",data:e},Object(f.a)(t,"db","cards"),Object(f.a)(t,"Avatar",!0),Object(f.a)(t,"expanded",!0),Object(f.a)(t,"ignoreList",!0),t)))})),r.loaded&&(!s||0===s.length)&&a.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{src:jd.a})))}))),Sd=r(600),kd=r.n(Sd),Ld=r(601),Cd=r.n(Ld);function Id(){Id=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Td=function(e){var t=c.a.getState().db.users,r=c.a.getState().db.cards,n=Object.keys(r).filter((function(t){return r[t].client===e.id&&"plan"===r[t].type&&!r[t].deleted&&!r[t].archived&&!r[t].isTemplate&&(!e.completed&&"completed"!==r[t].status||e.completed&&"completed"===r[t].status)})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return r[e]}));return a.a.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},Object.keys(t).filter((function(r){return t[r]&&t[r]._parent===e.id})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%"}},Object(S.r)("$__users",1),":"),a.a.createElement(ct.a,{max:12},Object.keys(t).filter((function(r){return t[r]&&t[r]._parent===e.id})).map((function(e,r){return a.a.createElement(Ge.a,{title:t[e].name,key:e},a.a.createElement(Se.a,{alt:t[e].name,src:t[e].image||null,style:{width:"23px",height:"23px"}},t[e].name.substr(0,1)))})))),n.length>0&&a.a.createElement("div",{style:{width:"100%"}},n.map((function(e,t){return a.a.createElement("div",{key:"".concat(e._id,"-").concat(t)},a.a.createElement(Dn,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},Fd=Object(s.b)((function(e){return{usersStatus:e.usersStatus,users:e.db.users}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(so)((function(e){var t,r,n=e.data,o=(e.classes,c.a.getState()),l=o.db,s=o.session,u=(o.usersStatus,a.a.useState(!1)),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(null),y=Object(h.a)(v,2),x=y[0],O=y[1];_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a.a.useEffect((function(){g||(b(!0),w())}));var w=function(){var e=Object(p.a)(Id().mark((function e(){return Id().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=[],k={};return Object.keys(l.cards).filter((function(e){return!!(l.cards[e]&&"chatGroup"!==l.cards[e].type&&"link"!==l.cards[e].type&&"insight"!==l.cards[e].type&&l.cards[e]._users&&Object.keys(l.cards[e]._users).length>0&&1===Object.keys(l.cards[e]._users).filter((function(e){return e===n._id})).length)})).map((function(e){if(l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0]&&l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0].module&&"swot"!==l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0].module||l.cards[e]&&l.cards[e].type&&l.dataType.filter((function(t){return t.name===l.cards[e].type})).length>0&&"swot"===l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0].module){var t,r;if(l.cards[e]&&l.cards[e].status&&"completed"!==l.cards[e].status)k=Object(d.a)(Object(d.a)({},k),{},(t={},Object(f.a)(t,l.cards[e].status,k&&k[l.cards[e].status]?k[l.cards[e].status]+1:1),Object(f.a)(t,"total",k.total?k.total+1:1),Object(f.a)(t,"late",l.cards[e].endDate&&_()(new Date(1e3*l.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()().tz("America/Sao_Paulo").format()?k.late?k.late+1:1:k.late?k.late:0),t));else k=Object(d.a)(Object(d.a)({},k),{},(r={},Object(f.a)(r,"completed",k&&k.completed?k.completed+1:1),Object(f.a)(r,"total",k.total?k.total+1:1),r));E[l.cards[e].type]=E[l.cards[e].type]?E[l.cards[e].type]+1:1}else E.swot=null==E.swot?1:E.swot+1})),E=[],k={},e.expanded?a.a.createElement("div",{style:Object(d.a)({boxShadow:"0 0 3px 3px rgba(0,0,0,0.1)",position:"relative",marginLeft:"15px"},e.onClick?{cursor:"pointer"}:{}),onClick:e.onClick?function(){e.onClick()}:null},a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),height:"43px",paddingLeft:"60px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",left:"15px"}},(n.name,n.name),!e.resume&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(ae.a,{color:Object(S.d)("color"),icon:"close",onClick:function(){i.a.push("c#tab/".concat(j[1]))}})))),!x&&n.image?a.a.createElement("img",{style:{width:"70px",height:"70px",top:"-20px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color"))},src:"".concat(n.image?n.image:n.type&&"user"!==n.type?Cd.a:kd.a),onError:function(e){O(null)},onLoad:function(e){O("".concat(n.image?n.image:n.type&&"user"!==n.type?Cd.a:kd.a))},width:"100%"}):n.image?a.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),backgroundImage:'url("'.concat(x,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):a.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},n.type&&"user"!==n.type?a.a.createElement(ae.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(ae.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"person"))):a.a.createElement("div",{style:{marginTop:"33px",width:e.style&&e.style.width?e.style.width:"calc(100% - 15px)",minHeight:"120px",backgroundColor:"#FFFFFF",boxShadow:"0 0 3px 3px rgba(0,0,0,0.1)",position:"relative",marginLeft:e.style&&e.style.marginLeft?e.style.marginLeft:"15px"}},a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),height:"43px",paddingLeft:"95px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(n.name,n.name)),!e.resume&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&(!n.independentAccount||n.independentAccount&&s&&s.matrixAdmin)&&(!n._parent||n._parent&&c.a.getState().db.users[n._parent]&&!c.a.getState().db.users[n._parent].independentAccount)&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(ae.a,{color:Object(S.d)("color"),icon:"create",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},l.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(d.a)({type:"user"},n)}))}})),!e.noActions&&"user"!==n.type&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(ae.a,{color:Object(S.d)("color"),icon:"contacts",onClick:function(){i.a.push("c#tab/units/".concat(n._id))}})),!e.noActions&&"sic"===n.type&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(ae.a,{color:Object(S.d)("color"),icon:"badge",onClick:function(){i.a.push("c#tab/units/".concat(n._id))}})))),n.image&&(!x||n.image&&n.image!==x)?a.a.createElement("img",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color"))},src:"".concat(n.image?n.image:n.type&&"user"!==n.type?Cd.a:kd.a),onError:function(e){},onLoad:function(e){O("".concat(n.image?n.image:null))},width:"100%"}):n.image?a.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),backgroundImage:'url("'.concat(x,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):a.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},n.type&&"user"!==n.type?a.a.createElement(ae.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(ae.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"person")),e.children?e.children:a.a.createElement(a.a.Fragment,null,(null===n||void 0===n||null===(t=n._access)||void 0===t?void 0:t.enabled)&&"user"===n.type?a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-end",fontSize:12,color:Object(S.d)("medium"),padding:"3px 7px"}},(null===n||void 0===n||null===(r=n._access)||void 0===r?void 0:r.admin)?a.a.createElement(a.a.Fragment,null,a.a.createElement(ae.a,{color:Object(S.d)("medium"),size:"12px"},"supervisor_account"),a.a.createElement("span",null,Object(S.r)("$__supervisorAccount"))):a.a.createElement(a.a.Fragment,null,a.a.createElement(ae.a,{color:Object(S.d)("medium"),size:"12px"},"supervised_user_circle"),a.a.createElement("span",null,Object(S.r)("$__guest")))):"user"===n.type&&n._access&&!n._access.enabled?a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",color:"red",fontSize:10}},Object(S.r)("$__notEnabled")):a.a.createElement(a.a.Fragment,null),n.groups&&n.groups.length>0?a.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),paddingLeft:"94px",paddingRight:"15px",marginTop:"15px"}},n.groups.filter((function(e){return e.value})).sort((function(e,t){return e.label<t.label?-1:1})).map((function(e,t){return"".concat(t>0?" / ":"").concat(e.label)}))):"user"===n.type?a.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),paddingLeft:"94px",marginTop:"15px"}},Object(S.r)("$__doesntBelongToAGroup")):a.a.createElement(a.a.Fragment,null),!e.noShowUsers&&"user"!==n.type&&a.a.createElement("div",{style:{marginTop:"11px",width:"100%",padding:"15px"}},a.a.createElement(Td,Object.assign({id:n._id},e))),"user"===n.type&&Object.keys(E).length>0?a.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},Object.keys(E).map((function(e,t){return"null"!==String(e)&&"undefined"!==String(e)?a.a.createElement(Oe.a,{overlap:"rectangular",key:t,style:{padding:3},icon:l.dataType.filter((function(t){return t.name===e}))[0].icon,title:Object(S.r)("$__".concat(e),1),size:"16px",count:E[e],disabled:!0}):null}))):a.a.createElement(a.a.Fragment,null),"user"===n.type&&k&&k.total>0?a.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},a.a.createElement("fieldset",{style:{padding:7,width:"calc(100% - 14px)"}},a.a.createElement("legend",{style:{color:"lightgray",fontSize:12}},Object(S.r)("$__openActivities")),a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.r)("$__total",1),": ",k.total)),l.status.filter((function(e){return"completed"!==e.value})).map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)(e.label,1))),a.a.createElement("div",null,k[e.value]?k[e.value]:0))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ae.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.r)("$__late",1))),a.a.createElement("div",null,k.late)))):a.a.createElement(a.a.Fragment,null),!e.resume&&a.a.createElement(Fe.a,{options:n.tags,showOptions:!1}),e.resume&&a.a.createElement("div",null,a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},userId:n._id},a.a.createElement(ae.a,{size:"27px"},"chat")))))})));var Nd=function(e){var t=c.a.getState().db,r=[];return e.plans.map((function(e){0===r.filter((function(t){return t._id===e.client})).length&&t.users[e.client]&&r.push(t.users[e.client])})),a.a.createElement(a.a.Fragment,null,r.sort((function(e,t){var r=e.displayName||e.name,n=t.displayName||t.name;return r<n?-1:r>n?1:0})).map((function(t,r){return a.a.createElement(fn,{key:"".concat(t._id,"-").concat(r),xs:12,sm:6,md:4,lg:4,xl:3,style:{height:"calc(100% - 34px)",padding:"0px 0px !important"}},a.a.createElement(Fd,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},Dd=function(e){return a.a.createElement(a.a.Fragment,null,e.plans.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e,t){return a.a.createElement(fn,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dn,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},Ad=Object(s.b)((function(e,t){return Object(d.a)(Object(d.a)({},t),{},{cards:e.db.cards})}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=t.search;a.a.useEffect((function(){}),[]);var i=Object(S.j)(),l=window.location.hash.split("/");l[0]=l[0].replace("#","");var s=[];return s=Object.keys(r.cards).filter((function(t){return"plan"===r.cards[t].type&&!r.cards[t].deleted&&!r.cards[t].isTemplate&&!r.cards[t].archived&&(!e.completed&&"completed"!==r.cards[t].status||e.completed&&"completed"===r.cards[t].status)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return r.cards[e]})),s=i&&!i.owner&&!i.planAdmin&&!i.planEdit&&!i.planRead&&!i.planModerate&&r.cards&&n&&n._id||!r.adminView?s.filter((function(e){return"plan"===e.type&&e&&e._users&&Object.keys(e._users).filter((function(t){return t===n._id||c.a.getState().db.users[t]&&c.a.getState().db.users[t].groups&&c.a.getState().db.users[t].groups.filter((function(t){return e._groups&&e._groups[t.value]})).length>0})).length>0})).sort((function(e,t){return e&&e.order&&t&&t.order&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e})):s.filter((function(e){return"plan"===e.type&&e&&e._users&&(Object.keys(e._users).filter((function(t){return t===n._id||c.a.getState().db.users[t]&&c.a.getState().db.users[t].groups&&c.a.getState().db.users[t].groups.filter((function(t){return e._groups&&e._groups[t.value]})).length>0})).length>0||!e.private&&Object.keys(e._users).filter((function(e){return e!==n._id})).length>0)})).sort((function(e,t){return e.order&&r.cards[t].order&&parseInt(e.order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return e})),o.text&&(s=s.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(o.text.toLowerCase())>-1)})).map((function(e){return e}))),s=(s=s.filter((function(e){return!!(e&&e.status&&o.cards.status[e.status]||!e.status&&o.cards.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&o.cards.priority[e.priority]||o.cards.priority.null&&!e.priority)})).map((function(e){return e})),Object.keys(o.users.selected).length>0&&(s=s.filter((function(e){var t=!1;if(!o.users.selected.unassigned||e._users&&0!==Object.keys(e._users).length){if(!o.users.selected.unassigned&&e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).filter((function(e){o.users.selected[e]&&(t=!0)})),t}else t=!0})).map((function(e){return e}))),Object.keys(o.units.selected).length>0&&(s=s.filter((function(e){return!(!o.units.selected.unassigned||e.client)||(!(!e.client||!o.units.selected[e.client]||!0!==o.units.selected[e.client])||void 0)})).map((function(e){return e}))),o.tags.length>0&&(s=s.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return o.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),a.a.createElement("div",null,s.filter((function(e){return e._isFavorite})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(wn,{title:Object(S.r)("$__myFavoritePlans",1),icon:"favorite",color:Object(S.d)("menu")}),a.a.createElement(un,null,a.a.createElement(Dd,{plans:s.filter((function(e){return e._isFavorite&&!e.private})).map((function(e){return e}))}))),s.filter((function(e){return e._isFavorite&&e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(wn,{title:Object(S.r)("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(un,null,a.a.createElement(Dd,{plans:s.filter((function(e){return e._isFavorite&&e.private})).map((function(e){return e}))}))),s.filter((function(e){return e.client&&r.users[e.client]})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(wn,{title:Object(S.r)("$__customerPlanning",1),icon:"business",color:Object(S.d)("menu")}),a.a.createElement(un,null,a.a.createElement(Nd,{plans:s.filter((function(e){return e.client})).map((function(e){return e})),completed:!!e.completed}))),s.filter((function(e){return!e.client&&!e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(wn,{title:Object(S.r)("$__accountPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(un,null,a.a.createElement(Dd,{plans:s.filter((function(e){return!e.client&&!e.private})).map((function(e){return e}))}))),s.filter((function(e){return e.client&&!r.users[e.client]})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(wn,{title:Object(S.r)("$__consultingPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(un,null,a.a.createElement(Dd,{plans:s.filter((function(e){return e.client&&!r.users[e.client]})).map((function(e){return e}))}))),s.filter((function(e){return!e.client&&e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(wn,{title:Object(S.r)("$__privatePlanning",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(un,null,a.a.createElement(Dd,{plans:s.filter((function(e){return!e.client&&e.private})).map((function(e){return e}))}))),r.loaded&&(!s||0===s.length)&&a.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{src:jd.a})))}));var Pd=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState().session;a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var r=window.location.hash.split("/");r[0]=r[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||i.a.push("sp#tab/home");var n=!0;return r[0]&&36===r[0].length&&!c.a.getState().db.cards[r[0]]&&(n=!1),r[0]&&36===r[0].length&&c.a.getState().db.cards[r[0]]&&!c.a.getState().db.cards[r[0]].isTemplate&&c.a.getState().db.cards[r[0]]._users&&!c.a.getState().db.cards[r[0]]._users[t._id]&&c.a.getState().db.cards[r[0]]._account&&c.a.getState().db.cards[r[0]]._account!==b()(t.account).toString()&&(n=!1),Object(st.B)(r[0])&&(n=Object(st.B)(r[0])),n?36===r[0].length&&c.a.getState().db.cards[r[0].replace("#","")]&&r[1]&&"board"===r[1]?a.a.createElement(Tu,{nodeId:r[0]||null}):a.a.createElement("div",{style:{height:"-webkit-fill-available"}},a.a.createElement(fl,null),(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"home"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ad,null)):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"completed"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ad,{completed:!0})):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&a.a.createElement(Ed,null),36===r[0].length&&c.a.getState().db.cards[r[0].replace("#","")]?a.a.createElement(a.a.Fragment,null,r[1]&&"matrix"===r[1]&&a.a.createElement(pd,null),r[1]&&("actions"===r[1]||"guidelines"===r[1]||"objectives"===r[1]||"goals"===r[1])&&a.a.createElement(Gu,{type:r[1]}),r[1]&&"dashboard"===r[1]&&a.a.createElement(Vu,null),r[1]&&"overview"===r[1]&&a.a.createElement(_d,null),r[1]&&"bright-and-connected"===r[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ql,null)),r[1]&&"insight-boards"===r[1]&&a.a.createElement(Xu,null),r[1]&&"radar"===r[1]&&a.a.createElement(Od,null),r[1]&&"library"===r[1]&&a.a.createElement(As,null),r[1]&&"planningBoard"===r[1]&&a.a.createElement("iframe",{style:{position:"absolute",width:"calc(100% - 30px)",height:"100%",border:"none"},src:"https://miro.com/S/live-embed/".concat(c.a.getState().db.cards[r[0]].miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")})):a.a.createElement(a.a.Fragment,null)):(i.a.push("/deniedAccess"),a.a.createElement(a.a.Fragment,null))})));function $d(){$d=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var zd=Object(s.b)((function(e){return{store:{db:{cards:e.db.cards,tag:e.db.tag}},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){var t=a.a.useState(null),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState([]),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState([]),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),k=j[0],L=j[1],C=c.a.getState().session,I=e.store.db,T=c.a.getState().db.dataType,F=Object(S.j)();a.a.useEffect((function(){return function(){}}),[]),a.a.useEffect((function(){D(),k&&N()}),[k]),a.a.useEffect((function(){_.length>0&&_[0]!==n&&(L(!1),o(_[0]));var e=setTimeout((function(){return D()}),400);return function(){return clearTimeout(e)}}),[I.cards,I.tag,_]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(_)&&O(e)})),a.a.useEffect((function(){var e=setTimeout((function(){return D()}),400);return function(){return clearTimeout(e)}}),[I.cards,I.tag]);var N=function(){Object(Ke.b)(e,{cardLoad:"tags",idRel:_[0],adminView:!0})},D=function(){var t=Object(p.a)($d().mark((function t(){var r,n;return $d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){e(Object.keys(I.cards).filter((function(e){return I.cards&&I.cards[e]&&!I.cards[e].deleted&&(!k&&C&&C._id&&I.cards[e]&&I.cards[e]._users&&I.cards[e]._users[C._id]||k&&(F.owner||F&&F.plan&&F.planAdmin))&&_&&_.length>0&&_[0]&&I.tag&&I.tag.filter((function(e){return e.value===_[0]||e.parent===_[0]})).length>0&&I.cards&&I.cards[e]._tags&&I.cards[e]._tags.filter((function(e){return e.value===_[0]||I.tag.filter((function(t){return t.parent===_[0]&&e.value===t.value})).length>0})).length>0&&(!I.cards[e].private||C&&C._id&&I.cards[e].private&&I.cards[e]._users&&I.cards[e]._users[C._id])})))})),t.next=3,r.then((function(e){return e}));case 3:(n=t.sent)&&(v(n),u(!1),e.onFinish&&e.onFinish());case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},s&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(Or,null)),I.tag.filter((function(e){return e.value===_[0]})).length>0?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:Object(d.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},I.tag.filter((function(e){return e.value===_[0]})).length>0&&I.tag.filter((function(e){return e.value===_[0]}))[0].color?{backgroundColor:I.tag.filter((function(e){return e.value===_[0]}))[0].color,color:I.tag.filter((function(e){return e.value===_[0]}))[0].color?Object(S.q)(I.tag.filter((function(e){return e.value===_[0]}))[0].color,!0):Object(S.d)("menu")}:{})},a.a.createElement(ae.a,{size:"22px",color:I.tag.filter((function(e){return e.value===_[0]}))[0].color?Object(S.q)(I.tag.filter((function(e){return e.value===_[0]}))[0].color,!0):Object(S.d)("menu"),icon:"tag"}),a.a.createElement("span",{style:{marginLeft:"7px"}},I.tag.filter((function(e){return e.value===_[0]}))[0].label)),F&&F.plan&&F.planAdmin&&F.user&&F.userAdmin?a.a.createElement("div",null,a.a.createElement(E.a,{title:Object(S.r)("$__adminMode"),text:Object(S.r)("$__adminMode"),color:k?Object(S.d)("menu"):"lightgrey",textColor:k?Object(S.d)("menu"):"lightgrey",icon:"manage_accounts",onClick:function(){L((function(e){return!e}))},style:{marginLeft:15},size:"25px"})):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{positin:"relative",width:"100%"}},a.a.createElement(un,null,b.filter((function(t){return I.cards[t].type.indexOf("plan")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)("$__plans",1),icon:T.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(S.d)("menu"),filterText:e.text,style:{padding:"7px"}}),a.a.createElement(un,null,b.filter((function(t){return"plan"===I.cards[t].type&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name<I.cards[t].name?-1:I.cards[e].name>I.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(fn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(Dn,{db:"cards",data:I.cards[t],showConnectedIn:!0,showTags:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),b.filter((function(t){return I.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)("$__guidelines",1),icon:T.filter((function(e){return"guideline"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(un,null,b.filter((function(t){return I.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return a.a.createElement(fn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(Dn,(n={db:"cards",data:I.cards[t]},Object(f.a)(n,"db","cards"),Object(f.a)(n,"showConnectedIn",!0),Object(f.a)(n,"searchText",e.text),Object(f.a)(n,"expanded",!0),Object(f.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),b.filter((function(t){return I.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)("$__objectives",1),icon:T.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(un,null,b.filter((function(t){return I.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return a.a.createElement(fn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(Dn,(n={db:"cards",data:I.cards[t]},Object(f.a)(n,"db","cards"),Object(f.a)(n,"showConnectedIn",!0),Object(f.a)(n,"searchText",e.text),Object(f.a)(n,"expanded",!0),Object(f.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),b.filter((function(t){return I.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)("$__goals",1),icon:T.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(un,null,b.filter((function(t){return I.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return a.a.createElement(fn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(Dn,(n={db:"cards",data:I.cards[t]},Object(f.a)(n,"db","cards"),Object(f.a)(n,"showConnectedIn",!0),Object(f.a)(n,"searchText",e.text),Object(f.a)(n,"expanded",!0),Object(f.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),b.filter((function(t){return T.filter((function(e){return e.name===I.cards[t].type})).length>0&&T.filter((function(e){return e.name===I.cards[t].type}))[0]&&"objective"!==I.cards[t].type&&"goal"!==I.cards[t].type&&"plan"!==I.cards[t].type&&"chatGroup"!==I.cards[t].type&&"link"!==I.cards[t].type&&"insight"!==I.cards[t].type&&-1===I.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)("$__actions",1),icon:"double_arrow",color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(un,null,b.filter((function(t){return T.filter((function(e){return e.name===I.cards[t].type})).length>0&&T.filter((function(e){return e.name===I.cards[t].type}))[0]&&"objective"!==I.cards[t].type&&"goal"!==I.cards[t].type&&"plan"!==I.cards[t].type&&"chatGroup"!==I.cards[t].type&&"link"!==I.cards[t].type&&"insight"!==I.cards[t].type&&-1===I.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(fn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(Dn,{db:"cards",data:I.cards[t],showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),b.filter((function(e){return"insight"===I.cards[e].type||"link"===I.cards[e].type})).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:"BRIGHT & CONNECTED",icon:Hr.a,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(un,null,b.filter((function(e){return"insight"===I.cards[e].type||"link"===I.cards[e].type})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(fn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(Dn,{db:"cards",data:I.cards[t],showConnectedIn:!0,expanded:!0,Avatar:!0,Resume:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))))))})));var Md=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 115px)"}},e.provisorio||"N\xe3o Autorizado")})),Bd={root:{}};var Yd=Object(s.b)((function(e){return{users:e.db.users,page:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Bd)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=(s[1],a.a.useState(!1)),p=Object(h.a)(d,2),f=p[0],m=(p[1],c.a.getState()),g=m.db,b=m.session,v=m.search,y=g.users,x=Object(S.j)();!function(){var e=c.a.getState().db.users;c.a.getState().session.maxUsers&&c.a.getState().session.maxUsers.low,Object.keys(e).filter((function(t){if(!e[t].deleted&&"user"===e[t].type&&(!e[t]._parent||e[t]._parent&&e[e[t]._parent]))return!0})).length}(),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(n)&&o(e)}));var _=Object.keys(y).filter((function(e){return!y[e].deleted})).map((function(e){return y[e]}));v.text&&(_=_.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(v.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"users"===n[1]&&(_=_.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&(_=_.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),v.users&&v.users.userGroup.length>0&&(_=_.filter((function(e){return e.groups.filter((function(e){return e.value===v.users.userGroup[0].value})).length>0})).map((function(e){return e}))),v.tags.length>0&&(_=_.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return v.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),v.userGroups.length>0&&(_=_.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return v.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var O=Object.keys(y).map((function(e){return y[e]}));if(v.text&&(O=O.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(v.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&(O=O.filter((function(e){return"user"===e.type&&e._parent===n[2]})).map((function(e){return e}))),v.users&&v.users.userGroup.length>0&&(O=O.filter((function(e){return e.groups.filter((function(e){return e.value===v.users.userGroup[0].value})).length>0})).map((function(e){return e}))),v.tags.length>0&&(O=O.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return v.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),v.userGroups.length>0&&(O=O.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return v.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),x&&!x.owner&&!x.user)return a.a.createElement(Md,null);window.location.hash.split("/")[0].replace("#","")||i.a.push("c#tab/units");var w=function(e,t){return!!(c.a.getState().db.users[t]&&c.a.getState().db.users[t].groups&&c.a.getState().db.users[t].groups.length>0&&c.a.getState().db.users[t].groups.filter((function(t){return t.value===e.value})).length>0&&(!u&&(!c.a.getState().db.users[t]._parent||c.a.getState().db.users[t]._parent===b.account)||u&&c.a.getState().db.users[t]._parent&&c.a.getState().db.users[t]._parent!==b.account)&&(!f&&!c.a.getState().db.users[t].deleted||f&&c.a.getState().db.users[t].deleted))};return a.a.createElement("div",null,a.a.createElement(fl,null),a.a.createElement("div",null,a.a.createElement(bl,null),a.a.createElement(un,null,"tab"===n[0]&&"departments"===n[1]?a.a.createElement("div",null,a.a.createElement("div",null,c.a.getState().db.userGroup.filter((function(e){if(Object.keys(c.a.getState().db.users).filter((function(t){return w(e,t)})).length>0)return!0})).map((function(e){var t=Object.keys(c.a.getState().db.users).filter((function(t){return w(e,t)}));return a.a.createElement("div",{key:e.value,style:{width:"100%",padding:7,marginBottom:77}},a.a.createElement(wn,Object.assign({title:e.label,icon:e.icon||null,color:Object(S.d)("menu"),style:{padding:"7px"}},x&&(x.userAdmin||x.userModerate)?{iconOnEditable:!0,editable:!0,onEdit:function(e){console.log(e)},placeholder:Object(S.r)("$__groupName")}:{})),a.a.createElement(un,null,t.sort((function(e,t){var r=c.a.getState().db.users[e].name.toLowerCase(),n=c.a.getState().db.users[t].name.toLowerCase();return r<n?-1:r<n?1:0})).map((function(t){return a.a.createElement(fn,{key:"".concat(e.value,"_").concat(t),xs:12,sm:6,md:4,lg:4,xl:3,style:{minWidth:"300px"}},a.a.createElement(Fd,{data:c.a.getState().db.users[t]}))}))))})))):a.a.createElement(a.a.Fragment,null,_.sort((function(e,t){return e&&e.name&&e.name<t.name||y&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return!n[2]||n[2]&&e._id===n[2]?a.a.createElement(fn,{key:e._id,xs:12,sm:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:6,md:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:4,lg:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:4,xl:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:3,style:{minWidth:"300px"}},a.a.createElement(Fd,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]])})):!n[2]&&a.a.createElement(fn,{key:e._id,xs:12,sm:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:6,md:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:4,lg:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:3,xl:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:3},a.a.createElement(Fd,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]])}))})),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&O.filter((function(e){return!e.deleted})).sort((function(e,t){return e&&e.name&&e.name<t.name||y&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return a.a.createElement(fn,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Fd,{data:e}))}))))))}))),Rd=Object(z.a)({clearfix:{"&:after,&:before":{display:"table",content:'" "'},"&:after":{clear:"both"}}});function Gd(){var e=Rd();return a.a.createElement("div",{className:e.clearfix})}var Hd={cardIcon:{"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{borderRadius:"3px",backgroundColor:W.q[0],padding:"7px",marginTop:"-20px",marginRight:"15px",float:"left"}},warningCardHeader:W.M,successCardHeader:W.F,dangerCardHeader:W.i,infoCardHeader:W.t,primaryCardHeader:W.y,roseCardHeader:W.C,customCardHeader:{}};Object(z.a)(Hd);var Wd={cardAvatar:{"&$cardAvatarProfile img,&$cardAvatarTestimonial img":{width:"100%",height:"auto"}},cardAvatarProfile:{maxWidth:"130px",maxHeight:"130px",margin:"-50px auto 0",borderRadius:"50%",overflow:"hidden",padding:"0",boxShadow:"0 16px 38px -12px rgba("+Object(W.r)(W.b)+", 0.56), 0 4px 25px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.b)+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarPlain:{},cardAvatarTestimonial:{margin:"-50px auto 0",maxWidth:"100px",maxHeight:"100px",borderRadius:"50%",overflow:"hidden",padding:"0",boxShadow:"0 16px 38px -12px rgba("+Object(W.r)(W.b)+", 0.56), 0 4px 25px 0px rgba("+Object(W.r)(W.b)+", 0.12), 0 8px 10px -5px rgba("+Object(W.r)(W.b)+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarTestimonialFooter:{marginBottom:"-50px",marginTop:"10px"}},Ud=["children","className","plain","profile","testimonial","testimonialFooter"],Vd=Object(z.a)(Wd);function qd(e){var t,r=Vd(),n=e.children,o=e.className,i=e.plain,c=e.profile,l=e.testimonial,s=e.testimonialFooter,u=Object(G.a)(e,Ud),d=y()((t={},Object(f.a)(t,r.cardAvatar,!0),Object(f.a)(t,r.cardAvatarProfile,c),Object(f.a)(t,r.cardAvatarPlain,i),Object(f.a)(t,r.cardAvatarTestimonial,l),Object(f.a)(t,r.cardAvatarTestimonialFooter,s),Object(f.a)(t,o,void 0!==o),t));return a.a.createElement("div",Object.assign({className:d},u),n)}var Xd={cardTitle:W.d,cardIconTitle:Object(d.a)(Object(d.a)({},W.d),{},{marginTop:"15px",marginBottom:0,"& small":{fontSize:"80%",fontWeight:"400"}}),cardCategory:{marginTop:"10px",color:W.q[0]+" !important",textAlign:"center"},description:{color:W.q[0]},updateProfileButton:{float:"right"}},Kd=Object(z.a)(Xd);Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Kd();return a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 7px)"}},a.a.createElement(un,null,a.a.createElement("div",{style:{position:"relative",width:"100%",boxShadow:"0px -2px 5px 2px rgba(0,0,0,0.1)",height:150,backgroundColor:"black",borderTopRightRadius:11,borderTopLeftRadius:11,backgroundPosition:"center center",backgroundSize:"cover",marginBottom:"-15px"}}),a.a.createElement(fn,{xs:12,sm:12,md:8},a.a.createElement(Ii,null,a.a.createElement(Di,null,a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:5},a.a.createElement(Mc,{labelText:"Company (disabled)",id:"company-disabled",formControlProps:{fullWidth:!0},inputProps:{disabled:!0}})),a.a.createElement(fn,{xs:12,sm:12,md:3},a.a.createElement(Mc,{labelText:"Username",id:"username",formControlProps:{fullWidth:!0}})),a.a.createElement(fn,{xs:12,sm:12,md:4},a.a.createElement(Mc,{labelText:"Email address",id:"email-address",formControlProps:{fullWidth:!0}}))),a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:6},a.a.createElement(Mc,{labelText:"First Name",id:"first-name",formControlProps:{fullWidth:!0}})),a.a.createElement(fn,{xs:12,sm:12,md:6},a.a.createElement(Mc,{labelText:"Last Name",id:"last-name",formControlProps:{fullWidth:!0}}))),a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:4},a.a.createElement(Mc,{labelText:"City",id:"city",formControlProps:{fullWidth:!0}})),a.a.createElement(fn,{xs:12,sm:12,md:4},a.a.createElement(Mc,{labelText:"Country",id:"country",formControlProps:{fullWidth:!0}})),a.a.createElement(fn,{xs:12,sm:12,md:4},a.a.createElement(Mc,{labelText:"Postal Code",id:"postal-code",formControlProps:{fullWidth:!0}}))),a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:12},a.a.createElement(Dc.a,{style:{color:"#AAAAAA"}},"About me"),a.a.createElement(Mc,{labelText:"Lamborghini Mercy, Your chick she so thirsty, I'm in that two seat Lambo.",id:"about-me",formControlProps:{fullWidth:!0},inputProps:{multiline:!0,rows:5}}))),a.a.createElement(X,{color:"rose",className:t.updateProfileButton},"Update Profile"),a.a.createElement(Gd,null)))),a.a.createElement(fn,{xs:12,sm:12,md:4},a.a.createElement(Ii,{db:"cards",profile:!0},a.a.createElement(qd,{profile:!0},a.a.createElement("a",{href:"#pablo",onClick:function(e){return e.preventDefault()}})),a.a.createElement(Di,{profile:!0},a.a.createElement("h6",{className:t.cardCategory},"CEO / CO-FOUNDER"),a.a.createElement("h4",{className:t.cardTitle},"Alec Thompson"),a.a.createElement("p",{className:t.description},"Don","'","t be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens\u2019 bed design but the back is..."),a.a.createElement(X,{color:"rose",round:!0},"Follow"))))))}));var Jd=r(1029);r(937);var Zd=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){c.a.getState().functions.socket;var t=a.a.useState({cvc:"",expiry:"",focus:"",name:"",number:""}),r=Object(h.a)(t,2),n=r[0],o=r[1];return Object(S.j)(),a.a.createElement("div",null,a.a.createElement(Jd.a,{cvc:n.cvc,expiry:n.expiry,focused:n.focus,name:n.name,number:n.number}),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.r)("$__paymentPreffer")),a.a.createElement("div",{style:{borderRadius:15,background:Object(S.d)("ColumnTitleColor"),color:"#FFFFFF",boxShadow:"0 0 3px 7px rgba(0,0,0,0.03)",padding:15}}),a.a.createElement(tt,{id:"sideModule_user_displayName",label:Object(S.r)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"number",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_comfy_ind"})),onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},"number",e.target.value)))}},value:n&&n.number?n.number:"",placeholder:Object(S.r)("$__cardNumber",1)})),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.r)("$__forceChangePassword")),a.a.createElement(hr,{checked:!!(n&&n._access&&n._access.user),onChange:function(e){},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__forceChangePasswordDescription")))})));function Qd(){Qd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ep=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=function(){var e=Object(p.a)(Qd().mark((function e(){return Qd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.a.getState().functions.socket.emit("data",{module:"galaxPay",method:"post",action:"integration"},{action:"reqData",accountData:c.a.getState().session.GlobalData},(function(e){console.log(e),e.error&&(console.log("companyDataError",e.error),console.log(e))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Zd,null),a.a.createElement("div",{style:{padding:15,backgroundColor:"black"},onClick:function(){t()}},"TEST"))})));function tp(){tp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var rp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState(),r=t.session,n=(t.functions,t.db,a.a.useState({})),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(r.GlobalData?r.GlobalData:{}),u=Object(h.a)(s,2),d=(u[0],u[1],a.a.useState(!1)),f=Object(h.a)(d,2),m=f[0],g=f[1],b=a.a.useState(!0),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){_()}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var _=function(){var e=Object(p.a)(tp().mark((function e(){var t,r,n,a,o,i=arguments;return tp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>0&&void 0!==i[0]&&i[0],n=r,e.next=4,dt.a.post("/ReqIntegrationToken");case 4:if(a=e.sent,n||!a||!(null===(t=a.data)||void 0===t?void 0:t.token)){e.next=9;break}l({secretKey:"Bearer ".concat(a.data.token)}),e.next=13;break;case 9:return e.next=11,ut.a.post("/api/token");case 11:(o=e.sent)&&l({secretKey:"Bearer ".concat(o.data.token)});case 13:x(!1);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},"Integra\xe7\xf5es",a.a.createElement($,null,y?a.a.createElement(Or,null):a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginTop:50}},a.a.createElement("legend",null,Object(S.r)("$__authorizationToken")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(tt,{label:Object(S.r)("$__authorizationToken",1),variant:Object(S.d)("fieldVariant"),name:"secretKey",InputLabelProps:{shrink:!0},InputProps:{multiline:!0,minRows:3,autoComplete:"new-password",type:m?"text":"password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement("div",{style:{cursor:"pointer",marginRight:7},onClick:function(){navigator.clipboard.writeText(i.secretKey)}},a.a.createElement(ae.a,{icon:"content_copy"})),a.a.createElement(ae.a,{icon:m?"visibility_off":"visibility",onClick:function(){g((function(e){return!e}))}}))},value:"".concat(i&&i.secretKey?i.secretKey:""),placeholder:Object(S.r)("$__secretKey",1),autoFocus:!0,disabled:!0})),a.a.createElement("i",null,Object(S.r)("$__secretKeyDescription"))),a.a.createElement("div",{style:{display:"none",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(S.r)("$__newToken"),text:Object(S.r)("$__newToken"),color:"green",icon:"refresh",size:"25px",onClick:function(){Object(S.c)({message:Object(S.r)("$__confirmApiTokenRevokeAndRecreate",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){}})}})))))))}))),np=r(308),ap=r(87),op=r(309),ip=r.n(op),cp=r(310),lp=r.n(cp);r(1640);function sp(){sp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var up=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.session,n=(t.db,a.a.useState({})),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(r.GlobalData?r.GlobalData:{}),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState({historyEditor:null}),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){l(r.GlobalData?r.GlobalData:{}),g(r.GlobalData?r.GlobalData:{});var e=ap.EditorState.createEmpty(),t=ap.EditorState.createEmpty(),n=ap.EditorState.createEmpty(),a=ap.EditorState.createEmpty(),o=ap.EditorState.createEmpty(),i=ap.EditorState.createEmpty();r.GlobalData.history&&(e=lp()("<div>".concat(r.GlobalData.history,"</div>")),e=ap.ContentState.createFromBlockArray(e.contentBlocks),e=ap.EditorState.createWithContent(e)),r.GlobalData.strategicStatement&&(o=lp()("<div>".concat(r.GlobalData.strategicStatement,"</div>")),o=ap.ContentState.createFromBlockArray(o.contentBlocks),o=ap.EditorState.createWithContent(o)),r.GlobalData.values&&(i=lp()("<div>".concat(r.GlobalData.values,"</div>")),i=ap.ContentState.createFromBlockArray(i.contentBlocks),i=ap.EditorState.createWithContent(i)),r.GlobalData.vocation&&(t=lp()("<div>".concat(r.GlobalData.vocation,"</div>")),t=ap.ContentState.createFromBlockArray(t.contentBlocks),t=ap.EditorState.createWithContent(t)),r.GlobalData.legacy&&(n=lp()("<div>".concat(r.GlobalData.legacy,"</div>")),n=ap.ContentState.createFromBlockArray(n.contentBlocks),n=ap.EditorState.createWithContent(n)),r.GlobalData.message&&(a=lp()("<div>".concat(r.GlobalData.message,"</div>")),a=ap.ContentState.createFromBlockArray(a.contentBlocks),a=ap.EditorState.createWithContent(a)),x({history:e,vocation:t,legacy:n,message:a,values:i,strategicStatement:o})}),[]);var _=function(){var t=Object(p.a)(sp().mark((function t(){var r;return sp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={},Object.keys(i).map((function(e){!i[e]||m[e]&&JSON.stringify({a:i[e]})===JSON.stringify({a:m[e]})||(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,i[e]&&"string"===typeof i[e]?i[e].trim():i[e])))}));try{c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)}))})),l(Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)),g(Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r))}catch(n){console.log(n)}case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(un,{style:{marginTop:15}},a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.r)("$__adminMessage")),console.log(y.message),a.a.createElement($,null,a.a.createElement(np.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.message,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{message:ip()(Object(ap.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.r)("$__strategicStatement")),a.a.createElement($,null,a.a.createElement(np.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.strategicStatement,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{strategicStatement:ip()(Object(ap.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{strategicStatement:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.r)("$__vocation")),a.a.createElement($,null,a.a.createElement(np.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.vocation,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{vocation:ip()(Object(ap.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{vocation:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.r)("$__history")),a.a.createElement($,null,a.a.createElement(np.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.history,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{history:ip()(Object(ap.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{history:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.r)("$__values")),a.a.createElement($,null,a.a.createElement(np.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.values,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{values:ip()(Object(ap.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{values:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(fn,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.r)("$__legacy")),a.a.createElement($,null,a.a.createElement(np.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.legacy,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{legacy:ip()(Object(ap.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{legacy:e}))},style:{minHeight:150},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}}))))),JSON.stringify(i)!==JSON.stringify(m)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(S.r)("$__save"),text:Object(S.r)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){_()}})):a.a.createElement(a.a.Fragment,null))}));function dp(e){return a.a.createElement("div",{style:{position:"relative",height:5,backgroundColor:"lightgray",width:"100%",overflow:"hidden",borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}},a.a.createElement("div",{style:{position:"absolute",top:1,left:1,bottom:1,width:"calc(".concat(e.value?e.value:0,"% - 2px)"),overflow:"hidden",background:"".concat(e.background?e.background:Object(S.d)("ColumnTitleColor")),borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}}))}var pp=r(577);function fp(){fp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var hp=Object(s.b)((function(e){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=t.session,o=(r.users,r.dataType,a.a.useState(n.GlobalData?n.GlobalData:{})),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(n.GlobalData?n.GlobalData:{}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!Object(S.s)(l&&l.email?l.email:"")),y=Object(h.a)(v,2),x=(y[0],y[1],a.a.useState(!1)),_=Object(h.a)(x,2),O=(_[0],_[1],Object(S.j)()),w=function(){var t=Object(p.a)(fp().mark((function t(){var r,a,o,i;return fp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={},Object.keys(l).map((function(e){if("file"===e)a=l[e];else if("document"===e){var t=!1;11===l[e].length&&pp.b.isValid(l[e])&&(t=!0),14===l[e].length&&pp.a.isValid(l[e])&&(t=!0),t?r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,l[e]&&"string"===typeof l[e]?l[e].trim():l[e])):Object(S.c)({message:"".concat(Object(S.r)("$__".concat(e)),": ").concat(Object(S.r)("$__invalidDocument")),variant:"warning",persist:!1,horizontal:"right",confirm:null})}else!l[e]||g[e]&&JSON.stringify({a:l[e]})===JSON.stringify({a:g[e]})?l[e]||"_id"===e||Object(S.c)({message:"".concat(Object(S.r)("$__".concat(e)),": ").concat(Object(S.r)("$__cantBeEmpty")),variant:"warning",persist:!1,horizontal:"right",confirm:null}):r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,l[e]&&"string"===typeof l[e]?l[e].trim():l[e]))})),t.prev=2,o=c.a.getState().functions.socket,!a){t.next=10;break}return t.next=7,Object(pt.a)(n.account,a);case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=!0;case 11:(i=t.t0)&&("true"!==String(i)&&(r=Object(d.a)(Object(d.a)({},r),{},{image:i})),o.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):(e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)})),b(Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)))}))),t.next=18;break;case 15:t.prev=15,t.t1=t.catch(2),console.log(t.t1);case 18:case"end":return t.stop()}}),t,null,[[2,15]])})));return function(){return t.apply(this,arguments)}}();return(l._id===n._id||O&&O.user&&(O.userAdmin||O.userEdit))&&!0,l.independentAccount&&!1,a.a.createElement("div",null,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(kn,{maxWidthOrHeight:600,img:l&&l.image?l.image:null,onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{file:t}))},avatar:!0,avatarIcon:"business"})),a.a.createElement(tt,{id:"sideModule_user_fullName",label:Object(S.r)("$__fullCompanyName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"business"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{fullName:e.target.value}))},onBlur:function(e){if(l&&!l.fullName){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";s(Object(d.a)(Object(d.a)({},l),{},{fullName:t}))}}},value:l&&l.fullName?l.fullName:"",placeholder:Object(S.r)("$__fullName",1),autoFocus:!0,disabled:!0}),a.a.createElement(tt,{id:"sideModule_user_displayName",label:Object(S.r)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_comfy_ind"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{name:e.target.value}))}},value:l&&l.name?l.name:"",placeholder:Object(S.r)("$__displayName",1),disabled:!0}),a.a.createElement(tt,{id:"customURL",label:Object(S.r)("$__customURL",1),variant:Object(S.d)("fieldVariant"),name:"customURL",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement("span",{style:{color:"gray",fontSize:12}},".machen.ai")),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{customURL:e.target.value.trim()}))},onBlur:function(e){l&&!l.fullName&&s(Object(d.a)(Object(d.a)({},l),{},{customURL:e.target.value.trim()}))}},value:l&&l.customURL?l.customURL:"",placeholder:Object(S.r)("$__customURL",1),autoFocus:!0}),a.a.createElement(tt,{id:"__documentCPForCNPJ",label:Object(S.r)("$__documentCPForCNPJ",1),variant:Object(S.d)("fieldVariant"),name:"document",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"view_comfy_ind"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{document:e.target.value}))}},value:l&&l.document?l.document:"",placeholder:Object(S.r)("$__displayName",1),disabled:!!g.document}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__accountResponsible")),a.a.createElement($,null,a.a.createElement(Ht,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:l.accountResponsible?[l.accountResponsible]:null,onSelect:function(e){s(Object(d.a)(Object(d.a)({},l),{},{accountResponsible:e[0]}))}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__invoiceResponsible")),a.a.createElement($,null,a.a.createElement(Ht,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:l.invoiceResponsible?[l.invoiceResponsible]:null,onSelect:function(e){s(Object(d.a)(Object(d.a)({},l),{},{invoiceResponsible:e[0]}))}}))),a.a.createElement("ul",{style:{color:Object(S.d)("color")}},a.a.createElement("li",null,Object(S.r)("$__createdAt"),": ",Object(S.k)(l.created_at)),l.expire_at?a.a.createElement("li",{style:{color:Object(S.d)("menu")}},Object(S.r)("$__expireDate"),": ",Object(S.k)(l.expire_at)):a.a.createElement(a.a.Fragment,null)),JSON.stringify(l)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(S.r)("$__save"),text:Object(S.r)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){w()}})):a.a.createElement(a.a.Fragment,null))})));function mp(){mp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var gp=Object(s.b)((function(e,t){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ga)((function(e){e.classes;var t=c.a.getState(),r=t.session,n=(t.functions,t.db),o=a.a.useState(r.GlobalData?r.GlobalData:{}),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(r.GlobalData?r.GlobalData:{}),m=Object(h.a)(u,2),g=m[0],b=(m[1],function(){var t=Object(p.a)(mp().mark((function t(){var r;return mp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={},Object.keys(l).map((function(e){!l[e]||g[e]&&JSON.stringify({a:l[e]})===JSON.stringify({a:g[e]})||(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,l[e]&&"string"===typeof l[e]?l[e].trim():l[e])))})),!r.requireExpirePassword&&r.expiresIn&&(r.expiresIn=null);try{c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());return a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.r)("$__2FactorTokenRequired")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(hr,{checked:!(!l||!l.requireToken),onChange:function(e){var t=Object(d.a)(Object(d.a)({},l),{},{requireToken:!l.requireToken});l.requireToken&&delete t.requireToken,s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__required")),a.a.createElement("i",null,Object(S.r)("$__2FactorTokenRequiredDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.r)("$__forceChangePassword")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(hr,{checked:!(!l||!l.requireExpirePassword),onChange:function(e){var t=Object(d.a)(Object(d.a)({},l),{},{requireExpirePassword:!l.requireExpirePassword});l.requireExpirePassword&&(delete t.requireExpirePassword,l.passwordExpire&&delete t.passwordExpire),s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.r)("$__required")),a.a.createElement("i",null,Object(S.r)("$__forceChangePasswordDescription")),l.requireExpirePassword?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__sessionDuration",1)),a.a.createElement(La,{id:"combo-box-demo",options:n.passwordExpire,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:l&&l.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(l.passwordExpire)}))[0]:n.passwordExpire[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:l&&l.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(l.passwordExpire)}))[0]:n.passwordExpire.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{passwordExpire:t.value}))}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__language",1)),a.a.createElement(La,{id:"combo-box-demo",options:n.languages,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:l&&l.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(l.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(l.language)}))[0]:n.languages[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__language",1),variant:Object(S.d)("fieldVariant"),value:l&&l.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(l.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(l.language)}))[0]:n.languages[0]}))},onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{language:t.value}))}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__sessionExpire",1)),a.a.createElement(La,{id:"combo-box-demo",options:n.expiresIn,getOptionLabel:function(e){return Object(S.r)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:l&&l.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(l.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return a.a.createElement(tt,Object.assign({},e,{label:Object(S.r)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:l&&l.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(l.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{expiresIn:t.value}))}})),JSON.stringify(l)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(S.r)("$__save"),text:Object(S.r)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){b()}})):a.a.createElement(a.a.Fragment,null))}))),bp=Object(z.a)({list:{position:"relative",listStyleType:"disclosure-closed","& li":{marginBottom:3}},item:{display:"flex",alignItems:"center"}});var vp=Object(s.b)((function(e,t){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.functions,n=(t.session,r.socket,e.planDetails),o=e.data,l=bp(),s=(Object(S.j)(),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){i.a.push("#tab/subscriptionUpgrade")}},Object(S.r)("$__upgradeSubscription")));return a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",padding:0,position:"relative"}},a.a.createElement("legend",null,Object(S.r)("$__subscription"),": ",a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.r)(n.label))),a.a.createElement("ul",{className:l.list},a.a.createElement("li",null,Object(S.r)("$__adminLimit",1),": ",o&&o.customAdminsLimit?o.customAdminsLimit:n.settings.admins),a.a.createElement("li",null,Object(S.r)("$__storageSpace",1),": ",o&&o.customStorageSpace?Object(S.a)(o.customStorageSpace):Object(S.a)(n.settings.space)),a.a.createElement("li",null,Object(S.r)("$__BrightAndConnected",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:l.item},Object(S.r)("$__feed",1),": ",n.settings.brightAndConnected.feed?a.a.createElement(ae.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),n.settings.brightAndConnected.feed?a.a.createElement("li",{className:l.item},Object(S.r)("$__feedDays",1),":",n.settings.brightAndConnected.feedDays?"".concat(n.settings.brightAndConnected.feedDays," ").concat(Object(S.r)("$__days")):Object(S.r)("$__unlimited")):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:l.item},Object(S.r)("$__radarLimit",1),": ",n.settings.brightAndConnected.radarLimit?n.settings.brightAndConnected.radarLimit:Object(S.r)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(S.r)("$__insights",1),": ",n.settings.brightAndConnected.insight?a.a.createElement(ae.a,{icon:"check",color:Object(S.d)("color"),size:18}):s))),a.a.createElement("li",null,Object(S.r)("$__plannings",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:l.item},Object(S.r)("$__limit",1),": ",n.settings.plan.limit?n.settings.brightAndConnected.radarLimit:Object(S.r)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(S.r)("$__clientPlannings",1),": ",n.settings.plan.planClient?a.a.createElement(ae.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),n.settings.plan.planClient?a.a.createElement("li",{className:l.item},Object(S.r)("$__clientUserAdmins",1),": ",n.settings.plan.clientAdmin?n.settings.plan.clientAdmin:s):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:l.item},Object(S.r)("$__externalPlanning",1),": ",n.settings.plan.machenPlan?a.a.createElement(ae.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),a.a.createElement("li",{className:l.item},Object(S.r)("$__professionalTemplates",1),": ",n.settings.plan.templates?a.a.createElement(ae.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),a.a.createElement("li",{className:l.item},Object(S.r)("$__guidelineLimit",1),": ",n.settings.plan.guidelineLimit?n.settings.plan.guidelineLimit:Object(S.r)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(S.r)("$__feedLimit",1),": ",n.settings.plan.feedLimit?n.settings.plan.feedLimit:Object(S.r)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(S.r)("$__radarLimit",1),": ",n.settings.plan.radarLimit?n.settings.plan.radarLimit:Object(S.r)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(S.r)("$__insightLimit",1),": ",n.settings.plan.insightLimit?n.settings.plan.insightLimit:Object(S.r)("$__unlimited")))),a.a.createElement("a",{href:"https://machen.ai/#planos",target:"_blank",style:{fontWeight:"bold",color:Object(S.d)("menu"),marginTop:33}},Object(S.r)("$__viewMoreDetails")))))}));function yp(){yp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var xp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState(),r=t.session,n=t.db,o=a.a.useState(0),l=Object(h.a)(o,2),s=l[0],u=l[1];a.a.useEffect((function(){}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return f(),function(){clearTimeout(e)}}),[e.history]);var d=window.location.hash.split("/");d[0]=d[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||i.a.push("sp#tab/home"),d[0]&&36===d[0].length&&!c.a.getState().db.cards[d[0]]&&i.a.push("/deniedAccess");var f=function(){var e=Object(p.a)(yp().mark((function e(){var t;return yp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/Account_Space");case 3:(t=e.sent)&&u(parseInt(t.data)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),m=n.plans[0].settings.space,g=n.plans[0];r&&r.GlobalData&&String(r.GlobalData.plan)&&n.plans[r.GlobalData.plan]&&n.plans[r.GlobalData.plan].settings&&(m=n.plans[r.GlobalData.plan].settings.space,g=n.plans[r.GlobalData.plan]);var b=s*(100/parseInt(m));return a.a.createElement("div",null,a.a.createElement(un,{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement(fn,{xs:12,sm:6,md:6,lg:6,xl:6,style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{padding:10,background:Object(S.d)("AvatarBackground")}},a.a.createElement(ae.a,{icon:"card_membership",size:30,color:"#FFFFFF"})),a.a.createElement("div",{style:{marginLeft:7,width:"calc(100% - 40px)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bolder",marginTop:7}},Object(S.r)("$__subscriptionPlan","*"),": ",Object(S.r)(g.label,"*")),a.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.r)("$__adminLimit",1),": ",g.settings.admins),a.a.createElement("a",{href:"#",style:{position:"relative",top:"-7px",color:Object(S.d)("color"),fontSize:10,fontWeight:"bold"}},Object(S.r)("$__viewContract"))))),a.a.createElement(fn,{xs:12,sm:6,md:6,lg:6,xl:6,style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{padding:10,background:Object(S.d)("AvatarBackground")}},a.a.createElement(ae.a,{icon:"storage",size:30,color:"#FFFFFF"})),a.a.createElement("div",{style:{marginLeft:7,width:"calc(100% - 40px)"}},a.a.createElement("div",{style:{position:"relative",marginTop:7,color:Object(S.d)("menu"),fontWeight:"bolder"}},Object(S.r)("$__usedStorage","*"),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){i.a.push("#tab/subscriptionUpgrade")}},Object(S.r)("$__upgradeSubscription"))),a.a.createElement(dp,{value:Math.ceil(b),background:b>100?"red":null}),a.a.createElement("div",null,a.a.createElement("span",{style:{color:b>100?"red":"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.r)("$__used",1),": ",Object(S.a)(s))," ",a.a.createElement("span",{style:{color:"lightgray",fontSize:11}},Object(S.r)("$__of")," ",Object(S.r)("$__accountSpace",1),": ",Object(S.a)(m))))))),a.a.createElement(un,{style:{}},a.a.createElement(fn,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,"Dados da conta"),a.a.createElement($,null,a.a.createElement(hp,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(fn,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},"Prefer\xeancias",a.a.createElement($,null,a.a.createElement(gp,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(fn,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},Object(S.r)("$__subscriptionDetails"),a.a.createElement($,null,a.a.createElement(vp,{data:r&&r.GlobalData?r.GlobalData:{},planDetails:g}))))))}))),_p=r(157),Op=r.n(_p),wp=r(1035),jp=(r(991),r(992),["onSelect"]),Ep=function(e){var t=e.onSelect,r=Object(G.a)(e,jp);return a.a.createElement(_p.Panel,Object.assign({},r,{onChange:function(e){t(e.color,e.alpha/100)},animation:"slide-up"}))};var Sp=function(e){var t,r,o=Object(n.useState)(!1),i=Object(h.a)(o,2),c=i[0],l=i[1],s=(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.css)?function(e){var t=e.replace("linear-gradient(90deg,","").replace("radial-gradient(90deg,","").split("rgba("),r=[];return t.map((function(e){var t=e.split(") ");if(2===t.length){var n=t[0].split(","),a=(parseInt(t[1].replace(")","").replace("%",""))/100).toFixed(2);r.push({color:"rgb(".concat(n[0],", ").concat(n[1],", ").concat(n[2],")"),offset:"".concat(a),opacity:"".concat(n[3])})}})),r}(e.value.css):(null===e||void 0===e||null===(r=e.value)||void 0===r?void 0:r.color)||[];return a.a.createElement(wp.GradientPickerPopover,{showAnglePicker:!1,showGradientTypePicker:!1,open:c,setOpen:l,width:320,paletteHeight:32,palette:s,onPaletteChange:function(t){!function(t){var r=t.color,n=e.type&&"linear"!==e.type?"radial-gradient(":"linear-gradient(90deg, ";r.map((function(e,t){e.color.indexOf("#")>-1&&(n="".concat(n).concat(Object(S.l)(e.color,e.opacity||1)," ").concat(Math.ceil(100*e.offset),"% ").concat(t<r.length-1?",":""," ")),e.color.indexOf("rgb")>-1&&-1===e.color.indexOf("rgba")&&(n="".concat(n,"rgba(").concat(e.color.replace("rgb(","").replace(")",", ".concat(e.opacity||1)),") ").concat(Math.ceil(100*e.offset),"% ").concat(t<r.length-1?",":""," "))})),n="".concat(n,")"),e.onChange&&e.onChange({css:n,palette:r})}({name:"ColumnTitleColor",color:t})}},a.a.createElement(Ep,null))};function kp(){kp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Lp=Object(s.b)((function(e){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(Ma)((function(e){var t=c.a.getState(),r=(t.db,t.session),n=r.custom,o=a.a.useState(r.custom||{}),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState({}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState({}),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(null),w=Object(h.a)(O,2),j=w[0],k=w[1],L=a.a.useState(null),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(!1),N=Object(h.a)(F,2),D=N[0],A=N[1],P=a.a.useState(!1),z=Object(h.a)(P,2),M=z[0],B=z[1],Y=Object(S.j)();a.a.useEffect((function(){b(r.custom||{})}),[]),a.a.useEffect((function(){D&&setTimeout((function(){A(!1)}),500)}),[D]);var R=function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{custom:Object(d.a)(Object(d.a)({},c.a.getState().session.custom),{},Object(f.a)({},t.name,t.value))})),_(Object(d.a)(Object(d.a)({},x),{},Object(f.a)({},t.name,t.value))),s(Object(d.a)(Object(d.a)({},l),{},Object(f.a)({},t.name,t.value)))},G=function(){var t=Object(p.a)(kp().mark((function t(){return kp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s(g),_({}),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{custom:g}));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),H=function(){var e=Object(p.a)(kp().mark((function e(){var t,a,o;return kp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B(!0),t=Object(d.a)(Object(d.a)({},(null===n||void 0===n?void 0:n.custom)?JSON.parse(null===n||void 0===n?void 0:n.custom):{}),x),s(t),b(t),e.prev=4,!j){e.next=11;break}return e.next=8,Object(pt.a)(r.account,j);case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=!0;case 12:if(a=e.t0,!I){e.next=19;break}return e.next=16,Object(pt.a)(r.account,I);case 16:e.t1=e.sent,e.next=20;break;case 19:e.t1=!0;case 20:o=e.t1,a&&o&&(j&&(t=Object(d.a)(Object(d.a)({},t),{},{customLogo:a})),I&&(t=Object(d.a)(Object(d.a)({},t),{},{loginBackground:o})),c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},{custom:JSON.stringify(t)},(function(e){B(!1),_({})}))),e.next=27;break;case 24:e.prev=24,e.t2=e.catch(4),console.log(e.t2);case 27:case"end":return e.stop()}}),e,null,[[4,24]])})));return function(){return e.apply(this,arguments)}}();return(l._id===r._id||Y&&Y.user&&(Y.userAdmin||Y.userEdit))&&!0,l.independentAccount&&!1,a.a.createElement(un,null,a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__logo")),a.a.createElement(kn,{maxWidthOrHeight:600,img:n.customLogo,onChange:function(e,t){k(t),R({name:"customLogo",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".png",checkOrientation:!0})))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__loginBackground")),a.a.createElement(kn,{maxWidthOrHeight:2e3,img:n.loginBackground,onChange:function(e,t){T(t),R({name:"loginBackground",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".jpg, .jpeg",checkOrientation:!0})))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__backgroundColumnsTitle")),a.a.createElement(at,{title:Object(S.r)("$__backgroundColumnsTitle",1),icon:"gradient",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Sp,{value:{css:n.ColumnTitleColor},onChange:function(e){R({name:"ColumnTitleColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__background"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.colorText||null,mode:"RGB",onChange:function(e){R({name:"colorText",value:e.color})}}),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__text")))))))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__menu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Sp,{value:{css:n.menuColor},onChange:function(e){R({name:"menuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__background"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.menuButtonColor,mode:"RGB",onChange:function(e){R({name:"menuButtonColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__menuText"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.active,mode:"RGB",onChange:function(e){R({name:"active",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__menuActiveText"))))))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__submenu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Sp,{value:{css:n.subMenuColor},onChange:function(e){R({name:"subMenuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__background"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.subMenuTextColor,mode:"RGB",onChange:function(e){R({name:"subMenuTextColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__menuTextIconColor"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.subMenuTextColorActive,mode:"RGB",onChange:function(e){R({name:"subMenuTextColorActive",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__subMenuActiveText"))))))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.r)("$__complement")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Sp,{value:{css:n.linearProgress},onChange:function(e){R({name:"linearProgress",value:e.css})}})),a.a.createElement(Or,{customColor:n.linearProgress}),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__progress"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.color,mode:"RGB",onChange:function(e){R({name:"color",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__borderColor"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.menu,mode:"RGB",onChange:function(e){R({name:"menu",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7,fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.r)("$__primaryText"))))))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.r)("$__cardImageCover"),a.a.createElement(Sp,{value:{css:n.AvatarBackground},onChange:function(e){R({name:"AvatarBackground",value:e.css})},type:"radial"}),a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.avatarIconColor,mode:"RGB",onChange:function(e){R({name:"avatarIconColor",value:e.color})}})),a.a.createElement(Jt,{backgroundColor:n.AvatarBackground,avatarIconColor:n.avatarIconColor,responsive:!0})))),a.a.createElement(fn,{md:4},a.a.createElement(Ye.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.r)("$__fields")),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.line,mode:"RGB",onChange:function(e){R({name:"line",value:e.color}),A(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__line"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement($,null,a.a.createElement(Op.a,{enableAlpha:!1,animation:"slide-up",color:n.medium,mode:"RGB",onChange:function(e){R({name:"medium",value:e.color}),A(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.r)("$__inputAdorment"))),D?a.a.createElement(tt,{label:Object(S.r)("$__field",1),variant:n.fieldVariant,name:"field",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"format_color_fill"}))}}):a.a.createElement(tt,{label:Object(S.r)("$__field",1),variant:n.fieldVariant,name:"field",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"format_color_fill",color:n.medium}))}})))),JSON.stringify(l)!==JSON.stringify(g)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",null,a.a.createElement(E.a,{title:Object(S.r)("$__reset"),text:Object(S.r)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){G()},load:M})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(E.a,{title:Object(S.r)("$__save"),text:Object(S.r)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){H()},load:M}))):a.a.createElement(a.a.Fragment,null))})));var Cp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||i.a.push("acc#tab/resume"),a.a.createElement("div",null,t[1]&&"resume"===t[1]?a.a.createElement($,null,a.a.createElement(xp,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"profile"===t[1]?a.a.createElement($,null,a.a.createElement(up,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"whiteLabel"===t[1]?a.a.createElement($,null,a.a.createElement(Lp,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"integrations"===t[1]?a.a.createElement($,null,a.a.createElement(rp,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"invoicing"===t[1]?a.a.createElement($,null,a.a.createElement(ep,null)):a.a.createElement(a.a.Fragment,null))}))),Ip=Object(z.a)(Fs);var Tp=Object(z.a)(Fs);var Fp=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:Ts,show:!0,auth:!0,search:!1,tabs:[{path:"resume",name:"RESUME",alias:"home",icon:"space_dashboard",show:!0,auth:!0},{path:"dayTasks",name:"DAYTASKS",alias:"dayTasks",icon:"hail",show:!0,auth:!0,AppAccess:["planAdmin","planModerate"]}]},{path:"/bright-and-connected",name:"BRIGHTANDCONNECTED",alias:"brightandconnected",icon:Hr.a,component:Ql,show:!0,auth:!0,subMenu:!0,searchFields:["tags","text"],tabs:[{path:"home",name:"home",alias:"home",icon:"home",show:!0,auth:!0},{path:"feeds",name:"FEEDS",alias:"feeds",icon:"menu_book",show:!0,auth:!0,search:!0,searchFields:["tags","text"]},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,search:!0,searchFields:["tags","text","users","priority"]},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:js.a,show:!0,auth:!0,search:!0,searchFields:["tags","text","users","priority"]},{path:"allNews",name:"allNews",alias:"allNews",icon:"feed",show:!0,auth:!0,search:!0,searchFields:["tags","text"]},{path:"hideFeeds",name:"HIDEFEEDS",alias:"hideFeeds",icon:"visibility_off",show:!0,auth:!0,search:!0,searchFields:["tags","text"]}]},{path:"/c",name:"Users",alias:"users",icon:"business",component:Yd,show:!0,auth:!0,search:!0,subMenu:!0,searchFields:["text","tags","users","userGroup"],tabs:[{path:"users",name:"USERS",alias:"users",icon:"supervised_user_circle",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","userGroup"]},{path:"units",name:"units",alias:"customersCompaniesAndDivisions",icon:"business",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","userGroup"]},{path:"departments",name:"groupsAndDepartments",alias:"groupsAndDepartments",icon:"group_work",show:!0,auth:!0,permission:1}]},{path:"/sp",name:"Strategy & Plans",alias:"plan",icon:"view_comfy",component:Pd,show:!0,auth:!0,search:!0,subMenu:!0,searchFields:["text","tags","users","priority","units","status"],tabs:[{path:"home",name:"home",alias:"home",icon:"home",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"StrategyAndPlans",name:"StrategyAndPlans",alias:"StrategyAndPlans",icon:"view_comfy",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"archived",name:"archivedPlans",alias:"archivedPlans",icon:"archive",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"admin",name:"admin",alias:"admin",icon:"admin_panel_settings",show:!0,auth:!0,AppAccess:["planAdmin"],search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"templates",name:"templates",alias:"templates",icon:"smart_button",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"completed",name:"completed",alias:"completed",icon:"assignment_turned_in",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"trash",name:"trash",alias:"trash",icon:"recycling",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"dashboard",name:"dashboard",alias:"home",icon:"dashboard",show:!0,auth:!0,permission:4,search:!1,searchFields:[],hashId:!0,templates:!0},{path:"overview",name:"OVERVIEW",alias:"overview",icon:"select_all",show:!0,auth:!0,permission:4,search:!0,searchFields:["text","tags","users","priority","status","date"],hashId:!0,templates:!0},{path:"board",name:"board",alias:"board",icon:"view_week",show:!0,auth:!0,permission:3,search:!0,searchFields:["text","tags","users","priority","status","date"],hashId:!0,templates:!0},{path:"matrix",name:"MATRIX SWOT",alias:"matrix",icon:Do.a,show:!0,auth:!0,permission:3,search:!1,searchFields:["text","tags","users"],hashId:!0,templates:!0},{path:"guidelines",name:"guidelines",alias:"guidelines",icon:"alt_route",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","groups","status","date"],hashId:!0},{path:"objectives",name:"objectives",alias:"objectives",icon:"gps_fixed",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","groups","status","date"],hashId:!0},{path:"goals",name:"goals",alias:"goals",icon:"flag",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","groups","status","date"],hashId:!0},{path:"actions",name:"ACTIONS",alias:"actions",icon:"playlist_play",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","priority","status","date"],hashId:!0},{path:"bright-and-connected",name:"feeds",alias:"feeds",icon:"menu_book",show:!0,auth:!0,permission:3,search:!1,searchFields:["tags","text"],hashId:!0,templates:!0},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,permission:3,search:!0,searchFields:["tags","text"],hashId:!0,templates:!0},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:js.a,show:!0,auth:!0,permission:3,search:!0,searchFields:["tags","text"],hashId:!0,templates:!0},{path:"library",name:"library",alias:"library",icon:"folder",show:!0,auth:!0,permission:3,search:!0,searchFields:["text"],hashId:!0}]},{path:"/t",name:"Tasks",alias:"tasks",component:eu,icon:"recent_actors",show:!0,auth:!0,permission:1,hashId:!1,search:!0,subMenu:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"],tabs:[{path:"myDay",name:"myDay",alias:"myDay",icon:"today",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"ourDay",name:"ourDay",alias:"ourDay",icon:"reduce_capacity",show:!0,auth:!0,permission:3,AppAccess:["planAdmin","planModerate"],search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"allTasks",name:"allTasks",alias:"allTasks",icon:"how_to_reg",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"myTasks",name:"myTasks",alias:"myTasks",icon:"admin_panel_settings",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unreaded",name:"unreaded",alias:"unreaded",icon:"notifications_active",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"private",name:"private",alias:"private",icon:"private_connectivity",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unlinkedCards",name:"unlinkedCards",alias:"unlinkedCards",icon:"link_off",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"planningCards",name:"planningCards",alias:"planningCards",icon:"apps",show:!0,auth:!0,AppAccess:["planAdmin","planModerate"],permission:5,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"guidelines",name:"guidelines",alias:"plansGuidelines",icon:Do.a,show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"objectives",name:"objectives",alias:"plansObjectives",icon:"gps_fixed",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"goals",name:"goals",alias:"plansGoals",icon:"flag",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"lateTasks",name:"lateTasks",alias:"lateTasks",icon:"playlist_play",show:!1,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"nextTasks",name:"nextTasks",alias:"nextTasks",icon:"playlist_play",show:!1,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]}]},{path:"/tags",name:"Tags",alias:"Tags",component:zd,icon:"turned_in",show:!0,auth:!0,search:!0,subMenu:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:pl,access:["_isDeveloper"],show:!1,auth:!0,search:!1,tabs:[{path:"versions",name:"versions",alias:"versions",icon:"app_registration",show:!0},{path:"accounts",name:"accounts",alias:"accounts",icon:"account_box",show:!0},{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0},{path:"feeds",name:"feeds",alias:"feeds",icon:"rss_feed",show:!0}]},{path:"/masterAdmin",name:"masterAdmin",alias:"masterAdmin",icon:"admin_panel_settings",component:cu,show:!1,access:["_isAdmin"],auth:!0,search:!1,tabs:[{path:"accounts",name:"accounts",alias:"accounts",icon:"account_box",show:!0},{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0},{path:"feeds",name:"feeds",alias:"feeds",icon:"rss_feed",show:!0}]},{path:"/notifications",name:"Notifications",alias:"Notifications",icon:"notifications",component:bu,show:!1,auth:!0},{collapse:!0,name:"Pages",icon:"image",state:"pageCollapse",show:!1,views:[{path:"/activate",name:"Activate User",mini:"AU",component:function(e){var t=new URLSearchParams(window.location.search),r=a.a.useState({cPassword:null,password:null}),n=Object(h.a)(r,2),o=n[0],c=n[1],l=Uc();t.get("token")&&36===t.get("token").length||i.a.push("/");var s=function(){var r=Object(p.a)(Wc().mark((function r(){var n;return Wc().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,ut.a.post("/user/new-password",{token:t.get("token"),password:o.password});case 3:(n=r.sent)&&(localStorage.setItem("TOKEN",n.data.token),e.callback&&setTimeout((function(){i.a.push("/login")}),3e3)),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),e.callback({fn:"alert",message:"".concat(Object(S.r)("$__invalidRequest",1)," | ").concat(Object(S.r)("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"center",confirm:null});case 10:case"end":return r.stop()}}),r,null,[[0,7]])})));return function(){return r.apply(this,arguments)}}();return a.a.createElement("div",{className:l.container},a.a.createElement(un,null,a.a.createElement(fn,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement("form",null,a.a.createElement(Ii,{db:"cards",login:!0},a.a.createElement(zi,{className:"".concat(l.cardHeader," ").concat(l.textCenter),color:"primary",style:{background:"linear-gradient(60deg, rgba(15,18,35,1), rgba(2,33,88,1))",boxShadow:"0 4px 20px 0 rgba(15,18,35,0.14), 0 7px 10px -5px rgba(15,18,35,0.4)"}},a.a.createElement("h4",{className:l.cardTitle},Object(S.r)("$__createPassword",1))),a.a.createElement(Di,null,a.a.createElement(Ra,{onConfirmed:function(e){c(Object(d.a)(Object(d.a)({},o),{},{password:e}))}})),a.a.createElement(Gc,{className:l.justifyContentCenter},o&&o.password&&a.a.createElement(X,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return s()}},Object(S.r)("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:Gs,show:!0,auth:!1},{path:"/register",name:"Register Page",mini:"R",component:function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],c=a.a.useState(!1),l=Object(h.a)(c,2),s=l[0],u=l[1],d=a.a.useState(""),f=Object(h.a)(d,2),m=f[0],g=f[1],b=a.a.useState(""),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.a)(_,2),w=O[0],j=O[1],E=a.a.useState(""),k=Object(h.a)(E,2),L=k[0],C=k[1],I=a.a.useState(""),T=Object(h.a)(I,2),F=T[0],N=T[1],D=a.a.useState(!1),A=Object(h.a)(D,2),P=A[0],$=A[1],z=a.a.useState(!1),M=Object(h.a)(z,2),B=M[0],Y=M[1],R=a.a.useState(!1),G=Object(h.a)(R,2),H=G[0],W=G[1],U=a.a.useState(null),V=Object(h.a)(U,2),q=V[0],K=V[1],J=ju(),Z=function(){var e=Object(p.a)(wu().mark((function e(t){return wu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!Object(S.s)(t)){e.next=8;break}return e.next=4,yt(t);case 4:e.sent?(C(Object(S.r)("$__emailAlreadyExists",1)),x(""),j(!1)):(C(null),j(!0),wt(m,t)),e.next=10;break;case 8:C(Object(S.r)("$__invalidEmail",1)),x("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=Object(p.a)(wu().mark((function e(){return wu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(F.length>=6)){e.next=9;break}return u(!0),e.next=4,_t(F,y);case 4:e.sent?(Y(!0),$(!1)):$(!0),u(!1),e.next=10;break;case 9:$(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(){var t=Object(p.a)(wu().mark((function t(){var r;return wu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,ut.a.post("user/register-final-step/",{name:m,email:y,token:F,password:q,login:!0});case 4:(r=t.sent)&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&setTimeout((function(){i.a.push("/login")}),3e3)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),u(!1);case 11:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:J.container},a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement(fn,{xs:12,sm:10,md:6},a.a.createElement(Ii,{db:"cards",className:J.cardSignup},a.a.createElement("h2",{className:J.cardTitle},Object(S.r)("$__register",1)),a.a.createElement(Di,null,a.a.createElement(un,null,a.a.createElement(fn,{xs:12},a.a.createElement("div",null,a.a.createElement(tt,{className:J.textFields,label:Object(S.r)("$__fullName",1),variant:"standard",name:Object(S.r)("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{className:J.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){g(e.target.value)}},value:m||"Cristofer Odair"}),a.a.createElement(tt,{label:Object(S.r)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",helperText:L,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:!L&&y&&Object(S.s)(y)?"":"invalid",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"alternate_email"})),onChange:function(e){j(!1),C(null),x(e.target.value)},onBlur:function(){var e=Object(p.a)(wu().mark((function e(t){return wu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z(t.target.value);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:y||"cristofer.odair@outlook.com.br",placeholder:"email@domain.com",disabled:w}),!w&&a.a.createElement(Ee,{icon:"navigate_next",text:Object(S.r)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){Z(y)}}),w&&y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(tt,{label:Object(S.r)("$__emailToken",1),variant:Object(S.d)("fieldVariant"),helperText:Object(S.r)(P?"registerEmailTokenError":"registerEmailTokenDescription"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:P?"invalid":"",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"keyboard"})),onChange:function(e){C(null),N(e.target.value)}},value:F,placeholder:"****"}),a.a.createElement(Ee,{icon:"reply_all",text:Object(S.r)("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){wt(m,y)}}),!B&&a.a.createElement(Ee,{icon:"navigate_next",text:Object(S.r)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){Q()}})),w&&B&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ra,{onConfirmed:function(e){K(e)}}),a.a.createElement(xu.a,{open:H,onClose:function(){return W(!1)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("div",{style:{position:"relative",width:"80vw",maxHeight:"80vh",overflowY:"auto",backgroundColor:"#FFFFFF",padding:"15px",margin:"auto"}},a.a.createElement("div",{style:{position:"absolute",right:"3px",top:"3px"}},a.a.createElement(ae.a,{size:"33px",color:"black",onClick:function(){W(!1)}},"close")),a.a.createElement("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. In nisl sapien, scelerisque non enim quis, mollis euismod ante. Nunc facilisis quam ullamcorper, interdum ante non, congue magna. Maecenas euismod nisl sed risus pretium placerat. Nulla dictum dolor sed tincidunt mollis. Nam elit urna, elementum at mattis fringilla, pharetra sed ipsum. Ut eleifend ullamcorper nulla, consequat cursus arcu efficitur eget. Ut et leo sed lacus molestie aliquam. In molestie cursus est vel luctus. Aliquam ut vehicula augue, vitae venenatis ligula. Sed lobortis velit quis quam rutrum, ut pretium arcu semper. Proin a fermentum sem. Phasellus nec auctor elit. Nullam auctor quam ut ullamcorper mattis."),a.a.createElement("p",null,"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer et enim congue, pulvinar elit facilisis, sollicitudin neque. Nulla interdum justo arcu, eu tincidunt arcu suscipit at. Vestibulum quis elementum ante. Mauris et odio in mi ornare tincidunt. Nulla mattis ex vitae magna hendrerit, non interdum dui lobortis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed pretium lorem a orci tempor convallis. Aliquam nec dapibus dolor. Nulla arcu lacus, posuere dictum risus sed, volutpat aliquet nibh. Cras tincidunt viverra finibus."),a.a.createElement("p",null,"Nam in scelerisque lectus, nec aliquam mauris. Ut id nisl sit amet lectus posuere placerat quis vel odio. Fusce ultrices ultricies lobortis. Proin sodales sit amet lorem vel viverra. Donec ac libero quis leo malesuada faucibus. Phasellus eu placerat purus. Suspendisse lectus dolor, consectetur sit amet pretium sed, luctus non nulla. In sed pulvinar est. Fusce vitae ligula quis quam tempus tincidunt. Ut congue faucibus mollis. Vestibulum ac diam id metus rhoncus bibendum non quis leo. Donec tempus non ligula sit amet vehicula. Phasellus id lectus ac neque maximus ullamcorper vel non massa."),a.a.createElement("p",null,"Donec augue lorem, bibendum vitae egestas sit amet, placerat eu elit. In sapien neque, volutpat sit amet sagittis quis, rutrum sit amet turpis. Quisque cursus ligula at mattis blandit. Donec erat arcu, pellentesque eu odio at, blandit viverra nisl. In sagittis felis nec enim facilisis, dapibus commodo enim feugiat. Proin volutpat elit id sem malesuada euismod. Morbi pulvinar tristique diam non luctus. Aliquam ligula enim, efficitur non nunc ac, vestibulum convallis diam. Quisque varius metus a dui ultricies sagittis."),a.a.createElement("p",null,"Quisque vitae convallis arcu, vel convallis leo. Sed in pellentesque tortor. Nulla tristique lacinia tempus. Pellentesque ut neque elementum, accumsan ante sit amet, malesuada nulla. Nam ac vulputate leo. Vestibulum leo mi, consectetur id odio eu, vulputate tincidunt quam. Maecenas finibus purus eget tincidunt vulputate. Etiam a semper felis, et varius lacus. Pellentesque condimentum sollicitudin magna et mollis. Nam sit amet elit rhoncus, pretium enim sed, fringilla sapien. Proin convallis sed velit quis imperdiet. Sed iaculis, velit in tempus mattis, ante neque aliquam augue, ac porttitor nulla tellus in mauris. In elementum lobortis turpis et imperdiet. Praesent auctor placerat ullamcorper. Donec eu facilisis justo.")))),a.a.createElement(Ri.a,{classes:{root:J.checkboxLabelControl,label:J.checkboxLabel},control:a.a.createElement(ot.a,{tabIndex:-1,onClick:function(){return function(e){var t=n.indexOf(e),r=Object(Ne.a)(n);-1===t?r.push(e):r.splice(t,1),o(r)}(1)},checkedIcon:a.a.createElement("div",{className:J.checkedIcon},a.a.createElement(ae.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:J.uncheckedIcon},a.a.createElement(ae.a,{size:"16px",color:"red"},"remove")),classes:{checked:J.checked,root:J.checkRoot}}),label:a.a.createElement("span",null,Object(S.r)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return W(!0)},style:{color:"blue"}},"terms and conditions"),".")}),a.a.createElement("div",{className:J.center},n.indexOf(1)>-1&&q&&a.a.createElement(X,{round:!0,color:"custom_color",onClick:function(){return ee()}},"Get started"))))))),s&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},a.a.createElement(yu,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=Ns();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(un,null,a.a.createElement(fn,{md:12},a.a.createElement("h1",{className:e.title},"404"),a.a.createElement("h2",{className:e.subTitle},"Page not found :("),a.a.createElement("h4",{className:e.description},"Ooooups! Looks like you got lost."))))},show:!0,auth:!0},{path:"/maintenance-mode",name:"Maintenance Mode",mini:"E",component:function(){var e=Hs();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(un,null,a.a.createElement(fn,{md:12},a.a.createElement("h1",{className:e.title},"\\o/"),a.a.createElement("h2",{className:e.subTitle},"Plataforma em atualiza\xe7\xe3o :)"),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Tente acessar novamente em alguns minutos. Estamos implementando melhorias para melhor produtividade no seu dia a dia."))))},show:!1,auth:!1},{path:"/offline-detect",name:"Offline detect",mini:"O",component:function(){var e=Ws();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(un,null,a.a.createElement(fn,{md:12},a.a.createElement("h1",{className:e.title},'"/'),a.a.createElement("h2",{className:e.subTitle},"Parece que voc\xea est\xe1 OFF-LINE"),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Verifique a conex\xe3o de sua internet e tente novamente."),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Caso voc\xea esteja com conex\xe3o de internet ativa e ainda esteja visualizando esta p\xe1gina ap\xf3s algumas tentativas, favor entrar em contato com nosso suporte."),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},a.a.createElement("a",{href:"/login",target:"_self"},"Clique aqui para tentar novamente")))))},show:!1,auth:!1}]},{path:"/calendar",name:"Calendar",icon:"date_range",component:ls,show:!0,auth:!0,search:!0,subMenu:!0,permission:1,searchFields:["text","tags","users","priority","risk","complexity","impact","groups","status"]},{path:"/acc",name:"Account",icon:"business",alias:"account",component:Cp,show:!0,auth:!0,subMenu:!0,permission:1,AppAccess:["planAdmin"],tabs:[{path:"resume",name:"resume",alias:"resume",icon:"home",show:!0,auth:!0,AppAccess:["planAdmin"]},{path:"profile",name:"profile",alias:"profile",icon:"badge",show:!0,auth:!0,AppAccess:["masterAdmin"]},{path:"whiteLabel",name:"whiteLabel",alias:"whiteLabel",icon:"palette",show:!0,auth:!0,AppAccess:["masterAdmin"],accountHas:["whiteLabel"]},{path:"integrations",name:"integrations",alias:"plataformsIntegrations",icon:"integration_instructions",show:!0,auth:!0,AppAccess:["masterAdmin"]}]},{path:"/library",name:"library",alias:"library",component:As,icon:"folder",show:!0,auth:!0,permission:1,hashId:!1,search:!0,subMenu:!0,searchFields:["text"]},{path:"/subscriptionUpgrade",name:"subscriptionUpgrade",alias:"subscriptionUpgrade",component:function(){var e=Ip();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(un,null,a.a.createElement(fn,{md:12},a.a.createElement("h1",{className:e.title,style:{color:Object(S.d)("color")}},"\\o/"),a.a.createElement("h2",{className:e.subTitle,style:{color:Object(S.d)("menu")}},"Voc\xea j\xe1 utilizou o n\xfamero de usu\xe1rios contratados"),a.a.createElement("h4",{className:e.description,style:{color:Object(S.d)("menu")}},"Entre em contato com nossos consultores para solicitar um upgrade do seu plano."))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1},{path:"/deniedAccess",name:"deniedAccess",alias:"deniedAccess",component:function(){var e=Tp();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(un,null,a.a.createElement(fn,{md:12},a.a.createElement("h1",{className:e.title,style:{color:Object(S.d)("color")}},"\\o/"),a.a.createElement("h2",{className:e.subTitle,style:{color:Object(S.d)("menu")}},Object(S.r)("$__accessDenied","*")),a.a.createElement("h4",{className:e.description,style:{color:Object(S.d)("menu")}},Object(S.r)("$__accessDeniedDescription","*")))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],Np=function(e){return Object(d.a)(Object(d.a)({},W.l),{},{menu:{position:"relative",borderRight:Object(S.d)("color"),display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"relative",borderRight:Object(S.d)("color"),display:"flex",flexDirection:"column",alignItems:"baseline"},button:{padding:"7px 0px",display:"flex",justifyContent:"center"},buttonExpanded:{padding:"7px 0px",display:"flex",justifyContent:"left",width:"100%"},buttonColor:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px 12px",marginLeft:"-12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(S.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function Dp(){Dp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ap=function(e){var t=c.a.getState().db,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=Object(S.j)(),o=r[0]&&36===r[0].length&&t.cards[r[0]]&&"plan"===t.cards[r[0]].type?Object(st.t)(r[0]):null,l=r&&r.length>0&&36===r[0].length&&t.cards[r[0]]&&t.cards[r[0]].image?t.cards[r[0]].image:Le.a,s=[];return t.cards[r[0]]&&t.cards[r[0]].client&&Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&t.cards[e].client&&t.cards[e].client===t.cards[r[0]].client})).length>1&&Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&t.cards[e].client===t.cards[r[0]].client&&"plan"===t.cards[e].type})).map((function(e){s.push(Object(d.a)(Object(d.a)({name:t.cards[e].name},t.cards[e].image?{avatar:t.cards[e].image}:{icon:"view_comfy"}),{},{onClick:function(){i.a.push("sp#".concat(t.cards[e]._id,"/dashboard"))}}))})),a.a.createElement(Tl.a,{title:a.a.createElement(a.a.Fragment,null,t.cards[r[0]].name)},a.a.createElement("div",{style:Object(d.a)({display:"flex",width:"100%",justifyContent:"left",alignItems:"center"},o&&parseInt(o)>3||n.owner||n.planAdmin||n.planEdit||n.planModerate?{cursor:"pointer"}:{}),id:"plan_identification",onClick:function(){(o&&parseInt(o)>3||n.owner||n.planAdmin||n.planEdit||n.planModerate)&&e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:r[0],module:"cardEdit",activeModule:"cardEdit",data:t.cards[r[0]]}))}},a.a.createElement("div",{style:{width:"30px",height:"30px",backgroundColor:"black",marginLeft:"7px",marginRight:"3px",borderRadius:"11px",backgroundImage:'url("'.concat(l,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),e.expanded&&a.a.createElement("div",{style:{width:"100%",zIndex:1}},t.cards[r[0]].client&&t.users[t.cards[r[0]].client]&&a.a.createElement("div",{style:{fontSize:"12px",fontWeight:"bold",marginLeft:"15px"}},t.users[t.cards[r[0]].client].name),a.a.createElement("div",{style:{fontSize:"12px",marginLeft:"7px",maxWidth:"calc(100% - 60px)",display:"flex",justifyContent:"space-between"},id:"client_plan_switch"},0===s.length?t.cards[r[0]].name:a.a.createElement(We,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:s})))))},Pp=Object(s.b)((function(e,t){return Object(d.a)(Object(d.a)({},t),{},{store:{search:e.search,chat:e.chat}})}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.search,o=t.session,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=Object(z.a)(Np)(),x=window.location.pathname.split("/"),_="/".concat(x[1]),O=e.expanded;a.a.useEffect((function(){return n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminViewLoader:!1,adminView:!1})})),function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{viewList:!1}))}}),[n.users.selected]);var w=window.location.hash.split("/");w[0]=w[0].replace("#","");var j="".concat(_,"#").concat(w[0]?w[0]:"tab"),E=Object(S.j)(),k=(w[0]&&36===w[0].length&&r.cards[w[0]]&&"plan"===r.cards[w[0]].type&&Object(st.t)(w[0]),function(t){f(t);var r=c.a.getState().db.cards;Object.keys(r).map((function(e){t&&r[e]&&!r[e]._expanded&&(r[e]._expanded=t),!t&&r[e]&&r[e]._expanded&&(r[e]._expanded=t)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cardsExpanded:t,cards:r}))}),L=function(){var t=Object(p.a)(Dp().mark((function t(r){var n;return Dp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v(!0),c.a.getState().session.cards.adminViewLoader){t.next=8;break}return t.next=4,Object(Ke.a)(e,null,!0);case 4:n=t.sent,(c.a.getState().session.cards.adminViewLoader||n)&&(v(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!c.a.getState().session.cards.adminView})}))),t.next=10;break;case 8:v(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!c.a.getState().session.cards.adminView})}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(e){i.a.push(e)};return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:O?y.menuExpanded:y.menu},a.a.createElement("div",{className:O?y.buttonExpanded:y.button},a.a.createElement(Ee,{icon:O?"menu_open":"read_more",text:O?Object(S.r)("$__collapsingMenu",1):null,title:O?null:Object(S.r)("$__expandingMenu",1),iconColor:Object(S.d)("subMenuTextColor"),textColor:Object(S.d)("subMenuTextColor"),onClick:function(){e.subMenuExpanded(!O)},size:"21px"})),Fp.filter((function(e){return!(w[1]&&e.tabs&&e.tabs.filter((function(e){return e.path===w[1]})).length>0&&!1===e.tabs.filter((function(e){return e.path===w[1]}))[0].search)&&(e.path===_&&"true"===String(e.search)||void 0)})).length>0&&!e.chat&&a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_filters"},a.a.createElement(Ee,{icon:"filter_alt",text:O?Object(S.r)("$__filters",1):null,title:O?null:Object(S.r)("$__filters",1),iconColor:Object(S.d)("subMenuTextColor"),textColor:Object(S.d)("subMenuTextColor"),onClick:function(){e.subMenuExpanded(!O)},size:"21px"})),O&&a.a.createElement(a.a.Fragment,null,Fp.filter((function(e){return!(w[1]&&e.tabs&&e.tabs.filter((function(e){return e.path===w[1]})).length>0&&!1===e.tabs.filter((function(e){return e.path===w[1]}))[0].search)&&(e.path===_&&"true"===String(e.search)||void 0)})).length>0&&!e.chat&&a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both"},id:"sideBar_subMenu_filters_options"},a.a.createElement(bd,null))),("/files"===window.location.pathname||"/t"===window.location.pathname||"/d"===window.location.pathname||"/sp"===window.location.pathname&&w[0]&&36===w[0].length)&&a.a.createElement(a.a.Fragment,null,u?a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_collapseCards"},a.a.createElement(Ee,{text:O?Object(S.r)("$__collapseCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:O?null:Object(S.r)("$__collapseCards",1),icon:"close_fullscreen",iconColor:Object(S.d)("subMenuTextColor"),onClick:function(){k(!1)},size:"21px"})):a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_expandingCards"},a.a.createElement(Ee,{text:O?Object(S.r)("$__expandingCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:O?null:Object(S.r)("$__expandingCards",1),icon:"open_in_full",iconColor:Object(S.d)("subMenuTextColor"),onClick:function(){k(!0)},size:"21px"}))),("/d"===_&&"dayTasks"===w[1]||"/t"===_&&n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||"/sp"===_&&!w[0])&&E&&(E.owner||E.plan&&(E.planAdmin||E.planModerate))&&a.a.createElement("div",{className:O?y.buttonExpanded:y.button,style:{display:"flex"}},b?a.a.createElement(ue.a,{size:25,style:{margin:"auto",display:"flex"}}):a.a.createElement(Ee,{text:O?Object(S.r)("$__adminViewDescription",1):null,title:O?null:Object(S.r)("$__adminViewDescription",1),textColor:c.a.getState().session.cards.adminView?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),iconColor:c.a.getState().session.cards.adminView?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),icon:"groups",id:"sideBar_subMenu_options_setAdminView",onClick:function(){L()},size:"21px"})),"/t"===window.location.pathname&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_setAdminView"},a.a.createElement(Ee,{text:O?Object(S.r)("$__viewInColumns",1):null,textColor:r.viewList?Object(S.d)("subMenuTextColor"):Object(S.d)("color"),iconColor:r.viewList?Object(S.d)("subMenuTextColor"):Object(S.d)("color"),title:O?null:Object(S.r)("$__viewInColumns",1),icon:"view_column",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{viewList:!1}))},size:"21px"})),a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_viewInList"},a.a.createElement(Ee,{text:O?Object(S.r)("$__viewInList",1):null,title:O?null:Object(S.r)("$__viewInList",1),icon:"list",iconColor:r.viewList?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:r.viewList?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{viewList:!0}))},size:"21px"}))),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:y.separator}),w[0]&&36===w[0].length&&r.cards[w[0]]&&a.a.createElement("div",{style:{zIndex:1},id:"sideBar_subMenu_plan_infos"},a.a.createElement(Ap,Object.assign({expanded:O},e))),Fp.filter((function(e){return e.path===_})).length>0&&Fp.filter((function(e){return e.path===_}))[0].tabs&&Fp.filter((function(e){return e.path===_}))[0].tabs.length>0&&(Fp.filter((function(e){return e.path===_}))[0].hashId&&w[0]&&36===w[0].length||!Fp.filter((function(e){return e.path===_}))[0].hashId)&&a.a.createElement(a.a.Fragment,null,Fp.filter((function(e){return e.path===_}))[0].tabs.filter((function(e){return!e.hashId&&(!w[0]||w[0]&&w[0].length<36)||e.hashId&&w[0]&&36===w[0].length})).map((function(e,t){var n=!1,i=w[0]&&36===w[0].length?r.cards[w[0]]:null;if(e&&e.AppAccess&&e.AppAccess.length>0?e.AppAccess.map((function(e){E[e]&&(n=!0)})):e&&!e.AppAccess&&(n=!0),i&&i.isTemplate&&!e.templates&&(n=!1),e&&e.AppAccess&&e.AppAccess.planAdmin&&!(E&&E.plan&&E.planAdmin)&&(n=!1),i&&i.planType&&("matrix"===e.alias||"guidelines"===e.alias||"objectives"===e.alias||"goals"===e.alias)&&(n=!1),i&&"board"===e.alias&&(!i.planType||i.planType&&"operational"!==i.planType)&&(n=!1),i&&"matrix"===e.alias&&i.planType&&(n=!1),i&&"operational"===i.planType&&"overview"===e.alias&&(n=!1),e.accountHas&&0===e.accountHas.filter((function(e){return o[e]})).length&&(n=!1),(E.owner||E&&E.enabled&&n)&&e.show)return a.a.createElement("div",{className:O?y.buttonExpanded:y.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},a.a.createElement(Ee,{text:O?"matrix"===e.alias?"MATRIX SWOT":Object(S.r)("$__".concat(e.alias),1):null,title:O?null:"matrix"===e.alias?"MATRIX SWOT":Object(S.r)("$__".concat(e.alias),1),icon:e.icon,iconColor:w[1]===e.path?Object(S.d)("subMenuTextColorActive"):Object(S.d)("subMenuTextColor"),textColor:w[1]===e.path?Object(S.d)("subMenuTextColorActive"):Object(S.d)("subMenuTextColor"),onClick:function(){C("".concat(j,"/").concat(e.path))},size:"21px"}))}))),w[0]&&36===w[0].length&&r.cards[w[0]]&&r.cards[w[0]].miroBoard&&a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_plan_miroBoard"},a.a.createElement(Ee,{text:O?Object(S.r)("$__planningBoard",1):null,title:O?null:Object(S.r)("$__planningBoard",1),icon:"developer_board",iconColor:"planningBoard"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"planningBoard"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){C("".concat(j,"/","planningBoard"))},size:"21px"})),"/t"===window.location.pathname&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:y.separator}),a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_lastTasks"},a.a.createElement(Ee,{text:O?Object(S.r)("$__lateTasks",1):null,title:O?null:Object(S.r)("$__lateTasks",1),icon:"event_busy",iconColor:"late"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"late"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){i.a.push("t#tab/lateTasks")},size:"21px"})),a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_nextTasks"},a.a.createElement(Ee,{text:O?Object(S.r)("$__nextTasks",1):null,title:O?null:Object(S.r)("$__nextTasks",1),icon:"date_range",iconColor:"nextTasks"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"nextTasks"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){i.a.push("t#tab/nextTasks")},size:"21px"}))))))})),$p=r(527);function zp(){zp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var Mp=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(de.a)(mu)((function(e){var t=e.classes,r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],l=n[1],s=a.a.useState(null),u=Object(h.a)(s,2),f=u[0],m=u[1],g=window.location.hash.split("/");g[0]=g[0].replace("#","");var b=function(){var t=Object(p.a)(zp().mark((function t(r,n){return zp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"tags"===n?(l(e.subMenuExpanded),e.setSubMenuExpanded(!1)):e.setSubMenuExpanded(o),!r||window.location.pathname===r&&n!==f||i.a.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!0})):(m(n),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!1})));case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:t.root},a.a.createElement("div",{className:t.bar,style:{background:Object(S.d)("menuColor")},id:"sideBar"},a.a.createElement("div",{className:t.logoMini,id:"sideBar_logoMini",style:{width:"100%",justifyContent:"space-between",display:"flex",cursor:"pointer",color:Object(S.d)("menuButtonColor"),alignItems:"center"}},a.a.createElement("div",{style:{backgroundImage:'url("'.concat(Object(S.d)("customLogo"),'")'),width:"calc(100% - 70px)",height:"auto",marginLeft:"15px",minHeight:"min-content",cursor:"pointer",paddingTop:"33%",backgroundPosition:"center center",backgroundSize:"contain",backgroundRepeat:"no-repeat"},onClick:function(){b("/d#tab/resume","dashboard")}}),a.a.createElement("div",{style:{padding:"7px",marginRight:"7px",cursor:"pointer"},onClick:function(){e.menuExpand()},id:"sideBar_button_hideMenu"},a.a.createElement(ae.a,{icon:"menu",color:"parent",title:"$__hideMenu",size:"22px"}))),a.a.createElement("div",{style:{position:"absolute",top:"100px",bottom:"0px",overflowX:"auto",width:"100%"}},a.a.createElement("div",{className:t.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/d#tab/resume","dashboard")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__dashboard","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_brightAndConnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/bright-and-connected#tab/home","bright-and-connected")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:Hr.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"21px",style:{marginRight:"7px"}}),"BRIGHT & CONNECTED")),a.a.createElement("div",{className:t.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/sp#tab/home","StrategyAndPlans")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/t#tab/myTasks","myTasks")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__activities","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/library","library")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__library","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_tags"},a.a.createElement("div",{className:"/tags"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/tags","tags")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__tags","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_calendar"},a.a.createElement("div",{className:"/calendar"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){b("/calendar","calendar")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__calendar","*"))),a.a.createElement("div",{className:t.separator}),a.a.createElement("div",{className:t.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:c.a.getState().chat.open?t.itemButtomActive:t.itemButtom,onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!c.a.getState().chat.open}))},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Fc,null,a.a.createElement(ae.a,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),Object(S.r)("$__chat","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_calendar"},a.a.createElement("div",{className:t.itemButtom,onClick:function(){window.open("https://support.machen.ai","_blank")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(ae.a,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.r)("$__support","*")))),"myDay"!==f&&"timer"!==f&&"chat"!==f&&("/t"===window.location.pathname||"/sp"===window.location.pathname||"/c"===window.location.pathname||"/d"===window.location.pathname||"/p"===window.location.pathname||"/acc"===window.location.pathname||"/bright-and-connected"===window.location.pathname||"/library"===window.location.pathname||"/notifications"===window.location.pathname||"/calendar"===window.location.pathname||"/masterAdmin"===window.location.pathname)&&a.a.createElement("div",{className:e.subMenuExpanded?t.moduleExpanded:t.module,id:"sideBar_subMenu",style:{background:Object(S.d)("subMenuColor"),borderRight:"4px solid ".concat(Object(S.d)("color"))}},a.a.createElement(Pp,{hashs:g,subMenuExpanded:function(t){e.setSubMenuExpanded(t)},expanded:e.subMenuExpanded})),"myDay"!==f&&"timer"!==f&&"chat"!==f&&"/tags"===window.location.pathname&&a.a.createElement("div",{className:t.moduleExpanded,id:"sideBar_session_tags"},a.a.createElement(Tc,{onLoad:function(){e.setSubMenuExpanded(!0)},onExit:function(){return e.setSubMenuExpanded(!1)}})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:15,color:"#c0b283",fontSize:"10px"}},"V:",$p.version)))})));var Bp=Object(s.b)((function(e,t){return Object(d.a)(Object(d.a)({},t),{},{unreadeds:e.chats.unreadeds,chats:e.chats.timelines,chat:e.chat})}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().chat;return e.unreadeds,a.a.createElement("div",{id:"chatNotificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(H.a,{"aria-haspopup":"true",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},t),{},{open:!t.open}))}},a.a.createElement(Fc,null,a.a.createElement(ae.a,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))))}));var Yp=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=(t.timeline,t.session),o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState({}),d=Object(h.a)(u,2),p=(d[0],d[1],a.a.useState("users")),f=Object(h.a)(p,2),m=(f[0],f[1],a.a.useRef(null)),g=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),b=(Object(S.j)(),function(e){m.current&&m.current.contains(e.target)||s(!1)}),v=Object.keys(r.cards).filter((function(e){return!r.cards[e].deleted&&!r.cards[e].checklist&&r.cards[e]._users&&r.cards[e]._users[n._id]&&r.cards[e]._users[n._id].myDay&&_()(new Date(1e3*r.cards[e]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===g})).map((function(e){return r.cards[e]}));return 0===v.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(H.a,{ref:m,"aria-controls":l?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:v.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(ae.a,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),v.length>0&&a.a.createElement(Re.a,{open:l,anchorEl:m.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:b},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},Object(S.r)("$__myDay")),a.a.createElement(br,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))}));var Rp=Object(s.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=(t.timeline,t.session),o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState({}),d=Object(h.a)(u,2),p=(d[0],d[1],a.a.useState("users")),f=Object(h.a)(p,2),m=(f[0],f[1],a.a.useState([])),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useRef(null);_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a.a.useEffect((function(){var e=Object.keys(r.cards).filter((function(e){if(!r.cards[e].deleted&&!r.cards[e].checklist&&"chatGroup"!==!r.cards[e].type&&"completed"!==r.cards[e].status&&r.cards[e]._requireApproval&&(r.cards[e]._users[n._id]&&r.cards[e]._users[n._id].approvalResponsible||0===Object.keys(r.cards[e]._users).filter((function(t){return r.cards[e]._users[t].approvalResponsible})).length&&r.cards[e]._users[n._id]&&r.cards[e]._users[n._id].isResponsible))return!0})).map((function(e){return r.cards[e]}));JSON.stringify(e)!==JSON.stringify(b)&&v(e),0===e.length&&s(!1)}),[e.cards]),Object(S.j)();var x=function(e){y.current&&y.current.contains(e.target)||s(!1)};return 0===b.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsApprovalBt",style:{zIndex:"100 !important"}},a.a.createElement(H.a,{ref:y,"aria-controls":l?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:b.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(ae.a,{icon:"approval",color:"parent",title:"$__forApproval"}))),b.length>0&&a.a.createElement(Re.a,{open:l,anchorEl:y.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom",padding:11}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:x},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},a.a.createElement("div",{style:{color:"red",fontWeight:"bold",fontSize:14}},Object(S.r)("$__attention",1),": ",a.a.createElement("span",{style:{color:Object(S.d)("menu")}},Object(S.r)("$__thisActivityRequireApproval",1))),b.map((function(e,t){return a.a.createElement("div",{key:e._id,style:{display:"grid",width:"100%",border:"solid 1px rgba(0,0,0,0.1)",padding:12,marginTop:7,borderRadius:7}},a.a.createElement(Dn,{db:"cards",data:e,onlyOption:!0}),a.a.createElement(go,{nodeId:e._id}))}))))))})))})),Gp=Object(z.a)((function(){return{unReaded:{padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",maxWidth:"100%",opacity:1,borderLeft:"solid red 2px"},Readed:{padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",opacity:.5,maxWidth:"100%"}}}));var Hp=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=(t.chat,t.notifications,t.timeline),n=t.functions,o=t.session,i=n.socket,l=e.data,s=a.a.useState(!1),u=Object(h.a)(s,2),p=(u[0],u[1],a.a.useState(!1)),m=Object(h.a)(p,2),g=m[0],b=m[1],v=Gp();a.a.useEffect((function(){return function(){}}),[]);var y="cards";l&&l.cardId&&c.a.getState().db.users[l.cardId]&&(y="users");var x=function(){var t=Object(st.k)(l.cardId);e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(d.a)(Object(d.a)({},c.a.getState().notifications),{},{total:c.a.getState().notifications.total-t.total})),Sr(e,{readedBy:o._id,id:e.cardId,db:"cards",type:"all"}),i.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:l.cardId,db:"cards",type:"all"},(function(){})),c.a.getState().db&&c.a.getState().db.cards&&c.a.getState().db.cards[l.cardId]&&e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},l.cardId,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[l.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),e.onRead&&setTimeout((function(){e.onRead()}),1e3)},_=Object.keys(r[l.cardId]).filter((function(e){return o&&o._id&&r[l.cardId]&&r[l.cardId][e]&&r[l.cardId][e].user&&r[l.cardId][e].user._id&&r[l.cardId][e].user._id!==o._id&&(!r[l.cardId][e].readedBy||r[l.cardId][e].readedBy&&!r[l.cardId][e].readedBy[o._id])}));return a.a.createElement("div",{className:l.readed?v.Readed:v.unReaded,style:{width:369,overflow:"auto"}},l.cardId&&c.a.getState().db.cards[l.cardId]&&a.a.createElement("div",{style:c.a.getState().db.cards[l.cardId]&&"chatGroup"===c.a.getState().db.cards[l.cardId].type?{cursor:"pointer"}:{}},a.a.createElement(Dn,{setPrivate:function(e){b(e)},db:"cards",data:c.a.getState().db.cards[l.cardId],onlyOption:!(!c.a.getState().db.cards[l.cardId]||"chatGroup"!==c.a.getState().db.cards[l.cardId].type)})),_.length>0&&(!c.a.getState().db.cards[l.cardId].private||c.a.getState().db.cards[l.cardId].private&&(c.a.getState().controls.lockPrivate||g))?a.a.createElement(a.a.Fragment,null,_.sort((function(e,t){return parseInt(r[l.cardId][e].created_at)>parseInt(r[l.cardId][t].created_at)?-1:parseInt(r[l.cardId][e].created_at)<parseInt(r[l.cardId][t].created_at)?1:0})).map((function(t,r){return a.a.createElement("div",{key:"".concat(t),style:{position:"relative",marginBottom:"33px",paddingBottom:15,display:"-webkit-box"}},a.a.createElement(ia,{storie:Object(d.a)(Object(d.a)({},c.a.getState().timeline&&c.a.getState().timeline[l.cardId]&&c.a.getState().timeline[l.cardId][t]?c.a.getState().timeline[l.cardId][t]:{}),{},{idRel:t}),boxStyle:{width:"calc(100% - 10px) !important",maxWidth:"285px"},db:y,noReactions:!0,noReply:!0,openLightBox:function(r){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:c.a.getState().timeline[l.cardId][t].files?c.a.getState().timeline[l.cardId][t].files:[],file:r})}}),r+1===_.length?a.a.createElement("div",{style:{position:"absolute",height:"93px",left:0,bottom:"-33px",right:8,background:"linear-gradient(0deg, rgba(255,255,255,1) 34%, rgba(255,255,255,0) 100%)"}},a.a.createElement("div",{style:{position:"absolute",bottom:"0px",display:"flex",justifyContent:"space-between",width:"100%"}},a.a.createElement(E.a,{title:Object(S.r)("$__open",1),text:Object(S.r)("$__open",1),color:Object(S.d)("color"),icon:"launch",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:l.cardId,module:"cardEdit",activeModule:"cardEdit",data:c.a.getState().db.cards[l.cardId]})),x()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}),a.a.createElement(E.a,{title:Object(S.r)("$__markAsRead",1),text:Object(S.r)("$__markAsRead",1),color:Object(S.d)("color"),icon:"mark_chat_read",onClick:function(){x()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}))):a.a.createElement(a.a.Fragment,null))}))):a.a.createElement(a.a.Fragment,null))}));function Wp(){Wp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Up=Object(s.b)((function(e){return{store:{notifications:e.notifications,timeline:e.timeline,session:e.session,cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.notifications,n=t.session,o=t.timeline,i=t.functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(7),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(!1),k=Object(h.a)(j,2),L=k[0],C=k[1],I=a.a.useRef();a.a.useEffect((function(){return u||(m(!0),T()),function(){m(!1)}}),[]),a.a.useEffect((function(){return T(0,0,!0),function(){}}),[e.store.timeline,e.store.notifications,e.store.cards]);var T=function(){var t=Object(p.a)(Wp().mark((function t(){var r,n,a,o,i,l,s,u,p,h,m=arguments;return Wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=m.length>0&&void 0!==m[0]?m[0]:0,n=m.length>1&&void 0!==m[1]?m[1]:0,a=m.length>2&&void 0!==m[2]&&m[2],D<(o=r)&&(o=0),!a){t.next=9;break}t.t0={data:[]},t.next=12;break;case 9:return t.next=11,dt.a.post("/M_UnReadedList",{skip:o,limit:n});case 11:t.t0=t.sent;case 12:if(i=t.t0,l=0,s=0,u=0,t.prev=16,!(a||i&&i.data&&i.data.length>0)){t.next=29;break}return p=Object(d.a)({},c.a.getState().timeline),h=[],t.next=22,new Promise((function(e,t){i.data.map((function(t,r){l=t.total,h.push(t.card),t.timeline&&t.timeline.length>0&&t.timeline.map((function(e){var t={},r={};e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.map((function(e){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e.type,Object(d.a)(Object(d.a)({},r[e.type]),{},Object(f.a)({},e._id,e))))})),parseInt(s)<parseInt(e.data.created_at)&&(s=parseInt(e.data.created_at)),(0===u||u>parseInt(e.data.created_at))&&(u=parseInt(e.data.created_at)),p=Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},p&&p[e.nodeId]?p[e.nodeId]:{}),{},Object(f.a)({},e.data._id,Object(d.a)(Object(d.a)(Object(d.a)({},e.data),e.params),{},{readedBy:t,_reactions:r})))))})),r+1===i.data.length&&e(!0)}))}));case 22:t.sent&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:l>0?l:0,lastNotification:s,firstNotification:u}),e.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),p)),Object(Ke.c)(e,h),y(!1),t.next=30;break;case 29:y(!1);case 30:t.next=35;break;case 32:t.prev=32,t.t1=t.catch(16),console.log(t.t1);case 35:y(!1);case 36:case"end":return t.stop()}}),t,null,[[16,32]])})));return function(){return t.apply(this,arguments)}}(),F=function(){var t=Object(p.a)(Wp().mark((function t(){return Wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.r)("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){C(!1);var t=Object(d.a)({},c.a.getState().timeline);Object.keys(t).map((function(e){t&&t[e]&&Object.keys(t[e]).filter((function(r){return c.a.getState().db.cards[e]&&"chatGroup"!==c.a.getState().db.cards[e].type&&(!t[e][r].readedBy||t[e][r].readedBy&&!t[e][r].readedBy[n._id])})).map((function(r){delete t[e][r]}))})),e.reduxFunction("ASYNC","SET_TIMELINE",{timeline:t}),e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:0,lastNotification:0,firstNotification:0});try{i.emit("data",{module:"notifications",method:"put",action:"readedAll"},{})}catch(r){console.log(r)}}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(e){I.current&&I.current.contains(e.target)||C(!1)},D=0,A=0;return Object.keys(c.a.getState().db.cards).filter((function(e){var t=c.a.getState().db.cards[e];if("chatGroup"!==t.type&&t._users&&t._users[n._id]&&o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).length>0)return!0})).map((function(e,t){o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).map((function(){t<=O&&(A+=1),D+=1}))})),r.total>D&&(D=r.total),0===D&&L&&C(!1),0===D?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(H.a,{ref:I,"aria-controls":L?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){C((function(e){return!e}))}},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:D,color:"secondary"},a.a.createElement(ae.a,{icon:0===D?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),a.a.createElement(Re.a,{open:L,anchorEl:I.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:N},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"369px",overflowY:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px",width:"-webkit-fill-available"}},a.a.createElement("div",null,Object(S.r)("$__notifications")),D>0?a.a.createElement(E.a,{title:Object(S.r)("$__clearNotifications",1),text:Object(S.r)("$__clearNotifications",1),color:Object(S.d)("color"),icon:"clear_all",onClick:function(){F()},size:"21px",style:{padding:"0px !important"}}):a.a.createElement(a.a.Fragment,null)),Object.keys(c.a.getState().db.cards).filter((function(e){var t=c.a.getState().db.cards[e];if("chatGroup"!==t.type&&t._users&&t._users[n._id]&&o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).length>0)return!0})).sort((function(e,t){var r=0,a=0;return o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).map((function(t){parseInt(o[e][t].created_at)>r&&(r=parseInt(o[e][t].created_at))})),o[t]&&Object.keys(o[t]).filter((function(e){return o[t][e].user._id!==n._id&&(!o[t][e].readedBy||o[t][e].readedBy&&!o[t][e].readedBy[n._id])})).map((function(e){parseInt(o[t][e].created_at)>r&&(a=parseInt(o[t][e].created_at))})),r>a?-1:r<a?1:0})).map((function(e,t){return t<=O?a.a.createElement("div",{key:"".concat(e)},a.a.createElement(Hp,{data:{cardId:e},onRead:function(){setTimeout((function(){T(0,8)}),2e3)},onClick:function(){C(!1)}})):a.a.createElement(a.a.Fragment,{key:"".concat(t).concat(e)})})),parseInt(c.a.getState().notifications.total)>A?a.a.createElement("div",{style:{width:"calc(100% - 14px)",display:"flex",justifyContent:"center",padding:7}},v?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.r)("$__loadingNotifications")),a.a.createElement(Or,null)):a.a.createElement(E.a,{title:Object(S.r)("$__seeMoreNotifications",1),text:Object(S.r)("$__seeMoreNotifications",1),color:Object(S.d)("menu"),icon:"notifications_active",onClick:function(){T(O),w(O+7)},size:"21px",style:{padding:"0px !important"}})):a.a.createElement(a.a.Fragment,null)))))})))}));var Vp=Object(s.b)((function(e){return{users:e.users}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useRef(null),l=c.a.getState().db,s=(l.users,Object(S.j)(),window.location.hash.split("/"));s[0]=s[0].replace("#","");var u=null;36===s[0].length||s[2]&&36===s[2].length?36===s[0].length?u=s[0]:36===s[2].length&&(u=s[2]):u=null;var p=window.location.pathname.replace("/","").toLowerCase(),f=l.dataType.filter((function(e){if(("sp"===p||!e.hash&&!u||e.hash&&u)&&e.view&&Object.keys(e.view).filter((function(e){return e===p})).length>0&&(!e.view[p].pages||s[1]&&e.view[p].pages.indexOf(s[1])>-1||!s[1]&&e.view[p].pages.indexOf("none")>-1))return e})),m=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(d.a)({type:t.name,_parent:s[0]&&l.cards[s[0]]?s[0]:null},"user"===t.data.type?{}:Object(d.a)({status:"notStarted"},r?{isTemplate:!0}:{}))}))},g=function(e){i.current&&i.current.contains(e.target)||o(!1)};function b(e){"Tab"===e.key&&(e.preventDefault(),o(!1))}return 0===f.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"QuickAddBt"},a.a.createElement(H.a,{ref:i,"aria-controls":n?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){1===f.length?m(f[0],!(!s[1]||"template"!==s[1])):f.length>1&&o((function(e){return!e}))}},a.a.createElement(ae.a,{usePropagation:!0,size:"27px",color:Object(S.d)("menu")},"add_box")),a.a.createElement(Re.a,{open:n,anchorEl:i.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:g},a.a.createElement(Be.a,{autoFocusItem:n,id:"menu-list-grow",onKeyDown:b},f.sort((function(e,t){return e.name>t.name?-1:0})).map((function(e,t){return a.a.createElement(Me.a,{key:t,style:{color:Object(S.d)("menu")},onClick:function(){o(!1),m(e)}},a.a.createElement(ae.a,{icon:e.icon,style:{margin:"none !important"},color:Object(S.d)("menu")}),a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.r)("$__".concat(e.name),1)))}))))))})))}));function qp(){qp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Xp=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.timeline,o=t.session,i=(t.chat,a.a.useState(!1)),l=Object(h.a)(i,2),s=(l[0],l[1]),u=a.a.useState(!1),d=Object(h.a)(u,2),f=d[0],m=d[1],g=a.a.useState({}),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState("users"),O=Object(h.a)(x,2),w=O[0],j=O[1],E=a.a.useRef(null);_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),Object(S.j)(),a.a.useEffect((function(){s(!0),k()}),[n]);var k=function(){var e=Object(p.a)(qp().mark((function e(){var t;return qp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ir(),y(t),v.total>0&&0===v.users&&j("groups"),"groups"===w&&v.total>0&&0===v.groups&&j("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(e){E.current&&E.current.contains(e.target)||m(!1)},C=Object.keys(r.cards).filter((function(e){return r.cards[e]&&r.cards[e]._kpiTimer&&r.cards[e]&&r.cards[e]._users&&Object.keys(r.cards[e]._kpiTimer).filter((function(t){return r.cards[e]._kpiTimer&&r.cards[e]._kpiTimer[t]&&r.cards[e]._kpiTimer[t].userId&&o&&o._id&&r.cards[e]._kpiTimer[t].userId===o._id})).length>0&&Object.keys(r.cards[e]._users).filter((function(e){return o&&o._id&&e===o._id})).length>0})).map((function(e){return r.cards[e]}));return 0===C.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(H.a,{ref:E,"aria-controls":f?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){m((function(e){return!e}))}},a.a.createElement(Ae.a,{badgeContent:C.length,color:"secondary",overlap:"rectangular"},a.a.createElement(ae.a,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),C.length>0&&a.a.createElement(Re.a,{open:f,anchorEl:E.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:L},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},Object(S.r)("$__timersInProgress")),C.map((function(e,t){return a.a.createElement(Dn,{db:"cards",key:t,data:e,notGlobalExpanded:!0,viewTimer:!0})}))))))})))}));function Kp(){Kp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Jp=Object(s.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){var t=a.a.useState(""),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState([]),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!1),w=Object(h.a)(O,2),j=w[0],k=w[1],L=a.a.useState("all"),C=Object(h.a)(L,2),I=C[0],T=C[1],F=c.a.getState(),N=F.db,D=F.session,A=Object(S.j)(),P=window.location.hash.split("/");P[0]=P[0].replace("#",""),a.a.useEffect((function(){return function(){}}),[]),a.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.text.length>1&&e.text!==n&&(o(e.text),clearTimeout(t),t=setTimeout((function(){return $()}),500),u(!0)),function(){return clearTimeout(t)}}),[e.text]),a.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.completed!==x&&e.text&&e.text.length>1&&(u(!0),_(!x),k(!0),t=setTimeout((function(){return $()}),500)),function(){return clearTimeout(t)}}),[e.completed]),a.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.deleted!==j&&e.text&&e.text.length>1&&(u(!0),k(!j),_(!0),t=setTimeout((function(){return $()}),500)),function(){return clearTimeout(t)}}),[e.deleted]);var $=function(){var t=Object(p.a)(Kp().mark((function t(){var r;return Kp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.b)(e,{search:e.text,ignoreLoader:!0,deleted:e.deleted,completed:e.completed,cardLoad:"search"});case 2:(r=t.sent)&&setTimeout((function(){z(r)}),1e3);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=Object(p.a)(Kp().mark((function t(r){var n,a,o,i;return Kp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.a.getState().db.users[D._id]||{},console.log(D,n),a=Object(d.a)(Object(d.a)({},c.a.getState().db.cards),r),n.groups||[],o=new Promise((function(t,r){t(Object.keys(a).filter((function(t){return"chatGroup"!==a[t].type&&(!a[t].checklist||a[t].checklist&&a[t].showCard)&&(e.deleted&&a[t].deleted||!e.deleted&&!a[t].deleted&&(!e.completed&&a[t]&&"completed"!==a[t].status||e.completed&&a[t]&&"completed"===a[t].status))&&((A.owner||A.planAdmin)&&("plan"!==a[t].type||"plan"===a[t].type&&Object(st.B)(t))||D._id&&a[t]._users&&a[t]._users[D._id]||a[t]._groups&&a[t]._groups.filter((function(e){return n&&n.groups&&n.groups.filter((function(t){return t.value===e.value})).length>0})))&&e.text&&(a[t].name&&e.text&&a[t]&&a[t].name&&a[t].name.toLowerCase().indexOf(e.text.toLowerCase())>-1||a[t]&&e.text&&a[t].description&&a[t].description.toLowerCase().indexOf(e.text.toLowerCase())>-1)&&(!a[t].private||a[t].private&&a[t]._users&&a[t]._users[D._id])})))})),t.next=7,o.then((function(e){return e}));case 7:(i=t.sent)&&(b(i),u(!1),e.onFinish&&e.onFinish(i.length));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{positin:"relative",width:"100%",minHeight:"100px"}},s&&a.a.createElement(un,null,a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Or,null)))),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement("div",{style:{width:"177px",padding:7,display:"flex",flexDirection:"column",marginRight:"solid 1px lightgray"}},g.length>1?a.a.createElement("div",{style:{backgroundColor:"all"===I?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(E.a,{title:Object(S.r)("$__allResults","*"),text:Object(S.r)("$__allResults","*"),color:"all"===I?Object(S.d)("menu"):"lightGray",icon:"manage_search",onClick:function(){T("all")},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})):a.a.createElement(a.a.Fragment,null),N.type.filter((function(e){return g.filter((function(t){return N.cards[t].type===e.value})).length>0})).map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"-").concat(e),style:{backgroundColor:"asset"===I?"rgba(0,0,0,0.08)":"",padding:"0 3px",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement(E.a,{title:Object(S.r)("".concat(e.label),"*"),text:Object(S.r)("".concat(e.label),"*"),color:I===e.value?Object(S.d)("menu"):"lightGray",icon:e.icon,onClick:function(){T(e.value)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}),a.a.createElement("div",{style:{backgroundColor:I===e.value?Object(S.d)("menu",1):Object(S.d)("menu",.5),fontSize:9,color:"#FFFFFF",borderRadius:11,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"}},g.filter((function(t){return N.cards[t].type===e.value})).length))}))),a.a.createElement("div",{style:{width:"calc(100% - 177px)",padding:7,display:"flex",flexDirection:"column"}},a.a.createElement(un,null,N.type.filter((function(e){return"all"!==I&&e.value===I||"all"===I&&g.filter((function(t){return N.cards[t].type===e.value})).length>0})).map((function(t,r){return a.a.createElement("div",{key:"".concat(t,"-").concat(r)},a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)(t.label,1),icon:t.icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),g.filter((function(e){return N.cards[e].type===t.value})).sort((function(e,t){return N.cards[e].name<N.cards[t].name?-1:N.cards[e].name>N.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(fn,{key:t,md:12,style:{minWidth:"300px"}},a.a.createElement(Dn,{data:N.cards[t],db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){return a.a.createElement(a.a.Fragment,null)})));function Zp(){Zp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Qp=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=c.a.getState(),n=r.timeline,o=r.functions.socket,i=c.a.getState().db,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(e.data),b=Object(h.a)(g,2),v=b[0],y=b[1],x=v.name.split("."),O=x[x.length-1],w=a.a.useState(!1),j=Object(h.a)(w,2),E=j[0],k=j[1],L=a.a.useState(x[0]),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(x[0]),N=Object(h.a)(F,2),D=N[0],A=N[1];a.a.useEffect((function(){D||A(!0)}),[e.data]),"blob"===v.name&&(v.name="".concat(Object(S.r)("$__coverImage","*"),".jpg"),O="jpg");var P="attachment";c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(O.toLowerCase())>-1})).length>0&&(P=c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(O.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(v.file));var $=function(){var e=Object(p.a)(Zp().mark((function e(t){return Zp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{o.emit("data",{module:"node",method:"put",action:"update"},Object(d.a)({_id:v._id},t),Object(p.a)(Zp().mark((function e(){return Zp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(Object(d.a)(Object(d.a)({},v),t)),k(!1);case 2:case"end":return e.stop()}}),e)}))))}catch(r){console.log(r)}case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),z=Object(d.a)({},i.cards[v.cardId]&&n[v.cardId]&&n[v.cardId][v.timelineId]?n[v.cardId][v.timelineId]:v.message);return z&&!z.message&&(z=Object(d.a)(Object(d.a)({},z),{},{message:Object(S.r)("$__onlyAttachment")})),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},e.resume?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"},onClick:function(t){e.openLightBox&&e.openLightBox()}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",overflow:"hidden"}},"string"===typeof P&&-1===P.indexOf("https")&&-1===P.indexOf("svg")?a.a.createElement(ae.a,{icon:P,size:"33px"}):a.a.createElement("img",{src:P,width:"100%",style:{width:"auto",height:"auto",maxHeight:"77%"},onError:function(e){return e.target.src=P}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"calc(100% - 80px)",maxWidth:"calc(100% - 80px)",minWidth:"150px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},Object(S.b)(v.name,e.searchText)),i.users[v.createdBy]&&a.a.createElement("div",{style:{position:"absolute",right:"10px",top:"7px",zIndex:"10"}},a.a.createElement(ct.a,{max:7},a.a.createElement(Ge.a,{title:i.users[v.createdBy].displayName?i.users[v.createdBy].displayName:i.users[v.createdBy].name},a.a.createElement(si,{alt:i.users[v.createdBy].displayName?i.users[v.createdBy].displayName:i.users[v.createdBy].name,src:"".concat(i.users[v.createdBy].image),style:{width:"15px",height:"15px"}},i.users[v.createdBy].name.substr(0,1)))))),e.showParent&&(v.timelineId||v.message)&&(i.cards[v.cardId]&&n[v.cardId]&&n[v.cardId][v.timelineId]||v.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(ia,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:z,db:"cards",nodeId:v.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&v.cardId&&i.cards[v.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(Dn,{db:"cards",data:i.cards[v.cardId],showConnectedIn:!0})),a.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"15px",display:"flex",alignItems:"center",height:"70px"}},a.a.createElement("div",{style:{position:"absolute",top:"0px",width:"calc(100% - 30px)",borderBottom:"solid 1.5px ".concat(Object(S.d)("color")),alignItems:"center",display:"flex",color:Object(S.d)("color")}},a.a.createElement("div",{style:{width:"357px",textAlign:"center",alignItems:"center",justifyContent:"center",display:"flex",cursor:"pointer"},onClick:function(t){e.onClick&&e.onClick()},onDoubleClick:function(){k(!0)}},E?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(tt,{label:Object(S.r)("$__taskTitle"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){T(e.target.value)},onBlur:function(e){""===e.target.value&&k(!E)},onKeyDown:function(e){13===e.keyCode&&I&&$({name:"".concat(I,".").concat(O)}),27===e.keyCode&&(k(!E),T())}},autoFocus:!0,value:I,placeholder:Object(S.r)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return $({name:"".concat(I,".").concat(O)})}},a.a.createElement(ae.a,{color:"green",icon:"save",title:Object(S.r)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){k(!E),T("")}},a.a.createElement(ae.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.r)("$__cancel","*"),size:e.actionsSize||"25px"}))))):a.a.createElement("div",{style:{width:"100%"}},v.in&&v.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===v.in.db?a.a.createElement(Ge.a,{title:v.in.name},a.a.createElement(si,{alt:v.in.name,src:v.in.image,style:{width:"15px",height:"15px"}},v.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(at,{title:v.in.name,icon:"User"===v.in.db?null:v.in.type&&i&&i.dataType&&i.dataType.filter((function(e){return e.name===v.in.type}))[0]&&i.dataType.filter((function(e){return e.name===v.in.type}))[0].icon||"$__topic",color:Object(S.d)("medium"),style:{padding:"7px",width:"calc(100% - 30px)",textAlign:"left"},textStyle:!0})),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",padding:"0 15px"}},a.a.createElement("div",{style:(t={position:"relative",float:"left",width:"33px",height:"33px",marginRight:"7px",alignItems:"center"},Object(f.a)(t,"height","50px"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"justifyContent","center"),t)},"string"===typeof P&&-1===P.indexOf("https")&&-1===P.indexOf("svg")?a.a.createElement(ae.a,{icon:P,size:"33px"}):a.a.createElement("div",{style:{position:"absolute",width:"33px",height:"33px",margin:"7px",borderRadius:"50%",overflow:"hidden",backgroundImage:'url("'.concat(P,'")'),backgroundPosition:"center center",backgroundSize:"cover"}})),v.name),v.createdBy&&a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"42px",clear:"both"}},a.a.createElement(si,{alt:v.createdBy.name,src:v.createdBy.image,style:{width:"15px",height:"15px"}},v.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},v.createdBy.name," - (",Object(S.k)(v.created_at),")")))),a.a.createElement("div",{style:{width:"130px",textAlign:"center",borderRight:"solid 1.5px ".concat(Object(S.d)("color")),alignItems:"center",justifyContent:"center",display:"flex",fontSize:"12px"}},_()(new Date(1e3*v.created_at)).format("DD/MM/YYYY HH:mm")),a.a.createElement("div",{style:{width:"130px",borderRight:"solid 1.5px ".concat(Object(S.d)("color")),alignItems:"center",justifyContent:"center",display:"flex",overflow:"visible"}},i.users[v.createdBy]&&a.a.createElement(Ge.a,{title:i.users[v.createdBy].name},a.a.createElement(a.a.Fragment,null,a.a.createElement(si,{size:"sm",src:"".concat(i.users[v.createdBy].image)},i.users[v.createdBy].name.substr(0,1))))),a.a.createElement("div",{style:{width:"300px",textAlign:"left",borderRight:"solid 1.5px ".concat(Object(S.d)("color")),paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}}),a.a.createElement("div",{style:{width:"130px",textAlign:"left",paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}},a.a.createElement(Ge.a,{title:Object(S.r)("$__showFile")},a.a.createElement(ae.a,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(v.timelineId||v.message)&&a.a.createElement(Ge.a,{title:Object(S.r)("$__viewMessage")},a.a.createElement(ae.a,{size:"20px",onClick:function(){m(!u)}},"feedback")))))),(v.timelineId||v.message)&&u&&(i.cards[v.cardId]&&n[v.cardId]&&n[v.cardId][v.timelineId]||v.message)&&a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ia,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:z,db:"cards",nodeId:v.cardId})))}));function ef(){ef=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var tf=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){var t=a.a.useState(""),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],d=a.a.useState([]),f=Object(h.a)(d,2),m=f[0],g=f[1],b=c.a.getState(),v=b.db,y=b.functions,x=v.dataType,_=(y.socket,setTimeout((function(){}),1e3),[]),O=window.location.hash.split("/");O[0]=O[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return w()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var w=function(){var t=Object(p.a)(ef().mark((function t(){var r;return ef().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dt.a.get("/M_Files_Search/?text=".concat(e.text));case 2:(r=t.sent)&&r.data&&(e.onFinish&&e.onFinish(Object.keys(r.data).length),g(r.data),u(!1));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{positin:"relative",width:"100%"}},s&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Or,null)),a.a.createElement(un,null,Object.keys(m).length>0&&a.a.createElement(fn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(wn,{title:Object(S.r)("$__files",1),icon:x.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(S.d)("menu"),filterText:e.text,style:{padding:"7px"}}),Object.keys(m).map((function(t,r){return _.push(m[t]),a.a.createElement(fn,{key:t,md:12},a.a.createElement(Qp,{data:m[t],searchText:e.text,resume:!0,showParent:!0,openLightBox:function(){var r;r=m[t]._id,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:_,file:r}),e.onAction&&e.onAction()}}))}))))))}))),rf=r(1036),nf=r.n(rf),af=function(e){return{avatar:{width:"30px",height:"30px",backgroundSize:"cover",borderRadius:"50%"},component:{marginTop:"15px",marginRight:"8px",marginBottom:"15px",zIndex:"10",display:"flex",alignItems:"center",justifyContent:"center"},selectedName:{display:"inline-flex",cursor:"pointer"},selectedNameText:{textDecoration:"none",fontSize:"12px",fontFamily:"Soleto"}}};function of(){of=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var cf=Object(s.b)((function(e){return{users:e.db.users}}),(function(e){return Object(I.b)(C,e)}))(nf()(af)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=c.a.getState().functions.socket,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useRef(null),m=function(e){f.current&&f.current.contains(e.target)||u(!1)};function g(e){"Tab"===e.key&&(e.preventDefault(),u(!1))}var b=a.a.useRef(s);a.a.useEffect((function(){!0===b.current&&!1===s&&f.current.focus(),b.current=s}),[s]);var v=function(){var e=Object(p.a)(of().mark((function e(){return of().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.emit("data",{module:"user",method:"post",action:"logout"},{},(function(){})),localStorage.clear(),setTimeout((function(){window.location.href="/login"}),500);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=e.classes,x=r.users,_=x&&Object.keys(x).length>0?x[Object.keys(x).find((function(e){return n&&n._id&&x[e]&&x[e]._id&&x[e]._id.indexOf(n._id)>-1}))]:{};return _&&_.name?a.a.createElement("div",{className:y.component},a.a.createElement("div",{className:y.selectedName,onClick:function(e){u((function(e){return!e}))}},a.a.createElement("div",{ref:f,className:y.selectedNameText,style:{color:Object(S.d)("light")||"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(Tl.a,{title:a.a.createElement(a.a.Fragment,null,(_.name,_.name))},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"33px",height:"33px",borderRadius:"50%",border:"solid 1px ".concat(Object(S.d)("menu"))}},a.a.createElement("div",{style:{display:"flex",width:"90%",height:"90%",backgroundImage:'url("'.concat(_.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%"}})))))),a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(Re.a,{open:s,anchorEl:f.current,role:void 0,transition:!0,disablePortal:!0},(function(t){var o=t.TransitionProps,i=t.placement;return a.a.createElement($e.a,Object.assign({},o,{style:{transformOrigin:"bottom"===i?"center top":"center bottom"}}),a.a.createElement(Ye.a,null,a.a.createElement(Pe.a,{onClickAway:m},a.a.createElement(Be.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:g},a.a.createElement(Me.a,{onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(d.a)({type:"user"},r.users[n._id])}))}},Object(S.r)("$__myProfile",1)),a.a.createElement(Me.a,{onClick:function(){return v()}},Object(S.r)("$__logout",1))))))})))):null})));var lf=Object(s.b)((function(e){return{controls:e.controls,chatNotifications:e.chat.notifications}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(va)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=t.chat,l=a.a.useState(""),s=Object(h.a)(l,2),u=s[0],p=s[1],f=a.a.useState(0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(0),y=Object(h.a)(v,2),x=(y[0],y[1]),_=a.a.useState(0),O=Object(h.a)(_,2),w=O[0],j=O[1],k=a.a.useState(!1),L=Object(h.a)(k,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(h.a)(T,2),N=F[0],D=F[1],A=a.a.useState("asset"),P=Object(h.a)(A,2),z=P[0],M=P[1],B=a.a.useState(!1),Y=Object(h.a)(B,2),R=Y[0],G=(Y[1],Object(S.j)()),W=a.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useRef(null),K=window.location.hash.split("/");K[0]=K[0].replace("#",""),a.a.useEffect((function(){return J(),function(){}}),[e]);var J=function(){var e={};Fp.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=Fp.filter((function(e){return e.path===window.location.pathname}))[0]);var t=Object(S.r)("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&K[0]&&r.cards[K[0]]&&(t="".concat(Object(S.r)("$__".concat(e.alias),1),": ").concat(r.cards[K[0]].name)),e.tabs&&e.tabs.length>0&&e.tabs.filter((function(e){return e.path===K[1]})).length>0&&(a=Object(S.r)("$__".concat(e.tabs.filter((function(e){return e.path===K[1]}))[0].alias),1),n=e.tabs.filter((function(e){return e.path===K[1]}))[0].icon),q({title:t,icon:n,sTitle:a,sIcon:null})};return a.a.createElement("div",{style:{position:"absolute",top:"-4px",right:0,left:0,display:"flex",alignItems:"center",zIndex:"10 !important"},id:"top_"},a.a.createElement(un,null,a.a.createElement(fn,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&a.a.createElement(H.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},a.a.createElement(ae.a,{icon:"menu",title:"$__showMenu",size:"27px",color:Object(S.d)("menu")})),a.a.createElement("div",{id:"top_pageTitle",style:{color:Object(S.d)("menu"),marginLeft:"22px",fontSize:"12px",fontWeight:"bold"}},V.sTitle?"".concat(V.title," - ").concat("matrix"===V.sTitle.toLowerCase()?"MATRIX SWOT":V.sTitle):V.title)),a.a.createElement($,null,a.a.createElement(fn,{xs:12,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-start",alignItems:"center",zIndex:"10 !important"},id:"top_search"},a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 15px)",zIndex:"10 !important"}},a.a.createElement(tt,{ref:X,label:Object(S.r)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==u?a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"close",onClick:function(){p(""),I(!1),D(!1)}})):null,onChange:function(e){p(e.target.value),I(!0),D(!0)}},value:u,placeholder:Object(S.r)("$__searchInMachen")}),""!==u&&u.length>1&&a.a.createElement(Pe.a,{onClickAway:function(){p(""),I(!1),D(!1)}},a.a.createElement(Re.a,{open:!!u,anchorEl:X.current,role:void 0,transition:!0,disablePortal:!0,style:{position:"absolute",zIndex:10,bottom:0,left:"5px",right:"5px",minWidth:"500px"}},(function(e){var t=e.TransitionProps;e.placement;return a.a.createElement($e.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),a.a.createElement(Ye.a,{style:{zIndex:"3",boxShadow:"0 7px 15px rgba(0,0,0,0.33) !important"}},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",borderBottom:"solid 2px rgba(0,0,0,0.22)",backgroundColor:"#f1f1f1",justifyContent:"space-between"}},a.a.createElement("div",{style:{backgroundColor:"asset"===z?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(E.a,{title:Object(S.r)("$__asset","*"),text:Object(S.r)("$__asset","*"),color:"asset"===z?Object(S.d)("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){M("asset"),I(!0),D(!0),b(0),x(0),j(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"completed"===z?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(E.a,{title:Object(S.r)("$__completed","*"),text:Object(S.r)("$__completed","*"),color:"completed"===z?Object(S.d)("menu"):"lightGray",icon:"verified",onClick:function(){M("completed"),I(!0),D(!0),b(0),x(0),j(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"deleted"===z?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(E.a,{title:Object(S.r)("$__deleted","*"),text:Object(S.r)("$__deleted","*"),color:"deleted"===z?Object(S.d)("menu"):"lightGray",icon:"delete_forever",onClick:function(){M("deleted"),I(!0),D(!0),b(0),x(0),j(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}))),"0"!==String(g)||"0"!==String(w)||C||N?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{textAlign:"center",fontSize:"16px",color:"red",marginTop:33,marginBottom:33}},Object(S.r)("$__noResultsFound")),u?a.a.createElement(a.a.Fragment,null,a.a.createElement($,null,a.a.createElement(Jp,{text:u||"",onFinish:function(e){b(e),I(!1)},onAction:function(){p(""),I(!1),b(0),x(0),j(0)},completed:"completed"===z,deleted:"deleted"===z,adminView:R})),a.a.createElement($,null,a.a.createElement(tf,{text:u||"",onFinish:function(e){j(e),D(!1)},onAction:function(){p(""),b(0),x(0),j(0)}}))):a.a.createElement(a.a.Fragment,null))))})))))),a.a.createElement(fn,{xs:5,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-end",alignItems:"center",zIndex:2001}},a.a.createElement("div",{id:"top_quickAdd"},a.a.createElement($,null,a.a.createElement(Vp,{hashs:K}))),a.a.createElement($,null,a.a.createElement(Bp,null)),a.a.createElement("div",{id:"top_notifications"},a.a.createElement($,null,a.a.createElement(Up,{loader:!(!e.loaders||!e.loaders.notifications)}))),a.a.createElement("div",{id:"top_timers"},a.a.createElement($,null,a.a.createElement(Xp,null))),a.a.createElement("div",{id:"top_requireApproval"},a.a.createElement($,null,a.a.createElement(Rp,null))),a.a.createElement("div",{id:"top_myDay"},a.a.createElement($,null,a.a.createElement(Yp,null))),a.a.createElement("div",{id:"top_moreOptions"},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:c.a.getState().controls.unlockedPrivates,color:"secondary"},a.a.createElement(We,{transparent:!0,count:50,size:"27px",icon:"settings",title:Object(S.r)("$__settings"),btColor:"lightgray",options:[].concat(Object(Ne.a)(G&&G.user&&(G.userAdmin||G.userModerate)?[{name:"$__usersAndContacts",icon:"account_box",onClick:function(){i.a.push("c#tab/users")}},{name:"$__customersCompaniesAndDivisions",icon:"business",onClick:function(){i.a.push("c#tab/units")}}]:[]),[{name:"$__support",icon:"help_outline",onClick:function(){window.open("https://support.machen.ai","_blank")}},n&&(n._access&&n._access.master||n.isAdmin)&&{name:"$__APPSettings",icon:"engineering",onClick:function(){window.open("/masterAdmin#tab/languages","_self")},show:"hover"},n&&"701bbca1-e1e4-4ea0-ada8-30f74ae74894"===n._id&&{name:"DEV",icon:"code",onClick:function(){i.a.push("plataformAdministrator")},show:"hover"}],Object(Ne.a)(c.a.getState().controls.hidePrivate?[]:[{name:Object(S.r)(c.a.getState().controls.lockPrivate?"$__lockMyPrivateActivities":"$__unlockMyPrivateActivities",1),icon:c.a.getState().controls.lockPrivate?"private_connectivity":"lock_open",color:c.a.getState().controls.lockPrivate?"lightgray":null,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{lockPrivate:!c.a.getState().controls.lockPrivate},c.a.getState().controls.lockPrivate?{}:{unlockedPrivates:0}))},show:"hover"}]),[{name:Object(S.r)(c.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),icon:c.a.getState().chat.notifications?"notifications_active":"notifications_off",color:c.a.getState().chat.notifications?"green":"lightgray",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},o),{},{notifications:!c.a.getState().chat.notifications}))},show:"hover"}],Object(Ne.a)(c.a.getState().controls.unlockedPrivates>0?[{name:Object(S.r)("$__lockMyPrivateActivities",1),icon:"private_connectivity",color:"red",count:c.a.getState().controls.unlockedPrivates,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:0,lockPrivate:!1}))},show:"hover"}]:[]),Object(Ne.a)(c.a.getState().session&&c.a.getState().session._access&&c.a.getState().session._access.masterAdmin>0?[{name:Object(S.r)("$__accountSettings",1),icon:"settings_applications",color:"lightgray",onClick:function(){i.a.push("acc#tab/resume")},show:"hover"}]:[]))}))),a.a.createElement("div",{style:{marginLeft:"15px"},id:"top_user"},a.a.createElement(cf,null)))))}))),sf=function(e){return{root:{position:"relative",width:"100%",cursor:"pointer"},user:{display:"flex",margin:"auto",height:"37px",alignItems:"center"},userExtended:{display:"flex",height:"37px",alignItems:"center"},userActive:{display:"inherit",height:"37px",alignItems:"center",justifyContent:"center",backgroundColor:Object(S.d)("color",.33)},userActiveExtended:Object(f.a)({display:"inherit",height:"37px",alignItems:"center",justifyContent:"center",backgroundColor:Object(S.d)("color",.33)},"justifyContent","left"),name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",fontWeight:"bold",fontSize:"14px",color:Object(S.d)("darkText"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.05)"},lastMessage:{position:"absolute",top:"30px",left:"36px",right:"15px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Object(S.d)("medium"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.05)",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},lastMessageUnReaded:{position:"absolute",top:"30px",left:"36px",right:"15px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",fontWeight:"bold",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Object(S.d)("medium"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.05)",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},access:{position:"absolute",top:"33px",left:"45px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",color:Object(S.d)("color"),boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)"},accessEditing:{position:"absolute",top:"33px",left:"45px",right:"0px",height:"auto",minHeight:"290px",padding:"7px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",fontWeight:"bold",color:Object(S.d)("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}}}};var uf=Object(s.b)((function(e,t){return{store:{chat:e.chat,timeline:e.timeline,cards:e.db.cards,users:e.db.users,adminView:e.db.adminView,session:e.session,usersStatus:e.usersStatus}}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(sf)((function(e){var t=e.classes,r=e.store,n=r.chat,o=r.session,i=r.timeline,l=(r.db,r.usersStatus),s=!!e.expanded,u=Object(S.j)(),p=Object(d.a)({},c.a.getState().db.users),h={};p=(p=Object.keys(p).filter((function(e){return e!==o._id&&"user"===p[e].type})).map((function(t){return e.store.users[t]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))).map((function(t){t.unReadedCount=0;var r={};r=Object.keys(r).filter((function(e){return r[e]&&r[e].user&&r[e].user._id===t._id&&"comment"===r[e].type})).map((function(e){return r[e]}));var n=Object(d.a)({},e.store.users[t._id]&&i[t._id]?e.store.users[t._id]&&i[t._id]:{});n=Object.keys(n).filter((function(e){return n[e]&&"comment"===n[e].type})).map((function(e){return n[e]}));var a=[].concat(Object(Ne.a)(r),Object(Ne.a)(n));return a=a.sort((function(e,t){return Math.ceil(e.created_at)<Math.ceil(t.created_at)?-1:1})).map((function(e){return e})),"boolean"!==typeof t?(h=Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},t._id,Object(d.a)(Object(d.a)({},e.store.users[t._id]),{},{type:"user",_lastMessage:a[a.length-1]?a[a.length-1]:null,unReadedCount:r.filter((function(e){return"comment"===e.type&&!e.deleted&&(!e.readedBy||e.readedBy&&!e.readedBy[o._id])})).length}))),t._lastMessage=a[a.length-1]?a[a.length-1]:null,t.unReadedCount=r.filter((function(e){return"comment"===e.type&&!e.deleted&&(!e.readedBy||e.readedBy&&!e.readedBy[o._id])})).length):(t._lastMessage=null,t.unReadedCount=0),t}));var m=Object.keys(c.a.getState().db.cards).filter((function(t){return"chatGroup"===c.a.getState().db.cards[t].type&&!c.a.getState().db.cards[t].deleted&&(c.a.getState().db.cards[t]._users&&c.a.getState().db.cards[t]._users[o._id]||!c.a.getState().db.cards[t].private&&e.store.adminView&&u&&(u.owner||u.admin))})).map((function(e){return c.a.getState().db.cards[e]}));m&&m.length>0&&m.filter((function(e){if(e._users&&e._users[o._id])return!0})).map((function(e){var t;i[e._id]&&Object.keys(i[e._id]).length>0&&(t=Object.keys(i[e._id]).filter((function(t){return i[e._id]&&i[e._id][t]&&"comment"===i[e._id][t].type})).sort((function(t,r){return i[e._id][t]&&i[e._id][r]&&String(i[e._id][t].created_at)&&String(i[e._id][r].created_at)&&parseInt(i[e._id][t].created_at)>parseInt(i[e._id][r].created_at)?-1:i[e._id][t]&&i[e._id][r]&&String(i[e._id][t].created_at)&&String(i[e._id][r].created_at)&&parseInt(i[e._id][t].created_at)<parseInt(i[e._id][r].created_at)?1:0}))),h=e&&e._id&&t&&t.length>0&&i[e._id]&&i[e._id][t[0]]&&i[e._id][t[0]].created_at?Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e._id]),{},{type:"group",_lastMessage:i[e._id][t[0]]}))):Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e._id]),{},{type:"group"})))}));var g=Object.keys(h).filter((function(t){return(!c.a.getState().db.cards[t]||c.a.getState().db.cards[t]&&!c.a.getState().db.cards[t].deleted)&&(!e.find||""===e.find||e.find&&(h[t].name.toLowerCase().indexOf(e.find.toLowerCase())>-1||h[t]._parent&&c.a.getState().db.users[h[t]._parent]&&c.a.getState().db.users[h[t]._parent].name&&c.a.getState().db.users[h[t]._parent].name.toLowerCase().indexOf(e.find.toLowerCase())>-1))&&(s||!s&&h[t]&&h[t]._lastMessage)&&(!e.onLine||e.onLine&&l.users&&l.users[t])})).sort((function(e,t){var r=h[e]._lastMessage&&String(h[e]._lastMessage.created_at)?Math.ceil(h[e]._lastMessage.created_at):0,n=h[t]._lastMessage&&String(h[t]._lastMessage.created_at)?Math.ceil(h[t]._lastMessage.created_at):0;return s?h[e].name.toLowerCase()<h[t].name.toLowerCase()?-1:h[e].name.toLowerCase()>h[t].name.toLowerCase()?1:0:r>n?-1:r<n?1:0})).map((function(e,t){var r=h[e],n=0;return i[r._id]&&(n+=Object.keys(i[r._id]).filter((function(e){return i[r._id]&&i[r._id][e]&&!i[r._id][e].deleted&&i[r._id][e].user&&i[r._id][e].user._id&&o&&o._id&&i[r._id][e].user._id!==o._id&&"comment"===i[r._id][e].type&&(!i[r._id][e].readedBy||!i[r._id][e].readedBy[o._id])})).length),i[o._id]&&(n+=Object.keys(i[o._id]).filter((function(e){return i[o._id]&&i[o._id][e]&&!i[o._id][e].deleted&&i[o._id][e].user&&i[o._id][e].user._id===r._id&&"comment"===i[o._id][e].type&&(!i[o._id][e].readedBy||!i[o._id][e].readedBy[o._id])})).length),{_id:e,name:r.name,image:r.image||null,countMessages:n,lastMessage:r.lastMessage||null,deleted:r.deleted||!1,_parent:r._parent||null}})),b=function(r){var o=r.index,i=r.style,c=g[o];return a.a.createElement("div",{style:i},a.a.createElement("div",{className:n&&n.nodeId===c._id?s?t.userActiveExtended:t.userActive:s?t.userExtended:t.user,style:Object(d.a)({height:55,display:"flex",justifyContent:"center",alignItems:"center",margin:"auto",cursor:"pointer"},n&&n.nodeId===c._id?{backgroundColor:"rgba(250,250,250,0.1)"}:{}),onClick:function(){e.openChat(c._id)}},a.a.createElement(Tl.a,{title:a.a.createElement(a.a.Fragment,null,c.name?c.name:c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"",!c.name&&c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"")},a.a.createElement("div",{style:{width:"100%"}},s?a.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"left",alignItems:"center",marginTop:"10px"}},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:c.countMessages,color:"secondary",style:{width:"37px",display:"flex",alignItems:"center"}},a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement(Se.a,{alt:c.displayName?c.displayName:c.name,src:"".concat(c.image),style:{width:"29px",height:"29px",marginTop:"-10px"}}),c._parent&&e.store.users[c._parent]&&e.store.users[c._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[c._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null)))),a.a.createElement("div",{style:{fontSize:"14px",maxWidth:"calc(100% - 30px)",paddingLeft:"7px",color:"gray",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},c.name?c.name:c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"",!c.name&&c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"",c._parent&&e.store.users[c._parent]?a.a.createElement("div",{style:{fontSize:10,color:"lightgray",marginTop:"-7px"}},e.store.users[c._parent].name):a.a.createElement(a.a.Fragment,null))):a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:c.countMessages,color:"secondary",style:{display:"flex",alignItems:"center",padding:0,width:"80%",marginTop:"16px"}},a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:Object(d.a)(Object(d.a)({width:33,height:33,marginTop:"-10px"},c.deleted?{border:"solid 2px red"}:{}),{},{borderRadius:"50%",backgroundColor:c.image?"none":"lightgray",backgroundImage:'url("'.concat(c.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",display:"flex",justifyContent:"center",alignItems:"center"})},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontWeight:"bold",letterSpacing:"-2px !important"}},c.image?"":"".concat(c.name.substr(0,1).toUpperCase()).concat(c.name.split(" ").length>1?" ".concat(c.name.split(" ")[1].substr(0,1).toUpperCase()):""))),c._parent&&e.store.users[c._parent]&&e.store.users[c._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[c._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null))))))))};return a.a.createElement(ha.a,{style:{width:"100%",height:"100%"}},(function(e){var t=e.height;e.width;return a.a.createElement(fa.a,{height:t,itemCount:g.length,itemSize:55,width:s?295:58,itemData:g,style:{height:"100%"}},b)}))}))),df=function(e){return Object(d.a)(Object(d.a)({},W.l),{},{menu:{position:"absolute",borderRight:Object(S.d)("color"),background:Object(S.d)("ColumnTitleColor"),top:0,left:0,right:0,bottom:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"absolute",borderRight:Object(S.d)("color"),top:0,left:0,right:0,bottom:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"baseline",paddingLeft:"15px",paddingRight:"15px",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)"},button:{padding:"7px 0px",display:"flex",justifyContent:"center"},buttonColor:{padding:"12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color"),alignItems:"center",width:"-webkit-fill-available"},buttonColorExpanded:{position:"relative",float:"left",padding:"12px",display:"flex",backgroundColor:Object(S.d)("color"),alignItems:"center",width:"100%"},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function pf(){pf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ff=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.chat,n=(t.session,a.a.useState("chats")),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(e.usersStatus),u=Object(h.a)(s,2),f=(u[0],u[1],a.a.useState("")),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=Object(z.a)(df)(),w=window.location.hash.split("/");w[0]=w[0].replace("#",""),a.a.useEffect((function(){l("chats"),_(e.expanded)}),[e.expanded]),Object(S.j)();var j=function(){var t=Object(p.a)(pf().mark((function t(n,a){var o;return pf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=c.a.getState().db.cards[n]?"cards":"users",b(""),c.a.getState().db[o]&&c.a.getState().db[o][n]&&!c.a.getState().db[o][n]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{db:a,nodeId:n,loading:"users"!==a})):e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{db:a,nodeId:n,loading:!1})),e.subMenuExpanded(!1),l("chats");case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:x?O.menuExpanded:O.menu,style:{paddingTop:5}},x&&("internalGroups"===i||"externalGroups"===i)&&a.a.createElement("div",{className:x?O.buttonColorExpanded:O.buttonColor,style:{marginTop:"-15px"}},a.a.createElement(Ee,{text:x?Object(S.r)("$__newGroup","*"):null,title:x?null:Object(S.r)("$__newGroup","*"),icon:"add_box",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))}})),a.a.createElement("div",{className:O.button,style:{display:"flex",height:"46px",marginBottom:"7px",width:"100%"}},x?a.a.createElement("div",{className:O.textField,style:{width:"100%"}},a.a.createElement(tt,{className:O.noLabelLight,label:Object(S.r)("$__search","*"),variant:"standard",autoFocus:!0,value:g,InputProps:{endAdornment:a.a.createElement(lt.a,{position:"start"},a.a.createElement(ae.a,{color:Object(S.d)("colorText")},"search")),onChange:function(e){b(e.target.value)}}})):a.a.createElement(Ee,{title:x?null:Object(S.r)("$__search","*"),icon:"search",iconColor:Object(S.d)("colorText"),textColor:Object(S.d)("colorText"),onClick:function(){e.subMenuExpanded(!0)}})),a.a.createElement("div",{style:{position:"absolute",top:x?50:40,bottom:7,overflowY:"auto",overflowX:"hidden",left:x?7:0,paddingLeft:x?5:0,right:0,paddingTop:7}},a.a.createElement(uf,{expanded:x,openChat:function(e){return j(e,"cards")},find:g,onLine:e.onLine}))))}));var hf=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1];return a.a.useEffect((function(){i(e.typing)}),[e.typing]),o&&e.nodeId&&e.nodeId!==t._id&&o.me&&o.me[e.nodeId]?a.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal"}},Object(S.r)("$__typing"),"..."):e.nodeId&&o&&o[e.nodeId]&&Object.keys(o[e.nodeId]).filter((function(r){return t&&t._id&&r!==t._id&&o[e.nodeId][r]})).length>0?a.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal",display:"flex",alignItems:"center"}},Object.keys(o[e.nodeId]).filter((function(r){return r!==t._id&&o[e.nodeId][r]})).map((function(t,r){var n="";if(c.a.getState().db.cards[e.nodeId]._users[t].name)n=c.a.getState().db.cards[e.nodeId]._users[t].name;else if(c.a.getState().db.cards[e.nodeId]._users[t].name){var o=c.a.getState().db.cards[e.nodeId]._users[t].name.split(" ");n="".concat(o[0]).concat(o.length>1?" ".concat(o[o.length-1]):"")}return a.a.createElement(Ge.a,{title:n,key:t},a.a.createElement(Se.a,{style:{width:22,height:22,border:"none"},alt:n,src:c.a.getState().db.cards[e.nodeId]._users[t].image||null},n.substr(0,1)))})),a.a.createElement("span",{style:{marginLeft:7}},Object(S.r)("$__typing"),"...")):a.a.createElement(a.a.Fragment,null)})),mf=function(e){return Object(d.a)(Object(d.a)({},W.l),{},{menu:{position:"relative",borderRight:Object(S.d)("color")},menuExpanded:{position:"relative",borderRight:Object(S.d)("color")},button:{position:"relative",float:"left",width:"100%",padding:"7px"},avatarGroup:{"& .MuiAvatar-root":{width:"22px !important",height:"22px !important"}},buttonColor:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px 12px",marginLeft:"-12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(S.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};var gf=Object(s.b)((function(e){return{usersStatus:e.usersStatus&&e.usersStatus?e.usersStatus:{}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState(e.usersStatus),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=s[1];return a.a.useEffect((function(){return i(e.usersStatus),function(){}}),[e.usersStatus]),a.a.createElement(a.a.Fragment,null,a.a.createElement(E.a,{id:"chat_menu",title:"".concat(Object(S.r)("$__showOnlyOnline","*")," ").concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length>0?" (".concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length,")"):""),text:"".concat(Object(S.r)("$__showOnlyOnline","*")," ").concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length>0?" (".concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length,")"):""),color:Object(S.d)("colorText"),icon:u?"toggle_on":"toggle_off",onClick:function(){d((function(e){return!e})),e.onClick&&e.onClick(!u)},size:"25px",textSize:"11px",transparent:!0}))}));var bf=Object(s.b)((function(e){return{chat:e.chat}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(mf)((function(e){var t=e.classes,r=a.a.useState(null),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],p=s[1],f=a.a.useState(!1),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=Object(S.j)();if(a.a.useEffect((function(){var t=!0;return t&&JSON.stringify(e.chat)!==JSON.stringify(o)&&i(e.chat),function(){t=!1}}),[e.chat]),!o)return a.a.createElement(a.a.Fragment,null);var w=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||!c.a.getState()||!(c.a.getState().lightBox&&c.a.getState().lightBox.open||c.a.getState().sideModule&&c.a.getState().sideModule.id)){var r=document.getElementsByClassName("Toastify__toast").length,n=document.getElementsByClassName("forwardMessage").length;console.log(n),0===r&&0===n&&e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},o),{},{open:!1}))}};if(o&&!o.open)return a.a.createElement(a.a.Fragment,null);var j=o&&o.nodeId&&c.a.getState().db.cards&&c.a.getState().db.cards[o.nodeId]?"cards":"users",k=c.a.getState().db[j][o.nodeId]?c.a.getState().db[j][o.nodeId]:null;return a.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(250,250,250,0.7)",backdropFilter:"blur(3px)"}},a.a.createElement(Pe.a,{onClickAway:function(){w()}},a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden"})},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{position:"absolute",left:13}},a.a.createElement(E.a,{id:"chat_menu",title:Object(S.r)("$__menu","*"),color:Object(S.d)("colorText"),icon:"menu",onClick:function(){p((function(e){return!e})),u&&_(!1)},size:"25px",transparent:!0})),u?a.a.createElement("div",{style:{position:"absolute",left:45,color:Object(S.d)("colorText")}},a.a.createElement(E.a,{id:"addGroup",title:Object(S.r)("$__createChatGroup","*"),icon:"add_circle_outline",onClick:function(){w(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))},size:"25px",transparent:!0,color:Object(S.d)("colorText")})):a.a.createElement(a.a.Fragment,null),u?a.a.createElement("div",{style:{position:"absolute",left:80}},a.a.createElement(gf,{onClick:function(e){_(e)}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"absolute",left:u?320:53,right:80,color:Object(S.d)("colorText"),fontSize:"12px",fontWeight:"bold"}},o&&o.nodeId&&k?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(zn,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:o.nodeId},a.a.createElement(Se.a,{alt:k.displayName?k.displayName:k.name,src:k.image?"".concat(k.image):null,style:{width:"30px",height:"30px"}})),a.a.createElement("div",{style:{fontSize:"14px"}},k.name," ",a.a.createElement("span",{style:{fontSize:10,fontWeight:"normal"}},c.a.getState().usersStatus&&c.a.getState().usersStatus.users&&c.a.getState().usersStatus.users[o.nodeId]&&"away"===c.a.getState().usersStatus.users[o.nodeId].status&&c.a.getState().usersStatus.users[o.nodeId].updatedAt?"(".concat(Object(S.r)("$__lastSeeTime"),": ").concat(Object(S.k)(c.a.getState().usersStatus.users[o.nodeId].updatedAt),")"):"")),o&&o.nodeId&&c.a.getState().db.cards[o.nodeId]&&"chatGroup"===c.a.getState().db.cards[o.nodeId].type&&c.a.getState().db.cards[o.nodeId]._users&&Object.keys(c.a.getState().db.cards[o.nodeId]._users).length>0&&a.a.createElement("div",{classes:t.avatarGroup,style:{marginLeft:15}},a.a.createElement(ct.a,{max:150},Object.keys(c.a.getState().db.cards[o.nodeId]._users).length>0&&Object.keys(c.a.getState().db.cards[o.nodeId]._users).map((function(e,t){var r="";if(c.a.getState().db.cards[o.nodeId]._users[e].name)r=c.a.getState().db.cards[o.nodeId]._users[e].name;else if(c.a.getState().db.cards[o.nodeId]._users[e].name){var n=c.a.getState().db.cards[o.nodeId]._users[e].name.split(" ");r="".concat(n[0]).concat(n.length>1?" ".concat(n[n.length-1]):"")}if(t<17)return a.a.createElement(Ge.a,{title:r,key:t},a.a.createElement(Se.a,{style:{width:22,height:22,border:"none"},alt:r,src:c.a.getState().db.cards[o.nodeId]._users[e].image||null},r.substr(0,1)));if(17===t){var i=Object.keys(c.a.getState().db.cards[o.nodeId]._users).length-17;return a.a.createElement(Ge.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(c.a.getState().db.cards[o.nodeId]._users).map((function(e,t){if(t>16&&c.a.getState().db.cards[o.nodeId]._users[e]&&c.a.getState().db.cards[o.nodeId]._users[e].name)return a.a.createElement("li",null,c.a.getState().db.cards[o.nodeId]._users[e].name)}))),key:t},a.a.createElement(Se.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(i)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}})))),a.a.createElement(hf,{nodeId:o.nodeId})):a.a.createElement("div",null,Object(S.r)("$__chats",1))),a.a.createElement("div",{style:{position:"absolute",right:5,display:"flex"}},o&&o.nodeId?a.a.createElement(a.a.Fragment,null,a.a.createElement(E.a,{id:"chat_files",title:Object(S.r)("$__files","*"),color:Object(S.d)("colorText"),icon:"folder_special",onClick:function(){b((function(e){return!e}))},size:"25px",transparent:!0})):a.a.createElement(a.a.Fragment,null),a.a.createElement(E.a,{id:"chat_settings",title:Object(S.r)(c.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),color:Object(S.d)("colorText"),icon:c.a.getState().chat.notifications?"notifications_active":"notifications_off",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},o),{},{notifications:!c.a.getState().chat.notifications}))},size:"25px",transparent:!0}),o&&o.nodeId&&c.a.getState().db.cards[o.nodeId]&&"chatGroup"===c.a.getState().db.cards[o.nodeId].type&&c.a.getState().db.cards[o.nodeId]._users&&c.a.getState().db.cards[o.nodeId]._users[c.a.getState().session._id]&&(parseInt(c.a.getState().db.cards[o.nodeId]._users[c.a.getState().session._id].access)>4||O&&O.user&&O.plan&&O.userAdmin&&O.planAdmin)&&a.a.createElement(E.a,{id:"chat_settings",title:Object(S.r)("$__preffers","*"),color:Object(S.d)("colorText"),icon:"settings",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:o.nodeId,activeModule:"cardEdit",db:"cards",data:Object(d.a)({},c.a.getState().db.cards[o.nodeId]?c.a.getState().db.cards[o.nodeId]:{})})),w(!0)},size:"25px",transparent:!0}),a.a.createElement(E.a,{id:"chat_closeButton",title:Object(S.r)("$__close","*"),color:Object(S.d)("colorText"),icon:"close",onClick:function(){w(!0),_(!1)},size:"25px",transparent:!0}))),a.a.createElement("div",{style:Object(d.a)({position:"absolute",top:40,left:0,bottom:0,backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px"},u?{width:"311px"}:{width:"60px"})},a.a.createElement(ff,{closeButton:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},o),{},{open:!1})),_(!1)},chat:!0,subMenuExpanded:function(e){p(e),_(!1)},expanded:u,onLine:x})),a.a.createElement("div",{style:{position:"absolute",left:u?312:55,top:40,right:g&&o&&o.nodeId?333:0,bottom:0,backgroundColor:"white"}},o&&o.nodeId?a.a.createElement(Ea,{types:["comment"],nodeId:o.nodeId,db:c.a.getState().db.cards[o.nodeId]?"cards":"users",confirmRead:!0,loading:!!o.loading,hideCards:!0,chat:!0}):a.a.createElement(a.a.Fragment,null)),g&&o&&o.nodeId?a.a.createElement("div",{style:{position:"absolute",top:40,right:0,bottom:0,width:"333px",backgroundColor:"#f1f3f4",zIndex:100,boxShadow:"-4px 0px 7px 3px rgba(0,0,0,0.1)"}},a.a.createElement(mi,{nodeId:o.nodeId,dark:!1})):a.a.createElement(a.a.Fragment,null)))))}))),vf=function(e){var t,r;return{root:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"100vh",zIndex:100},rootHide:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"50px",display:"flex",alignItems:"center",zIndex:100},topLogo:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"50px",display:"flex",alignItems:"center",zIndex:100,justifyContent:"space-between"},bar:{backgroundColor:Object(S.d)("menu"),position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:100},item:{height:"66px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={padding:"7px",color:Object(S.d)("color",.8),"&:hover":{color:Object(S.d)("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"7px"},display:"flex",alignItems:"center"},Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:Object(S.d)("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"7px",display:"flex",alignItems:"center",cursor:"pointer"},themeExample:(r={},Object(f.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(f.a)(r,e.breakpoints.down("sm"),{left:"0 !important",right:"auto !important"}),r),module:{position:"fixed",top:"0px",left:"147px",width:"70px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px"},moduleExpanded:{position:"fixed",top:"0",left:"147px",width:"311px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",zIndex:"100 !important",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Object(S.d)("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},mainButton:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center"},logoImg:{width:111,marginLeft:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function yf(){yf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var xf=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(de.a)(vf)((function(e){var t=c.a.getState(),r=t.chat,n=t.notifications,o=e.classes,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(null),g=Object(h.a)(m,2),b=g[0],v=g[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),a.a.useEffect((function(){u||f(!0)}),[n]);var x=function(){var t=Object(p.a)(yf().mark((function t(n,a,o){var c,l=arguments;return yf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=l.length>3&&void 0!==l[3]?l[3]:"users",!n||window.location.pathname===n&&a!==b||i.a.push(n),"chat"===a?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{open:!0,db:c,nodeId:o})):(v(a),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{open:!1}))),e.menuExpand&&e.menuExpand();case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),_=Ir();return e.expanded?a.a.createElement("div",{className:o.root},a.a.createElement("div",{className:o.bar},a.a.createElement("div",{className:o.topLogo,id:"sideBar_logoMini"},a.a.createElement("img",{src:Z.a,alt:"logo",className:o.logoImg,style:{width:"111px",marginLeft:"15px"}}),a.a.createElement(E.a,{title:Object(S.r)("$__hideMenu",1),color:Object(S.d)("color"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})),a.a.createElement("div",{style:{position:"absolute",top:"120px",bottom:"0px",overflowX:"auto",width:"100%"}},a.a.createElement("div",{className:o.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/d","dashboard")}},a.a.createElement(ae.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.r)("$__dashboard","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:r.open?o.itemButtomActive:o.itemButtom,onClick:function(){e.menuExpand&&e.menuExpand(),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{open:!r.open}))}},a.a.createElement(Ae.a,{overlap:"rectangular",badgeContent:_&&_.total?_.total:0,color:"secondary"},a.a.createElement(ae.a,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),Object(S.r)("$__chat","*"))),a.a.createElement("div",{className:o.separator}),a.a.createElement("div",{className:o.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/sp","StrategyAndPlans")}},a.a.createElement(ae.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.r)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/t","myTasks")}},a.a.createElement(ae.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.r)("$__mytasks","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/library","library")}},a.a.createElement(ae.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.r)("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.r)("$__library","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_brightandconnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/bright-and-connected","bright-and-connected")}},a.a.createElement(ae.a,{icon:Hr.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):a.a.createElement("div",{className:o.rootHide},a.a.createElement("div",{className:o.mainButton,id:"sideBar_logoMini"},a.a.createElement("img",{src:Z.a,alt:"logo",className:o.logoImg,style:{width:"111px",marginLeft:"15px"},onClick:function(){e.menuExpand()}}),a.a.createElement(E.a,{title:Object(S.r)("$__showMenu",1),color:Object(S.d)("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))})));var _f=Object(s.b)((function(e){return{card:e.card}}),(function(e){return Object(I.b)(C,e)}))((function(e){return console.log("AQUI PRECISA SER CRIADO O PAINEL DE MODELOS DE FLUXOS"),a.a.createElement(Yt.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:!!e.card.action},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(at,{title:Object(S.r)("$__".concat(e.card.action),1),icon:"label",onCancel:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)}))}})))}));r(708);function Of(){Of=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var wf=Object(s.b)((function(e){return{board:e.controls.board}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session;a.a.useEffect((function(){o()}),[e.board]);var o=function(){var t=Object(p.a)(Of().mark((function t(){return Of().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(Ke.b)(e,{cardLoad:"childrens",idRel:e.board});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(!e.board)return a.a.createElement(a.a.Fragment,null);var i=window.location.hash.split("/");i[0]=i[0].replace("#","");var l=r.cards[e.board],s=l._parent?r.cards[l._parent]:null,u=s&&s._parent!==i[0]&&r.cards[s._parent]&&r.cards[s._parent]._users&&r.cards[s._parent]._users[n._id]?r.cards[s._parent]:null;return a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backdropFilter:"blur(3px)"}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 100px)",height:"83vh",backgroundColor:"#FFFFFF",margin:"auto",boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("color"),display:"flex",justifyContent:"flex-start",alignItems:"center"}},u&&u._id&&a.a.createElement("div",{style:{marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center"}},a.a.createElement(at,{title:"".concat((null===u||void 0===u?void 0:u.name)||Object(S.r)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===u||void 0===u?void 0:u.icon)||u.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===u.type}))[0]&&r.dataType.filter((function(e){return e.name===u.type}))[0].icon||"$__topic",iconTitle:"$__".concat(u.type),color:Object(S.d)("textColor"),backClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:u._id}))}}),a.a.createElement("div",{style:{marginTop:-5}},a.a.createElement(ae.a,{icon:"navigate_next",color:Object(S.d)("textColor")}))),a.a.createElement("div",null,a.a.createElement(at,{title:"".concat((null===l||void 0===l?void 0:l.name)||Object(S.r)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===l||void 0===l?void 0:l.icon)||l.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===l.type}))[0]&&r.dataType.filter((function(e){return e.name===l.type}))[0].icon||"$__topic",iconTitle:"$__".concat(l.type),color:Object(S.d)("textColor")}))),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(E.a,{id:"close_kanban",title:Object(S.r)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px",height:"calc(100% - 50px)"}},a.a.createElement($,null,a.a.createElement(Tu,{nodeId:e.board}))))))}));function jf(){jf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ef=Object(s.b)((function(e){return{toCopyMove:e.controls.toCopyMove}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=(l[1],a.a.useState((null===n||void 0===n?void 0:n.name)||"")),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=(y[1],a.a.useState({})),O=Object(h.a)(_,2),w=O[0],j=O[1],k=a.a.useState(!1),L=Object(h.a)(k,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(h.a)(T,2),N=F[0],D=F[1];if(a.a.useEffect((function(){return e.toCopyMove&&c.a.getState().db.cards[e.toCopyMove]?(o(c.a.getState().db.cards[e.toCopyMove]),b("".concat(c.a.getState().db.cards[e.toCopyMove].name," (").concat(Object(S.r)("$__copy","*"),")")||!1)):(o({}),b("")),function(){o({}),b("")}}),[e.toCopyMove]),"{}"===JSON.stringify(n)||!n)return a.a.createElement(a.a.Fragment,null);var A=function(){var t=Object(p.a)(jf().mark((function t(){var r,a;return jf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return D(!0),r={},Object.keys(n).map((function(e){-1===e.indexOf("_")&&"created_at"!==e&&"updated_at"!==e&&(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,n[e])))})),r=Object(d.a)(Object(d.a)(Object(d.a)({},r),{},{idRel:w&&w._id?w._id:n._parent?n._parent:null,name:g},x?{isModel:!0}:{}),{},{status:"notStarted"}),t.prev=4,t.next=7,Object(st.G)(e,!0,r,r.idRel);case 7:if(!(a=t.sent)||!a._id){t.next=13;break}return t.next=11,Object(st.j)(e,n._id,a._id);case 11:t.sent&&(I(!1),D(!1),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null})));case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(4),console.log("ERROR",t.t0);case 18:case"end":return t.stop()}}),t,null,[[4,15]])})));return function(){return t.apply(this,arguments)}}(),P=["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal"];return a.a.createElement(xu.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement(Pe.a,{onClickAway:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",margin:"auto",boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)"}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("color")}},Object(S.r)("$__duplicate")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(E.a,{id:"close_duplicate",title:Object(S.r)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},C?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(ni,{onSelect:function(e){j(e)},ignoreTypes:["chatGroup"]})):a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(S.r)("$__selectTarget",1),text:Object(S.r)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){I(!0)},size:"14px",textSize:"14px"})),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},s?a.a.createElement(a.a.Fragment,null,w&&w.type&&P.indexOf(w.type)>-1&&(w.type.indexOf(n.type)>-1||n.type.indexOf(w.type)>-1)?a.a.createElement("div",{style:{color:"red",fontSize:12,marginBottom:15,textTransform:"uppercase",textAlign:"center"}},Object(S.r)("$__youAreMove"),": ",Object(S.r)("$__".concat(w.type))," ",Object(S.r)("$__for"),": ",Object(S.r)("$__".concat(w.type)),".",Object(S.r)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,w&&w.type&&P.indexOf(w.type)>-1&&(w.type.indexOf(n.type)>-1||n.type.indexOf(w.type)>-1)?a.a.createElement("div",{style:{color:"red",fontSize:12,marginBottom:15,textTransform:"uppercase",textAlign:"center"}},Object(S.r)("$__youAreDuplicating"),": ",Object(S.r)("$__".concat(w.type))," ",Object(S.r)("$__for"),": ",Object(S.r)("$__".concat(w.type)),".",Object(S.r)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null),a.a.createElement(tt,{label:Object(S.r)("$__copyAs",1),variant:Object(S.d)("fieldVariant"),name:"copyAs",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"clear",onClick:function(){b(n.name)}})),onChange:function(e){b(e.target.value)}},value:g,placeholder:Object(S.r)("$__copyAs_placeholder",1)})),N?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(Or,null)):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(E.a,{title:Object(S.r)("$__cancel",1),text:Object(S.r)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))},size:"12px",textSize:"12px"}),a.a.createElement(E.a,{title:Object(S.r)("$__duplicateAllLinkedItems",1),text:Object(S.r)("$__duplicateAllLinkedItems",1),color:Object(S.d)("menu"),icon:"dynamic_feed",onClick:function(){A(!0)},size:"12px",textSize:"12px",transparent:!0}))))))))}));function Sf(){Sf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var kf=Object(s.b)((function(e){return{addCard:e.controls.addCard}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=[],r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=(s[1],a.a.useState(!1)),g=Object(h.a)(m,2),b=g[0],v=(g[1],a.a.useState(!1)),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState(!1),j=Object(h.a)(w,2),k=j[0],L=j[1];if(a.a.useEffect((function(){return"{}"!==JSON.stringify(e.addCard)&&e.addCard._parent&&c.a.getState().db.cards[e.addCard._parent]?i(c.a.getState().db.cards[e.addCard._parent]):(i({}),L(!1),O(!1)),function(){i({}),L(!1),O(!1)}}),[e.addCard]),o.automationUsers&&"doNotChange"!==o.automationUsers&&"remove"!==o.automationUsers&&o._users&&Object.keys(o._users).length>0){var C=c.a.getState().db.users[c.a.getState().session._id]||{},I=Object(d.a)(Object(d.a)({},"add"===o.automationUsers?Object(f.a)({},C._id,{_id:C._id,name:C.name,image:C.image||null}):{}),o._users);Object.keys(I).sort((function(e,t){return I[e].isResponsible?-1:1})).map((function(e,r){-1===t.indexOf(e)&&t.push(e)}))}var T=a.a.useState(t.length>0?t:[c.a.getState().session._id]),F=Object(h.a)(T,2),N=F[0],D=F[1],A=a.a.createRef(),P=a.a.createRef(),$=a.a.createRef(),z=a.a.createRef({}),M=function(){var t=Object(p.a)(Sf().mark((function t(r){var n,a,i,l,s,u,p;return Sf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L(!0),z&&(!z.current||z.current&&!z.current.loading)&&(z.current=Object(d.a)(Object(d.a)({},z.current),{},{loading:!0}),u=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({name:A.current.value,_parent:o._id,myDay:!!(e.myDay||(null===(n=e.initialData)||void 0===n?void 0:n.myDay)||(null===(a=e.addCard)||void 0===a?void 0:a.myDay)),type:(null===(i=e.addCard)||void 0===i||null===(l=i.initialData)||void 0===l?void 0:l.type)||e.type||"task",status:e.status?e.status:"notStarted",users:N},r?{checklist:!0}:{}),P&&P.current&&P.current.value?{description:P.current.value}:{}),$&&$.current&&$.current.getValue()?{value:$.current.getValue()}:{}),e.initialData?e.initialData:{}),o.childrenAutoTag&&o._tags&&o._tags.length>0?{_tags:o._tags}:{}),o&&o.automationDueDateType&&"add"===o.automationDueDateType&&(u=Object(d.a)(Object(d.a)({},u),{},{startDate:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X"),endDate:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add((null===o||void 0===o?void 0:o.automationDueDate)||1,"days").unix("X")})),o&&o.automationStatusType&&"replace"===o.automationStatusType&&(u=Object(d.a)(Object(d.a)({},u),{},{status:o.automationStatus||"notStarted"},o.automationStatus&&"completed"===o.automationStatus?{completed_at:_()().unix("x")}:{})),(p=ps(u,(null===(s=e.addCard)||void 0===s?void 0:s.rows)||0,e))&&(e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),p)})),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}})))),z.current=Object(d.a)(Object(d.a)({},z.current),{},{loading:!1});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return!e.addCard||"{}"!==JSON.stringify(e.addCard)&&0!==Object.keys(e.addCard).length?a.a.createElement(xu.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",margin:"auto",boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)"}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("color")}},o.shortCutTitle?o.shortCutTitle:Object(S.r)("$__new")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5,display:"flex",alignItems:"center"}},a.a.createElement(E.a,{id:"assistant_navigation",title:Object(S.r)("$__selectTarget","*"),color:Object(S.d)("color"),icon:"assistant_navigation",onClick:function(){O((function(e){return!e}))},size:"20px",transparent:!0}),a.a.createElement(E.a,{id:"close_addCard",title:Object(S.r)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},x?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(ni,{onSelect:function(e){i(c.a.getState().db.cards[e._id])},ignoreTypes:["chatGroup"]})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},a.a.createElement("div",null,a.a.createElement("div",{style:{width:"calc(100% - 50px)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3}},o.shortCutTitle?o.shortCutTitle:e.placeHolder?e.placeHolder:Object(S.r)(e.checklist&&!e.myDay?"$__newSimpleTask":"$__newSubActivity")),e.explain?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3,color:Object(S.d)("menu")}},e.explain):a.a.createElement(a.a.Fragment,null),a.a.createElement(us.a,{ref:A,style:{width:"100%",padding:7,border:"none",borderBottom:"solid 1px ".concat(Object(S.d)("color")),background:"none",resize:"none",fontFamily:"inherit",fontSize:14},onKeyDown:function(t){var r,n,a=t.which||t.keyCode;return 13!==a||t.shiftKey?13===a&&t.shiftKey&&A.current&&A.current.value&&0===A.current.value.trim().length?(t.preventDefault(),void(A.current.value="")):void(27===a&&e.onCancel&&e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))):(t.preventDefault(),void(A.current&&A.current.value&&A.current.value.trim().length>0&&M(!((!e.checklist&&!(null===(r=e.addCard)||void 0===r?void 0:r.checklist)||e.myDay)&&!(null===(n=e.initialData)||void 0===n?void 0:n.checklist)))))},autoFocus:!0}),(o.requireDescription||b)&&a.a.createElement(tt,{inputRef:P,label:Object(S.r)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(lt.a,{position:"end"},a.a.createElement(ae.a,{icon:"description",color:"lightgray"}))},placeholder:Object(S.r)("$__description",1)}),(o.requireValue||u)&&a.a.createElement(wo,{label:Object(S.r)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:$,ref:$}),!o.showInPanel&&a.a.createElement(Ht,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,noLimit:!0,multiple:!0,onSelect:function(e){D(e)},selected:N,transparent:!0})),k?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(Or,null)):a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:33}},a.a.createElement(E.a,{id:"addModal_cancelButton",title:Object(S.r)("$__cancel",1),text:e.placeHolder||Object(S.r)("$__cancel",1),color:Object(S.d)("medium"),icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))},size:"25px"}),a.a.createElement(E.a,{id:"sideModule_saveButton",title:o.shortCutButtonToAdd?o.shortCutButtonToAdd:e.placeHolder||Object(S.r)("$__save",1),text:o.shortCutButtonToAdd?o.shortCutButtonToAdd:e.placeHolder||Object(S.r)("$__save",1),color:"green",icon:"save",onClick:function(){var t,r;!A.current.value||A.current.value&&""===A.current.value.trim()?A.current.focus():M(!((!e.checklist&&!(null===(t=e.addCard)||void 0===t?void 0:t.checklist)||e.myDay)&&!(null===(r=e.initialData)||void 0===r?void 0:r.checklist)))},size:"25px"})))))))):a.a.createElement(a.a.Fragment,null)}));function Lf(){Lf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(184).config();var Cf,If=function(){var e=Object(p.a)(Lf().mark((function e(t,r){var n,a,o;return Lf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState(),a=n.db,o="cards",a.cards[r._id]?o="cards":a.users[r._id]&&(o="users"),c.a.getState().db&&c.a.getState().db[o]&&c.a.getState().db[o][r._id]&&t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},Object(f.a)({},o,Object(d.a)(Object(d.a)({},c.a.getState().db[o]),{},Object(f.a)({},r._id,Object(d.a)(Object(d.a)({},c.a.getState().db[o][r._id]),r))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Tf=r(1042),Ff=function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,backgroundColor:"rgba(0,0,0,0.66) !important"},wrapper:{position:"absolute",top:"70px",left:"0",right:"0",bottom:"0",height:"calc(100vh - 60px)"},mainPanel:{overflow:"auto",position:"absolute",top:"0",left:"0",right:"0",bottom:"0",maxHeight:"calc(100vh - 72px)",padding:15},content:{marginTop:"0px",padding:"15px"},container:Object(d.a)(Object(d.a)({},W.f),{},{height:"-webkit-fill-available",overflowY:"auto"}),map:{marginTop:"0px"},mainPanelSidebarMini:Object(f.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},Nf=function(e){return{wrapper:{height:"auto",minHeight:"100vh",position:"relative",top:"0"},fullPage:{padding:"120px 0",position:"relative",minHeight:"100vh",display:"flex!important",margin:"0",border:"0",color:W.O,alignItems:"center",backgroundSize:"cover",backgroundPosition:"center center",height:"100%","& footer":{position:"absolute",bottom:"0",width:"100%",border:"none !important"},"&:before":{backgroundColor:"rgba("+Object(W.r)(W.b)+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}},Df=(r(1715),r(1038));function Af(){Af=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Pf=new Audio(r.n(Df).a);r(184).config();var $f="true"===String("true")?"https://ws.machen.ai":"http://localhost:3001";var zf=Object(w.default)(O.a)(Cf||(Cf=Object(u.a)(["\n&&&.Toastify__toast-container {\n min-width:407px !important;\n z-index:33333;\n}\n.Toastify__toast {\n z - index:33333;\n }\n.Toastify__toast-body {\n z - index:33333;\n }\n.Toastify__progress-bar { }\n"]))),Mf=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=Object.assign({},(Object(m.a)(e),e)),n=c.a.getState(),o=n.session,s=n.chat,u=a.a.useState({}),g=Object(h.a)(u,2),v=g[0],x=g[1],O=a.a.useState(!1),w=Object(h.a)(O,2),E=w[0],k=w[1],C=a.a.useState(!1),I=Object(h.a)(C,2),T=I[0],N=I[1],D=a.a.useState(!0),A=Object(h.a)(D,2),P=A[0],B=A[1],Y=a.a.useState(!1),R=Object(h.a)(Y,2),G=R[0],H=(R[1],a.a.useState(!1)),W=Object(h.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!0),X=Object(h.a)(q,2),K=X[0],J=X[1],Z=a.a.useState(!1),Q=Object(h.a)(Z,2),te=Q[0],re=Q[1],oe=a.a.useState(null),ie=Object(h.a)(oe,2),ce=ie[0],le=ie[1],se=Object(z.a)(E?Ff:Nf),ue=a.a.useRef({}),de=(a.a.useRef({}),se()),pe=a.a.createRef(),fe=de.mainPanel+" "+y()((t={},Object(f.a)(t,de.mainPanelSidebarMini,!0),Object(f.a)(t,de.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),he=a.a.createRef(),me=a.a.createRef();a.a.useEffect((function(){me.current={offline:!1};var t=function(){var t=Object(p.a)(Af().mark((function t(r){var n;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dt.a.post("/WhiteLabel",{url:r});case 2:(n=t.sent)&&((null===n||void 0===n?void 0:n.data)&&(x(n.data),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},o),{},{custom:Object(d.a)(Object(d.a)({},o.custom),n.data)}))),xe());case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=(localStorage.getItem("TOKEN"),window.location.hostname);(r=r.replace(".machen.ai",""))&&-1===r.indexOf("software")&&-1===r.indexOf("hom2022")&&-1===r.indexOf("localhost")?t(r):xe(),le(Ie(Fp))}),[]),a.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)})),Ee(t)})),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),E&&(Ee(e),je(),ge(!0),le(Ie(Fp)))}),[E]);var ge=function(){var e=Object(p.a)(Af().mark((function e(t){var r,n,a,o;return Af().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:me.current={offline:!1},window.addEventListener("dragover",(function(e){e.preventDefault()}),!1),window.addEventListener("drop",(function(e){e.preventDefault()}),!1),0,n=setInterval((function(){1}),1e3),a=setTimeout((function(){}),5e4),o=setInterval((function(){xe(!0)}),36e4),window.addEventListener("blur",(function(){clearInterval(n),clearInterval(o),n=0,r=_()().tz("America/Sao_Paulo").unix("X"),a=setTimeout((function(){ye("away")}),6e4)})),window.addEventListener("focus",function(){var e=Object(p.a)(Af().mark((function e(t){var i;return Af().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(null===me||void 0===me||null===(i=me.current)||void 0===i?void 0:i.offline)||(xe(!0),clearInterval(o),o=setInterval((function(){xe(!0)}),36e4),clearTimeout(a),n||(n=setInterval((function(){1}),1e3)),ye("online"),r&&_()().tz("America/Sao_Paulo").unix("X")-r>30&&ve());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},ye=function(){var e=Object(p.a)(Af().mark((function e(t){return Af().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:("online"===t&&c.a.getState().usersStatus.users&&c.a.getState().usersStatus.users[o._id]&&"online"!==c.a.getState().usersStatus.users[o._id].status||"away"===t&&c.a.getState().usersStatus.users&&c.a.getState().usersStatus.users[o._id]&&"away"!==c.a.getState().usersStatus.users[o._id].status)&&c.a.getState().functions.socket.emit("socketStatus",{socketStatus:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),xe=function(){var t=Object(p.a)(Af().mark((function t(r){var n,a,l,s,u,p,h,m,g,b,y,x,_,O,w,j,S,L,C,I,T,F,N,D,A,$=arguments;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=$.length>1&&void 0!==$[1]?$[1]:0,!me.current||me.current.offline){t.next=75;break}if(r){t.next=50;break}return t.prev=3,t.next=6,dt.a.post("/VerifySession");case 6:return a=t.sent,l=a&&a.data&&a.data.user&&a.data.user.language?{locale:a.data.user.language}:{all:!0},"#tab/languages"===window.location.hash&&(l={all:!0}),t.next=11,dt.a.post("/M_Languages_V3",l);case 11:if(!(s=t.sent)){t.next=42;break}return t.next=15,new Promise((function(e,t){var r={};s.data.map((function(t,n){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.alias.name.toLowerCase(),{alias:t.alias.name.toLowerCase(),locales:t.locales})),n+1===s.data.length&&e(r)}))}));case 15:if(u=t.sent,!(a&&a.data&&a.data.token)){t.next=40;break}if(localStorage.setItem("TOKEN",a.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},a.data.user),(null===a||void 0===a||null===(p=a.data)||void 0===p||null===(h=p.user)||void 0===h||null===(m=h.GlobalData)||void 0===m?void 0:m.custom)?{custom:Object(d.a)(Object(d.a)(Object(d.a)({},o.custom),JSON.parse(null===a||void 0===a||null===(g=a.data)||void 0===g||null===(b=g.user)||void 0===b||null===(y=b.GlobalData)||void 0===y?void 0:y.custom)),{},{custom:null===a||void 0===a||null===(x=a.data)||void 0===x||null===(_=x.user)||void 0===_||null===(O=_.GlobalData)||void 0===O?void 0:O.custom},v)}:{})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)({},a.data.users?a.data.users:{})})),!u||!a){t.next=36;break}if(e.reduxFunction("ASYNC","SET_LANGUAGE",Object(d.a)({},u)),(!E||E&&JSON.stringify(E)!==JSON.stringify(a.data.user))&&JSON.stringify(E)!=JSON.stringify(a.data.user)&&k(Object(d.a)({},a.data.user)),"Notification"in window){t.next=27;break}console.log("Esse browser n\xe3o suporta notifica\xe7\xf5es desktop"),t.next=30;break;case 27:if("denied"===Notification.permission){t.next=30;break}return t.next=30,Notification.requestPermission();case 30:return"/"!==window.location.pathname&&0!==Fp.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||i.a.push("/d#tab/resume"),Le(),Oe(),t.abrupt("return",!0);case 36:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(d.a)({},u)),k(!1);case 38:t.next=42;break;case 40:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(d.a)({},u)),P&&B(!1);case 42:t.next=48;break;case 44:t.prev=44,t.t0=t.catch(3),console.log(t.t0),5===n?(V(!0),E&&k(!1),P&&B(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):xe(r,n+1);case 48:t.next=73;break;case 50:return t.prev=50,t.next=53,dt.a.post("/VerifySession",{ignoreUsers:!0});case 53:if(w=t.sent,j=c.a.getState().session,!(w&&w.data&&w.data.token)){t.next=65;break}if(localStorage.setItem("TOKEN",w.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},w.data.user),(null===w||void 0===w||null===(S=w.data)||void 0===S||null===(L=S.user)||void 0===L||null===(C=L.GlobalData)||void 0===C?void 0:C.custom)?{custom:Object(d.a)(Object(d.a)(Object(d.a)({},o.custom),JSON.parse(null===w||void 0===w||null===(I=w.data)||void 0===I||null===(T=I.user)||void 0===T||null===(F=T.GlobalData)||void 0===F?void 0:F.custom)),{},{custom:null===w||void 0===w||null===(N=w.data)||void 0===N||null===(D=N.user)||void 0===D||null===(A=D.GlobalData)||void 0===A?void 0:A.custom},v)}:{})),c.a.getState().functions.socket.emit("socketStatus",{socketStatus:"online"}),!(w.data&&j&&j._id&&w.data.user&&j._id!==w.data.user._id)){t.next=63;break}return window.location.reload(),t.abrupt("return");case 63:t.next=68;break;case 65:localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300);case 68:t.next=73;break;case 70:t.prev=70,t.t1=t.catch(50),n>5?(localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300)):setTimeout((function(){xe(r,n+1)}),3e3);case 73:t.next=76;break;case 75:console.log("OFFLINE");case 76:case"end":return t.stop()}}),t,null,[[3,44],[50,70]])})));return function(e){return t.apply(this,arguments)}}(),Oe=function(){var t=Object(p.a)(Af().mark((function t(){var r,n;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return we(),t.prev=1,t.next=4,dt.a.get("/Tags_List");case 4:(r=t.sent)&&r.data&&(r.data.map((function(e){e._count=parseInt(e._count),e._countOthers=parseInt(e._countOthers)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{tag:r.data?r.data:[]}))),t.next=13;break;case 8:t.prev=8,t.t0=t.catch(1),console.group("Layout-ReqTags::ERR::"),console.log(t.t0),console.groupEnd();case 13:return t.prev=13,t.next=16,dt.a.get("/M_User_Group_List");case 16:(n=t.sent)&&n.data&&e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{userGroup:n.data?n.data:[]})),t.next=25;break;case 20:t.prev=20,t.t1=t.catch(13),console.group("Layout-ReqGrpups::ERR::"),console.log(t.t1),console.groupEnd();case 25:case"end":return t.stop()}}),t,null,[[1,8],[13,20]])})));return function(){return t.apply(this,arguments)}}(),we=function(){var t=Object(p.a)(Af().mark((function t(r){var n,a;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,dt.a.post("/M_User_List_V3",{id:r});case 3:if(!(n=t.sent)||!n.data){t.next=9;break}return a={},n.data.map(function(){var e=Object(p.a)(Af().mark((function e(t,r){return Af().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},t.data._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.users&&c.a.getState().db.users[t.data._id]?c.a.getState().db.users[t.data._id]:{}),t.data),t.access?{_access:JSON.parse(t.access)}:{}),t._safety?{_safety:t._safety}:{}),t._token?{_token:{_id:t._token}}:{}),t.groups&&t.groups.filter((function(e){return e.value})).length>0?{groups:t.groups}:{}),t.tags&&t.tags.filter((function(e){return e.value})).length>0?{tags:t.tags}:{}),t._parent&&t._parent!==c.a.getState().session.account?{_parent:t._parent}:{})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().db.users),a)})),t.abrupt("return",!0);case 9:t.next=16;break;case 11:t.prev=11,t.t0=t.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(t.t0),console.groupEnd();case 16:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}(),je=function(){var t=Object(p.a)(Af().mark((function t(){return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ke.b)(e,{cardLoad:"chat"});case 2:return t.next=4,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.a.getState().session._id],db:"users",type:"comment",ini:!0,limit:1});case 4:return t.next=6,Cr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.a.getState().session._id],db:"users",type:"comment",ini:!0});case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ee=function(){var t=Object(p.a)(Af().mark((function t(r){var n=arguments;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.length>1&&void 0!==n[1]&&n[1],!(E&&"/"!==window.location.pathname&&"/login"!==window.location.pathname&&e&&e.reduxFunction)){t.next=21;break}if(!ue||!ue.current||ue.current.initialLoader){t.next=13;break}return ue.current={initialLoader:!0},console.log("XXXXXXXXXXXXXXXXXXX"),t.next=7,Object(Ke.b)(e,{cardLoad:"myDay"});case 7:return t.next=9,Object(Ke.b)(Object(d.a)({},e),{cardLoad:"plans"});case 9:return t.next=11,Object(Ke.b)(Object(d.a)({},e),{cardLoad:"chat",ignoreLoader:!0});case 11:Object(Ke.b)(Object(d.a)({},e),{cardLoad:"steps",ignoreLoader:!0}),Object(Ke.b)(Object(d.a)({},e),{cardLoad:"approval",ignoreLoader:!0});case 13:return t.next=15,Object(Ke.d)(e);case 15:if(!t.sent){t.next=19;break}return B(!1),t.abrupt("return",!0);case 19:t.next=22;break;case 21:return t.abrupt("return",!0);case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Se=function(){},ke=function(){var t=Object(p.a)(Af().mark((function t(r,n){return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},s),{},{open:!0,db:n,nodeId:r,loading:!1}));case 1:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),Le=function(){var t=Object(p.a)(Af().mark((function t(){var r;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Tf.a)($f,{transports:["websocket","polling"],query:{token:localStorage.getItem("TOKEN")}});case 2:return(r=t.sent)&&(Fe(r),e.reduxFunction("ASYNC","SET_FUNCTIONS",{socket:r})),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ce=function(){var e=Object(p.a)(Af().mark((function e(t){return Af().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"login"===t.fn?(localStorage.setItem("TOKEN",t.token),setTimeout((function(){window.open("/d#tab/resume","_self")}),1e3)):"alert"===t.fn&&Object(S.c)(Object(d.a)({},t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ie=function t(r){var n=E;return r.map((function(r,o){if(r.auth&&(!r.AppAccess||r&&r.AppAccess&&n&&n._access)){var i;i=r.component;var c=!r.access&&!r.AppAccess;if(r.access&&r.access.map((function(e){n&&n[e]&&(c=!0)})),r.AppAccess&&r.AppAccess.map((function(e){n&&n._access&&n._access[e]&&(c=!0)})),c)return r.views&&r.views.length>0&&t(r.views),a.a.createElement(l.b,{path:r.path,component:function(){return a.a.createElement(i,null)},key:o,expanded:K,subMenu:!!e.subMenu})}}))},Te=function(){var t=Object(p.a)(Af().mark((function t(r){return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),setTimeout((function(){window.open("/login","_self")}),300);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Fe=function(t){t.on("global",(function(e){"version"===e.fn&&Object(S.c)({message:Object(S.r)("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&Te(),"reload"===e.fn&&window.location.reload()})),t.on("SWOT.UPD",(function(t){Object(st.m)(Object(d.a)(Object(d.a)({},e),{},{store:c.a.getState(),_sessionId:o._id}),t)})),t.on("copy.LOAD",(function(t){console.log("copy.LOAD",t),Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:t._id})})),t.on("card.ADD",(function(t){console.log(t),t._id&&Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),t.on("card.UPD",(function(t){Object(st.l)(e,t)})),t.on("card.MYDAY",(function(t){Object(st.A)(e,t)})),t.on("card.TIMER",(function(t){Object(st.n)(e,t)})),t.on("card.UPDATE",(function(t){Object(st.o)(e,t)})),t.on("card.ACCESS_UPD",function(){var t=Object(p.a)(Af().mark((function t(r){return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(st.c)(e,r);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("card.ACCESS_DELETE",(function(t){Object(st.a)(e,t)})),t.on("card.ACCESS_REMOVE",(function(t){Object(st.b)(e,t)})),t.on("card.REORDER",(function(t){Object(st.D)(e,t)})),t.on("card.DELETE",(function(t){Object(st.p)(e,t,!0)})),t.on("card.unlinkChildrens",(function(t){Object(st.L)(e,t)})),t.on("unlinkChildrens",(function(t){Object(st.L)(e,t)})),t.on("card.changePlanId",(function(t){var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=c.a.getState().sessionLoads.cards.load,a=b()("".concat(JSON.stringify({idRel:r[0],cardLoad:"plan"}))).toString();r[0]===t.planId||Object.keys(n).length>0&&n[a]?Object(Ke.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.cardId,force:!0}):Object(st.g)(e,t)})),t.on("node.UPDATE",(function(t){If(e,t)})),t.on("column.UPD",(function(t){Object(st.Q)(e,t)})),t.on("column.DELETE",(function(t){Object(st.q)(e,t)})),t.on("column.REORDER",(function(t){Object(st.E)(e,t)})),t.on("column.CARDS",(function(t){Object(st.h)(e,t)}));var r={};t.on("timeline.TYPING",(function(e){r[e.typingUser]&&clearTimeout(r[e.typingUser]),r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e.typingUser,setTimeout((function(){}),3e3)))})),t.on("timeline.COMMENT",function(){var t=Object(p.a)(Af().mark((function t(r){var n,o,i,l,s;return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"users"===r.db&&r.idRel===c.a.getState().session._id&&r.comment&&r.comment.user&&r.comment.user._id&&!c.a.getState().db.users[r.comment.user._id]&&we(r.comment.user._id),("users"===r.db||"users"!==r.db&&c.a.getState().db.cards[r.idRel]&&"chatGroup"===c.a.getState().db.cards[r.idRel].type)&&(n=null,r.filesCount&&r.files&&r.files.length===r.filesCount&&(n=parseInt(r.comment.created_at)-30),r.comment.user._id!==c.a.getState().session._id&&ve(n)),Lr(e,r),c.a.getState().chat.notifications&&(r.idRel===c.a.getState().session._id||c.a.getState().db.users[r.idRel]||c.a.getState().db.cards[r.idRel]&&"chatGroup"===c.a.getState().db.cards[r.idRel].type)&&c.a.getState().db.users[r.comment.user._id]&&((null===r||void 0===r||null===(o=r.comment)||void 0===o||null===(i=o.user)||void 0===i?void 0:i._id)!==c.a.getState().session._id&&Pf.play(),r.comment.nodeId=r.nodeId,l=Object(d.a)(Object(d.a)({},r.comment),{},{nodeId:r.comment._parent,idRel:r.nodeId}),r._parent===c.a.getState().session._id&&((s=new Notification("".concat(r.comment.user.name," ").concat(Object(S.r)("$__sendedANewMessage",1)),{body:r.comment.message?r.comment.message:Object(S.r)("$__".concat(r.comment.type),1)})).onclick=function(e){e.preventDefault(),window.focus(),s.close()},Object(S.c)({message:Object(S.r)("$__newMessage",1),content:a.a.createElement("div",{style:{display:"flex",cursor:"pointer",backgroundColor:"#none"},onClick:function(e){ke(l.user._id,"users"),e.stopPropagation()}},a.a.createElement(ia,{storie:l,noReactions:!0,inverted:!0})),hideiconvariant:!0,variant:"info",persist:!1,horizontal:"right",confirm:null})));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("timeline.DEL",(function(t){var r=c.a.getState(),n=(r.timeline,r.session),a=c.a.getState().timeline[t.idRel]&&c.a.getState().timeline[t.idRel][t.id]?t.idRel:n._id;c.a.getState().timeline&&c.a.getState().timeline[a]&&c.a.getState().timeline[a][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),{},Object(f.a)({},a,Object(d.a)(Object(d.a)({},c.a.getState().timeline[a]),{},Object(f.a)({},t.id,Object(d.a)(Object(d.a)({},c.a.getState().timeline[a][t.id]),{},{deleted:!0},t.deletedReason?{deletedReason:t.deletedReason}:{}))))))})),t.on("user.UPD",(function(t){gt(e,t)})),t.on("user.CONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(d.a)(Object(d.a)({},c.a.getState().usersStatus.users),{},Object(f.a)({},t.user,{status:t.status,updatedAt:t.updatedAt}))})})),t.on("user.DISCONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(d.a)(Object(d.a)({},c.a.getState().usersStatus.users),{},Object(f.a)({},t.user,null))})})),t.on("users.STATUS",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",Object(d.a)(Object(d.a)({},c.a.getState().usersStatus),{},{users:Object(d.a)({},t.users)}))})),t.on("user.ACCESS",(function(t){gt(e,t)})),t.on("userGroup.UPD",(function(t){_c(e,t)})),t.on("feed.ADD",(function(t){!function(e,t){var r=Object(f.a)({},t._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.feeds&&c.a.getState().db.feeds[t._id]&&c.a.getState().db.feeds[t._id].feed?{feed:c.a.getState().db.feeds[t._id].feed}:{}),t.data),{},{_parent:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds&&c.a.getState().db.feeds[t._id]&&c.a.getState().db.feeds[t._id]._parent?c.a.getState().db.feeds[t._id]._parent:{}),{},Object(f.a)({},t._parent,Object(d.a)({},t.rel)))}));e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{feeds:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds),r)}))}(e,t)})),t.on("language.UPD",(function(t){Object(S.m)(e,t)})),t.on("tag.UPD",(function(t){_c(e,t)})),t.on("tag.DEL",(function(t){wc(e,t,!0)})),t.on("tag.UNLINK",(function(t){Sc(e,t,!0)})),t.on("logout",(function(e){e.user===c.a.getState().session._id&&Te()})),t.on("notifications.ADD",function(){var t=Object(p.a)(Af().mark((function t(r){return Af().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.a.getState().session._id===r.userId&&r.notify&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(d.a)(Object(d.a)({},c.a.getState().notifications),{},Object(f.a)({},r.notify._id,r.notify)));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("chat.STATUS",(function(t){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().db.users),{},Object(f.a)({},t.user,Object(d.a)(Object(d.a)({},c.a.getState().db.users[t.user]),{},{chatStatus:t.status})))}))})),t.on("chat.READED",(function(t){(c.a.getState().db.cards[t.id]||c.a.getState().db.users[t.id]||c.a.getState().db.users[t.readedBy])&&Sr(e,t)})),t.on("chat.INTERACT",(function(t){kr(e,t),c.a.getState().db.cards[t.id]||c.a.getState().db.users[t.id]||c.a.getState().db.users[t.readedBy]}));var n=setTimeout((function(){}),5e3);t.on("disconnect",(function(){me.current={offline:!0},n=setTimeout((function(){N(!0)}),5e3)})),t.on("connect",(function(){var e;setTimeout((function(){t.emit("data",{module:"user",method:"post",action:"logout"},{notThis:!0})}),2e3),(null===me||void 0===me||null===(e=me.current)||void 0===e?void 0:e.offline)&&(me.current={offline:!1},ve()),xe(!0),clearTimeout(n),N(!1)}))};return P||!ce?a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},a.a.createElement(_e,null)):(U&&"/offline-detect"!==window.location.pathname&&i.a.push("offline-detect"),G&&"/maintenance-mode"!==window.location.pathname&&i.a.push("maintenance-mode"),G||U||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||i.a.push("login"),a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:E&&K?"calc(198px + ".concat(te?"264px":"0px",")"):"0px",right:"0px"},onContextMenu:function(){}},E?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:de.wrapper},a.a.createElement(M.a,{xsDown:!0},K&&a.a.createElement(Mp,Object.assign({routes:Fp,handleDrawerToggle:Se,menuExpand:function(){J((function(e){return!e}))},setSubMenuExpanded:function(e){re(e)},subMenuExpanded:te},r))),a.a.createElement(M.a,{smUp:!0},a.a.createElement(xf,Object.assign({routes:Fp,handleDrawerToggle:Se,menuExpand:function(){J((function(e){return!e}))},setSubMenuExpanded:function(e){re(e)},subMenuExpanded:te,expanded:K},r))),a.a.createElement("div",{className:fe,ref:he,id:"mainPannel"},a.a.createElement("div",{className:de.container},a.a.createElement(l.d,null,ce,a.a.createElement(l.a,{from:"/",to:"/d#tab/resume"})))),a.a.createElement($,null,a.a.createElement(wf,null)),a.a.createElement($,null,a.a.createElement(gc,null))),a.a.createElement(M.a,{smDown:!0},a.a.createElement(lf,{menuExpand:function(){J((function(e){return!e}))},expanded:K})),a.a.createElement($,null,a.a.createElement(be,null)),a.a.createElement(ca,null),a.a.createElement($,null,a.a.createElement(F,null)),a.a.createElement($,null,a.a.createElement(j.a,{open:T,className:de.backdrop,style:{backdropFilter:"blur(7px) sepia(90%)"}},a.a.createElement("div",{style:{position:"absolute",left:"0px",right:"0px",top:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",fontSize:"33px",flexDirection:"column"}},a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(ae.a,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},Object(S.r)("$__noInternetConnection","*"))))),a.a.createElement("div",null),a.a.createElement($,null,a.a.createElement(bf,{expanded:K,subMenuExpanded:te})),a.a.createElement($,null,a.a.createElement(_f,null)),a.a.createElement($,null,a.a.createElement(kf,null)),a.a.createElement($,null,a.a.createElement(Ef,null)),a.a.createElement($,null,a.a.createElement(L,null))):a.a.createElement("div",null,!G&&a.a.createElement(ee,r),a.a.createElement("div",{className:de.wrapper,ref:pe},a.a.createElement("div",{className:de.fullPage,style:{backgroundImage:'url("'.concat((null===v||void 0===v?void 0:v.loginBackground)?v.loginBackground:Object(S.d)("loginBackground"),'")')}},a.a.createElement(l.d,null,function e(t){return t.map((function(t,r){return t.views?e(t.views):(n=t.component,!t.auth&&n?a.a.createElement(l.b,{path:t.path,component:function(){return a.a.createElement(n,{callback:function(e){Ce(e)}})},key:r}):void 0);var n}))}(Fp),a.a.createElement(l.a,{from:"*",to:U?"/offline-detect":G?"/maintenance-mode":"/login"})),a.a.createElement(ne,{white:!0})))),a.a.createElement($,null,a.a.createElement(zf,{pauseOnFocusLoss:!0}))))})),Bf=(r(1717),function(e){var t=e.store,r=e.history;return a.a.createElement(s.a,{store:t},a.a.createElement(l.c,{history:r},a.a.createElement(l.b,{exact:!0,patch:"/:params",component:Mf})))});r(184).config(),-1===window.location.hostname.indexOf("192.168")&&-1===window.location.hostname.indexOf("localhost")&&-1===window.location.hostname.indexOf("hom2022.machen")&&-1===window.location.hostname.indexOf("homologation.machen")&&-1===window.location.hostname.indexOf("a1b2c3d4.machen")&&-1===window.location.hostname.indexOf("sonne.machen")&&(console.log=function(){}),Object(o.render)(a.a.createElement(Bf,{store:c.a,history:i.a}),document.getElementById("root"))},19:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(11),c=r(153),l=r(121),s=r(749),u=r(1050),d=r(748),p=r(426),f=r(1),h=Object(p.a)((function(e){return{root:{"& .MuiIconButton-root":{padding:"3px",fontSize:"none !important"}},iconButtonStyleTransaparent:{padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.2)"}},iconButtonStyleWhite:{padding:"3px !important",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},shadow:{boxShadow:"0 0px 5px rgb(0 0 0 / 20%)"},iconText:{display:"flex",alignItens:"center"},iconText_Text:{marginLeft:"15px"},badge:{fontSize:"11px",whiteSpace:"nowrap"}}}));t.a=function(e,t){var r=h();return o.a.createElement("div",{className:r.root,style:Object(n.a)({},e.style?e.style:{})},o.a.createElement(l.a,{title:e.title?e.title:"INSERT_BUTTON_TITLE"},o.a.createElement("div",{style:{display:"flex",alignItems:"center",paddingLeft:7,paddingRight:7}},e.text&&o.a.createElement(u.a,Object.assign({disabled:!!e.load||!!e.disabled,onClick:e.onClick?function(t){t.preventDefault(),t.stopPropagation(),e.onClick()}:null},e.shadow?{className:"".concat(e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite)+" "+r.shadow}:{className:"".concat(e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite)},e.buttonStyle?{style:e.buttonStyle}:{}),o.a.createElement("div",{className:r.iconText},e.load?o.a.createElement("div",null,o.a.createElement(c.a,{size:25,style:{margin:"auto",display:"flex"}}),o.a.createElement("span",{style:{marginLeft:"15px",color:"lightgray"}},e.loadText?e.loadText:Object(f.r)("$__saving"))):o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},e.icon?o.a.createElement(d.a,{overlap:"rectangular",badgeContent:e.badgeContent,classes:{badge:r.badge},color:"secondary"},o.a.createElement(i.a,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:Object(f.d)("menu"),icon:e.icon?e.icon:"help_outline"})):o.a.createElement(o.a.Fragment,null),o.a.createElement("span",{style:Object(n.a)(Object(n.a)({},e.textSize?{fontSize:e.textSize}:{}),{},{marginLeft:"5px",color:e.textColor?e.textColor:e.color?e.color:Object(f.d)("menu")})},e.text)))),!e.text&&o.a.createElement(s.a,{onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null,className:e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite},o.a.createElement(d.a,{badgeContent:e.badgeContent,color:"secondary",classes:{badge:r.badge},overlap:"rectangular"},o.a.createElement(i.a,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:Object(f.d)("menu"),icon:e.icon?e.icon:"help_outline"}))))))}},21:function(e,t,r){"use strict";r.d(t,"l",(function(){return T})),r.d(t,"O",(function(){return ie})),r.d(t,"a",(function(){return V})),r.d(t,"b",(function(){return q})),r.d(t,"c",(function(){return U})),r.d(t,"d",(function(){return G})),r.d(t,"e",(function(){return H})),r.d(t,"f",(function(){return le})),r.d(t,"g",(function(){return W})),r.d(t,"h",(function(){return M})),r.d(t,"i",(function(){return Z})),r.d(t,"j",(function(){return ne})),r.d(t,"k",(function(){return se})),r.d(t,"m",(function(){return I})),r.d(t,"n",(function(){return F})),r.d(t,"o",(function(){return N})),r.d(t,"p",(function(){return L})),r.d(t,"q",(function(){return P})),r.d(t,"r",(function(){return J})),r.d(t,"s",(function(){return ae})),r.d(t,"t",(function(){return ee})),r.d(t,"u",(function(){return te})),r.d(t,"v",(function(){return O})),r.d(t,"w",(function(){return x})),r.d(t,"x",(function(){return _})),r.d(t,"y",(function(){return Q})),r.d(t,"z",(function(){return B})),r.d(t,"A",(function(){return Y})),r.d(t,"B",(function(){return ue})),r.d(t,"C",(function(){return de})),r.d(t,"D",(function(){return $})),r.d(t,"E",(function(){return z})),r.d(t,"F",(function(){return k})),r.d(t,"G",(function(){return y})),r.d(t,"H",(function(){return w})),r.d(t,"I",(function(){return D})),r.d(t,"J",(function(){return pe})),r.d(t,"K",(function(){return R})),r.d(t,"L",(function(){return K})),r.d(t,"M",(function(){return X})),r.d(t,"N",(function(){return E})),r.d(t,"P",(function(){return oe})),r.d(t,"Q",(function(){return A})),r.d(t,"R",(function(){return re}));var n=r(34),a=r(7),o=r(2),i=r(8),c=r(3),l=r(106),s=r.n(l),u=r(29),d=r(38),p=r(144),f=r(10),h=r.n(f),m=r(51),g=r(518),b=r(1);r(1761);function v(){v=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var y=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,a,i,l,s,u,d,p,f=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=f.length>1&&void 0!==f[1]&&f[1],n=f.length>2?f[2]:void 0,a=f.length>3&&void 0!==f[3]?f[3]:null,(i=window.location.hash.split("/"))[0]=i[0].replace("#",""),36!==i[0].length&&(i[0]=null),l=Object(o.a)({},n),s=l._id?Object(o.a)({},c.a.getState().db.cards[l._id]):{},u=null,l.order&&String(l.order.low)&&(l.order=l.order.low),"chatGroup"===l.type&&l._planId&&(delete l._planId,delete l._parent,delete l.idRel),Object.keys(l).map((function(e){return"file"===e&&(u=l[e],delete l.file),(l[e]&&l[e].low||l[e]&&l[e].low&&"0"===String(l[e].low))&&(l[e]=l[e].low),l})),l._id&&(!l._id||36===l._id.length)){e.next=20;break}return a?(l.idRel=a,l._parent=a,"plan"===c.a.getState().db.cards[a].type&&(l._planId=a),"plan"!==c.a.getState().db.cards[a].type&&c.a.getState().db.cards[a]._planId&&(l._planId=c.a.getState().db.cards[a]._planId)):(window.location.pathname.indexOf("sp")>-1&&!l._parent&&(l._parent=l._parent?l._parent:i[0]?i[0]:null),l._parent&&(l.idRel=a||l._parent),window.location.pathname.indexOf("sp")>-1&&i[0]&&36===i[0].length&&(l._planId=i[0])),e.next=16,j(t,Object(o.a)(Object(o.a)({},l),{},{oldData:s}),u,r);case 16:return d=e.sent,e.abrupt("return",d);case 20:return e.next=22,E(t,Object(o.a)(Object(o.a)({},l),{},{oldData:s}),u,r);case 22:if(p=e.sent,!(l&&l.type&&l.type.indexOf("guideline")>-1&&"guideline"!==l.type&&Object.keys(c.a.getState().db.cards).filter((function(e){return(c.a.getState().db.cards[e]._planId===i[0]||c.a.getState().db.cards[e]._parent===i[0])&&!0===c.a.getState().db.cards[e]._selected})).length>0)){e.next=26;break}return e.next=26,w(l._id);case 26:return e.abrupt("return",p);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket,e.next=3,u.a.post("timer/start",{idRel:r,startTime:h()().unix("X")});case 3:if(!(n=e.sent)){e.next=6;break}return e.abrupt("return",n.data);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),_=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket,e.next=3,u.a.put("timer/stop",{idRel:r});case 3:if(!(n=e.sent)){e.next=6;break}return e.abrupt("return",n.data);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),O=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var i,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket,e.next=3,u.a.delete("timer/run/".concat(n),{idRel:r});case 3:if(i=e.sent,(l=c.a.getState().db.cards[r]._kpiTimer)[n]&&delete l[n],!i){e.next=9;break}return t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r]),{},{_kpiTimer:l})))})),e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),w=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),n=Object.keys(c.a.getState().db.cards).filter((function(e){if((c.a.getState().db.cards[e]._planId===r[0]||c.a.getState().db.cards[e]._parent===r[0])&&!0===c.a.getState().db.cards[e]._selected&&c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e].type.indexOf("guideline")>-1)return!0}))[0],i=Object.keys(c.a.getState().db.cards).filter((function(e){return(c.a.getState().db.cards[e]._planId===r[0]||c.a.getState().db.cards[e]._parent===r[0])&&!0===c.a.getState().db.cards[e]._selected&&c.a.getState().db.cards[e].type&&-1===c.a.getState().db.cards[e].type.indexOf("guideline")})),u.a.put("matrix/aspects",{_id:n,_parent:r[0],aspects:i}),t&&t.reduxFunction&&t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},n,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[n]),{},{_aspects:i})))})),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var l,s,u,d,p,f,m,g,b=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=b.length>3&&void 0!==b[3]&&b[3],s=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),c.a.getState().db.dataType,u=c.a.getState(),d=u.session,p=u.db,(f=window.location.hash.split("/"))[0]=f[0].replace("#",""),m=new Promise(function(){var e=Object(i.a)(v().mark((function e(u,m){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{"add","myTask"!==r.type&&"chatGroup"!==r.type||(r.myTask=!0),r.status||(r.status="notStarted"),s.emit("data",{module:"cards",method:"post",action:"add"},r,function(){var e=Object(i.a)(v().mark((function e(i){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r._users=Object(a.a)({},d._id,{name:p.users[d._id].name?p.users[d._id].name:null,displayName:p.users[d._id].displayName?p.users[d._id].displayName:null,image:p.users[d._id].image?p.users[d._id].image:null,access:5,_id:d._id}),!(r.type&&r.type.indexOf("guideline")>-1)){e.next=4;break}return e.next=4,w(i.id);case 4:r.myTask&&delete r.myTask,r._loaded=!0,r._loadTimeline=!0,i.id&&(l||t.reduxFunction("ASYNC","SET_MODULE",Object(o.a)(Object(o.a)({},c.a.getState().sideModule),{},{id:i.id,data:Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().sideModule.data),r),{},{_id:i.id})})),r._id=i.id,parseInt(r.order)>=0&&(r.order={low:r.order}),r=Object(o.a)(Object(o.a)({},r),i.data),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},r),{},{created_at:h()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:h()().tz("America/Sao_Paulo").unix("x")}})))})),S(t,r._id,Object(a.a)({},i.log._id,Object(o.a)(Object(o.a)({},i.log),{},{_parent:r._id}))),n?E(t,Object(o.a)({},r),n,l):"tab"===f[0]&&"myDay"===f[1]&&(R(t,{_id:i.id,userId:d._id,option:!0},{new:!0,user:d._id,cardId:r._id,cardData:Object(o.a)({},r)}),S(t,r._id,Object(a.a)({},i.log._id,Object(o.a)(Object(o.a)({},i.log),{},{_parent:r._id}))))),u(Object(o.a)(Object(o.a)({},r),{},{created_at:h()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:h()().tz("America/Sao_Paulo").unix("x")}}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}catch(m){console.log(m)}case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=9,m;case 9:return g=e.sent,e.abrupt("return",g);case 11:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),E=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var l,s,u;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=Object(o.a)({},r),u=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),!n){e.next=7;break}return e.next=5,Object(p.a)(l._id,n);case 5:s=e.sent,l.image=s;case 7:return(!n||n&&s)&&(t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},l._id,Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[l._id]),l),{},{_users:Object(o.a)({},c.a.getState().db.cards[l._id]._users)})))})),u.emit("data",{module:"cards",method:"put",action:"update220527"},l,function(){var e=Object(i.a)(v().mark((function e(r){var n,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l.order&&parseInt(l.order)>=0&&(l.order={low:l.order}),r&&r.log&&r.log._id&&S(t,l._id,Object(a.a)({},r.log._id,Object(o.a)(Object(o.a)({},r.log),{},{_parent:[l._id]}))),n=c.a.getState(),i=n.db,!(l.type&&l._id&&l.type.indexOf("guideline")>-1&&"guideline"!==l.type&&Object.keys(i.cards).filter((function(e){return i.cards[e]._parent===l._id&&i.dataType.filter((function(t){return t.name===i.cards[e].type&&"swot"===t.module})).length>0})))){e.next=6;break}return e.next=6,w(l._id);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),S=function(e,t,r){var n=c.a.getState().timeline[t]?c.a.getState().timeline[t]:{};n=Object(o.a)(Object(o.a)({},n),r),e.reduxFunction("ASYNC","SET_TIMELINE",Object(o.a)(Object(o.a)({},c.a.getState().timeline),{},Object(a.a)({},t,n)))},k=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"restore"},{_id:r._id},function(){var e=Object(i.a)(v().mark((function e(n){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(t,{cardId:r._id},!1);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),L=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var a,o,l,s=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=s.length>3&&void 0!==s[3]&&s[3],o=c.a.getState(),l=o.db,n?C(t,{cardId:r._id,childrens:r.childrensDelete},!0):(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"delete"},{_id:r._id,deleted:!0,childrensDelete:a,client:l.cards[r._id]&&l.cards[r._id].client?l.cards[r._id].client:l.cards[r._id]&&l.cards[r._id]._planId&&l.cards[l.cards[r._id]._planId]&&l.cards[l.cards[r._id]._planId].client?l.cards[l.cards[r._id]._planId].client:null},function(){var e=Object(i.a)(v().mark((function e(n){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(t,{cardId:r._id,childrens:a},!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),C=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object(o.a)({},c.a.getState().db.cards);if(n[t.cardId]=Object(o.a)(Object(o.a)({},n[t.cardId]),{},{deleted:r},n[t.cardId]&&n[t.cardId]._selected?{_selected:!1}:{}),t.childrens){var a=ae(t.cardId);Object.keys(a).map((function(e){n[e]=Object(o.a)(Object(o.a)({},n[e]),{},{deleted:r})}))}e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),n)}))},I=function(e,t){c.a.getState().db.cards[t._id]&&!c.a.getState().db.cards[t._id]._selected&&t&&t._selected&&delete t._selected,e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._id]),{},{_aspects:t.aspects})))})),e.reduxFunction("ASYNC","preLoader",Object(o.a)(Object(o.a)({},c.a.getState().preLoader),{},{autoSave:!0}))},T=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,l,s;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,new Promise(function(){var e=Object(i.a)(v().mark((function e(a,o){var i,l,s,u;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r&&r.cardData&&r.cardData._parent)||c.a.getState().db.cards[r.cardData._parent]){e.next=7;break}return e.next=3,Object(m.b)(t,{idRel:r.cardData._parent,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:(l=e.sent)&&l[r.cardData._parent]&&(n={_requireApproval:!!l[r.cardData._parent].requireApproval||null}),e.next=8;break;case 7:(null===r||void 0===r||null===(i=r.cardData)||void 0===i?void 0:i._parent)&&c.a.getState().db.cards[r.cardData._parent]&&(s=c.a.getState().db.cards[r.cardData._parent],n={_requireApproval:!!s.requireApproval||null});case 8:if(c.a.getState().db.cards[r.cardId]){e.next=15;break}return e.next=11,Object(m.b)(t,{idRel:r.cardId,cardLoad:"fullCatenation",ignoreLoader:!0});case 11:(u=e.sent)&&u.cards&&u.cards[r.cardId]&&a(u.cards[r.cardId]),e.next=16;break;case 15:a(c.a.getState().db.cards[r.cardId]);case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:(l=e.sent)&&(s=c.a.getState().db.tag,c.a.getState().db.cards&&l&&(r.cardData&&r.cardData._tags&&r.cardData._tags.length>0&&r.cardData._tags.map((function(e){l&&l._tags&&0===l._tags.filter((function(t){return t.value===e.value})).length&&s.filter((function(t){return t.value===e.value})).map((function(e){e.count=e.count+1}))})),l._tags&&l._tags.map((function(e){r.cardData._tags&&0===r.cardData._tags.filter((function(t){return t.value===e.value})).length&&s.filter((function(t){return t.value===e.value})).map((function(e){e.count=e.count-1}))}))),(!r.new||r.new&&r.user!==g.a._id)&&t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r.cardId,Object(o.a)(Object(o.a)(Object(o.a)({},l||{}),r.cardData),{},{_notifications:c.a.getState().db.cards&&l&&l._notifications?l._notifications:{comment:0,log:0,timer:0,kpi:0},createdBy:r.user?r.user:null},n))),tag:s})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),F=function(e,t){var r=c.a.getState().db.cards[t.cardId]||null;r&&e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)(Object(o.a)({},r),{},{_kpiTimer:t._kpiTimer})))}))},N=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]?c.a.getState().db.cards[r._id]:{}),r)))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),D=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,i,l,s,u,d;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState(),i=n.db,l=i.cards,s=l[r],(u=window.location.hash.split("/"))[0]=u[0].replace("#",""),36!==u[0].length&&(u[0]=null),d={},Object.keys(i.cards).filter((function(e){return i.cards[e]&&!i.cards[e].deleted&&(i.cards[e]._planId===u[0]||i.cards[e]._parent===u[0])})).map((function(e){d=Object(o.a)(Object(o.a)({},d),{},Object(a.a)({},e,i.cards[e]))})),Object.keys(d).map((function(e){d[e]&&d[e].type&&-1===d[e].type.indexOf("guideline")&&-1===d[e].type.indexOf("objective")&&-1===d[e].type.indexOf("goal")&&(d[e]=Object(o.a)(Object(o.a)({},d[e]),{},{_selected:!1}))})),s&&s._aspects&&s._aspects.length>0&&s._aspects.map((function(e){d[e]&&(d[e]=Object(o.a)(Object(o.a)({},d[e]),{},{_selected:!0}))})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},l),d)}));case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),A=function(e,t){if(c.a.getState().db.cards[t._cardColumn]){var r=Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards[t._board].columns[t._columnId]),t._columnData),i=Object(n.a)(c.a.getState().db.cards[t._cardColumn].boards[t._board].columnOrder);t._columnsOrder&&(i=t._columnsOrder),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._cardColumn,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn]),{},{boards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards),{},Object(a.a)({},t._board,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards[t._board]),{},{columnOrder:i,columns:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards[t._board].columns),{},Object(a.a)({},t._columnId,r))})))})))}))}D(e)},P=function(e,t){if(c.a.getState().db.cards[t._parent]){var r=Object(n.a)(c.a.getState().db.cards[t._parent].boards[t._board].columnOrder),i=Object(o.a)({},c.a.getState().db.cards[t._parent].boards[t._board].columns);delete i[t._deleted],r.splice(r.indexOf(t._deleted),1),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._parent,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent]),{},{boards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards),{},Object(a.a)({},t._board,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r,columns:i})))})))}))}},$=function(e,t){var r=c.a.getState().db.cards,n=t.cards;n&&n.length>0&&(n.map((function(e,t){r=Object(o.a)(Object(o.a)({},r),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},r[e]),{},{order:"".concat(t+1)})))})),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),r)})))},z=function(e,t){if(c.a.getState().db.cards[t._parent]){var r=t._order;e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._parent,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent]),{},{boards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards),{},Object(a.a)({},t._board,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r})))})))}))}},M=function(e,t){var r=c.a.getState().db,n=Object(a.a)({},t.cardId,Object(o.a)(Object(o.a)({},r.cards[t.cardId]),{},{boards:Object(o.a)(Object(o.a)({},r.cards[t.cardId].boards),{},Object(a.a)({},t.boardId,Object(o.a)(Object(o.a)({},r.cards[t.cardId].boards[t.boardId]),{},{columns:t.columns})))}));e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},r),{},{cards:Object(o.a)(Object(o.a)({},r.cards),n)}))},B=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var i,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users&&c.a.getState().db.cards[r._id]._users[r.userId]?c.a.getState().db.cards[r._id]._users[r.userId]:{}),n&&n.data&&n.data._users&&n.data._users[r.userId]?n.data._users[r.userId]:{}),{},{myDay:!r.checklist&&r.option?l:null}),l=h()().tz("America/Sao_Paulo").unix("x"),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)(Object(o.a)({},n&&n.data?n.data:{}),c.a.getState().db.cards[r._id]),{},{_users:Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users?c.a.getState().db.cards[r._id]._users:{}),n&&n.data&&n.data._users?n.data._users:{}),{},Object(a.a)({},r.userId,i))})))}));case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Y=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]),{},{_users:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users?c.a.getState().db.cards[r._id]._users:{}),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users&&c.a.getState().db.cards[r._id]._users[r.userId]?c.a.getState().db.cards[r._id]._users[r.userId]:{}),{},{myDay:r.option?r.createDate:null})))})))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),R=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h()().unix("x"),B(t,r,n),(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"setMyDay"},Object(o.a)(Object(o.a)({},r),{},{createDate:i})),c.a.getState().sideModule.id&&c.a.getState().sideModule.id===r._id&&t.reduxFunction("ASYNC","SET_MODULE",Object(o.a)(Object(o.a)({},c.a.getState().sideModule),{},{data:Object(o.a)(Object(o.a)({},c.a.getState().sideModule.data?c.a.getState().sideModule.data:{}),{},{_users:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users?c.a.getState().db.cards[r._id]._users:{}),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users&&c.a.getState().db.cards[r._id]._users[r.userId]?c.a.getState().db.cards[r._id]._users[r.userId]:{}),{},{myDay:r.option?i:null})))})}));case 5:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),G=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),H=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.a.put("/cards/moveTo",Object(o.a)({},r));case 3:if(!e.sent){e.next=7;break}return W(t,r),e.abrupt("return",!0);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Object(b.c)({message:"".concat(Object(b.r)("$__tryAgainOrContactSupport",1),". ERROR: cMoveTo->API~887"),variant:"error",persist:!1,horizontal:"right"});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,r){return e.apply(this,arguments)}}(),W=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.a.getState().db.cards,e.next=3,new Promise(function(){var e=Object(i.a)(v().mark((function e(t,a){var i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce(r.cardId);case 2:(i=e.sent)&&i.length>0?i.map((function(e,a){n[e]&&(n[e]=Object(o.a)(Object(o.a)({},n[e]),{},{_planId:r.planId})),a+1===i.length&&t(!0)})):t(!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:e.sent&&(n[r.cardId]&&(n[r.cardId]=Object(o.a)(Object(o.a)({},n[r.cardId]),{},{_parent:r.newRel,_planId:r.planId})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),n)})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),U=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,i,l,s;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.a.getState().db.cards[r.cardId]){e.next=7;break}return e.next=3,Object(m.b)(t,{idRel:r.cardId,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:(n=e.sent)&&(i=c.a.getState().db.cards[r.cardId]&&c.a.getState().db.cards[r.cardId]._users?c.a.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(i).map((function(e){e!==r.userId&&i[e].isResponsible&&delete i[e].isResponsible})),l=c.a.getState().db.cards[r.cardId]?c.a.getState().db.cards[r.cardId]:{},n&&n.cards&&n.cards[r.cardId]&&(l=n.cards[r.cardId]),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r.cardId,Object(o.a)(Object(o.a)({},l),{},{_users:Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},r.userData?r.userData:{}),c.a.getState().db.users&&c.a.getState().db.users[r.userId]?c.a.getState().db.users[r.userId]:{}),l&&l._users&&l._users[r.userId]?l._users[r.userId]:{}),r.isResponsible?{isResponsible:!0}:{}),(String(r.approvalResponsible),{approvalResponsible:r.approvalResponsible})),r.access?{access:r.access}:{})))})))}))),e.next=10;break;case 7:s=c.a.getState().db.cards[r.cardId]&&c.a.getState().db.cards[r.cardId]._users?c.a.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(s).map((function(e){e!==r.userId&&s[e].isResponsible&&delete s[e].isResponsible})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r.cardId,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r.cardId]?c.a.getState().db.cards[r.cardId]:{}),{},{_users:Object(o.a)(Object(o.a)({},s),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r.cardId]&&c.a.getState().db.cards[r.cardId]._users&&c.a.getState().db.cards[r.cardId]._users[r.userId]?c.a.getState().db.cards[r.cardId]._users[r.userId]:{}),s[r.userId]?s[r.userId]:{}),r.userData?r.userData:{}),r.isResponsible?{isResponsible:!0}:{}),(String(r.approvalResponsible),{approvalResponsible:r.approvalResponsible})),r.access?{access:r.access}:{})))})))}));case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),V=function(e,t){if(!c.a.getState().db.cards[t.cardId])return!0;var r=Object(o.a)({},c.a.getState().db.cards[t.cardId]);r._users[t.userId]&&delete r._users[t.userId],e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)({},r)))}))},q=function(e,t){if(!c.a.getState().db.cards[t.cardId])return!0;var r=Object(o.a)({},c.a.getState().db.cards[t.cardId]);t.userIds&&t.userIds.length>0&&t.userIds.map((function(e){r._users[e]&&delete r._users[e]})),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)({},r)))}))},X=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{u.a.put("cards/unlinkChildrens",{cardId:r.cardId,planId:r._planId})}catch(t){console.log(t)}return e.abrupt("return",!0);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),K=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState().db.cards,Object.keys(n).filter((function(e){return n[e]._parent===r.cardId&&"step"!==n[e].type&&(!n[e].checklist||n[e].checklist&&n[e].showCard)})).map((function(e){n[e]._parent=r.planId})),r.cards&&r.cards.length>0&&r.cards.map((function(e){n[e]&&(n[e]=Object(o.a)(Object(o.a)({},n[e]),{},{_parent:r.planId}))})),n&&n[r.cardId]&&(n[r.cardId]=Object(o.a)(Object(o.a)({},n[r.cardId]),{},{_parent:r.planId})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:n}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),J=function e(t,r){var n=t&&t.color?t.color:null,a=!(!t.color||!r);if(t._parent&&c.a.getState().db.cards[t._parent]){var o=e(c.a.getState().db.cards[t._parent],!0);if(o.color)return o}return{parent:a,color:n,parentId:t.color?t._id:null}},Z=function e(t){var r=c.a.getState(),n=r.db,i=r.session,l=c.a.getState().db.cards[t];if(c.a.getState().db.cards[t]){var s={};return(!c.a.getState().db.cards[t].private||c.a.getState().db.cards[t].private&&c.a.getState().db.cards[t]._users&&c.a.getState().db.cards[t]._users[i._id])&&(s=Object(a.a)({},t,{_id:l._id,type:l.type,name:l.name,icon:l.type&&n&&n.dataType?n.dataType.filter((function(e){return e.name===l.type}))[0].icon:"topic"})),l._parent&&(s=Object(o.a)(Object(o.a)({},e(l._parent)),s)),s}return{}},Q=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"link"},r,function(){var e=Object(i.a)(v().mark((function e(t){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ee=function(e){var t=c.a.getState(),r=t.db,n=t.session,a=Object(o.a)({},r.cards[e]);if(r.cards[e]){var i=0;return a&&a._users&&Object.keys(a._users).length>0&&a._users[Object.keys(a._users).find((function(e){return e.indexOf(n._id)>-1}))]&&a._users[Object.keys(a._users).find((function(e){return e.indexOf(n._id)>-1}))].access&&(i=parseInt(a._users[Object.keys(a._users).find((function(e){return e.indexOf(n._id)>-1}))].access)),a&&a._parent&&r.cards[a._parent]&&r.cards[a._parent]._users&&Object.keys(r.cards[a._parent]._users).length>0&&r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))]&&r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))].access&&parseInt(r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)>parseInt(i)&&(i=parseInt(r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)),r.cards[e]._planId&&r.cards[r.cards[e]._planId]&&r.cards[r.cards[e]._planId]._users&&Object.keys(r.cards[r.cards[e]._planId]._users).length>0&&r.cards[r.cards[e]._planId]._users[Object.keys(r.cards[r.cards[e]._planId]._users).find((function(e){return e.indexOf(n._id)>-1}))]&&parseInt(r.cards[r.cards[e]._planId]._users[Object.keys(r.cards[r.cards[e]._planId]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)>parseInt(i)&&(i=parseInt(r.cards[r.cards[e]._planId]._users[Object.keys(r.cards[r.cards[e]._planId]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)),i}return 0},te=function e(t){var r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=c.a.getState(),s=l.db,u=l.session,d=Object(o.a)({},t?s.cards[t]:{}),p={};((null===i||void 0===i?void 0:i.noInternal)||Object.keys(s.users).filter((function(e){return"user"===s.users[e].type&&s.users[e]._parent===u._account&&!s.users[e].deleted})).map((function(e){p=Object(o.a)(Object(o.a)({},p),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},s.users[e]),{},{_id:e,type:"user"})))})),(null===d||void 0===d?void 0:d.client)&&s.users[d.client]&&Object.keys(s.users).filter((function(e){return s.users[e]._parent===d.client&&!s.users[e].deleted})).map((function(e){p=Object(o.a)(Object(o.a)({},p),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},s.users[e]),{},{_id:e,type:"external"},s.users[e]._parent?{_parent:s.users[e]._parent}:{})))})),(null===d||void 0===d?void 0:d._users)&&Object.keys(d._users).map((function(e){if(e!==u._id){var t="user";(!s.users[e]||s.users[e]&&s.users[e]._parent&&s.users[s.users[e]._parent]&&s.users[e]._parent!==u.account)&&(t="external"),(!s.users[e]||s.users[e]&&s.users[e]._parent&&!s.users[s.users[e]._parent])&&(t="consultant"),p=Object(o.a)(Object(o.a)({},p),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},d._users[e]),{},{_id:e,type:t},d._users[e]._parent?{_parent:d._users[e]._parent}:{})))}})),i&&!i.onlyCard)&&(!i.noPlan&&d._planId&&(null===(r=s.cards[d._planId])||void 0===r?void 0:r._users[u._id])&&(Object.keys(s.cards[d._planId]._users).map((function(e){})),p=Object(o.a)(Object(o.a)({},p),e(d._planId,{noPlan:!0,noInternal:!0}))),d._parent&&(null===(n=s.cards[d._parent])||void 0===n?void 0:n._users[u._id])&&(p=Object(o.a)(Object(o.a)({},p),e(d._parent,{noPlan:!0,noInternal:!0}))));if(null===i||void 0===i?void 0:i.isArray){var f=[];return Object.keys(p).map((function(e){0===f.filter((function(t){return t._id===e})).length&&f.push(p[e])})),f}return p},re=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t===r)return!1;if(!t)return!1;var n=!1,a=c.a.getState().db.cards[t]?c.a.getState().db.cards[t]:null;return!!a&&(a&&a.isTemplate?n=!0:a&&a._planId&&a._planId!==a._id&&c.a.getState().db.cards[a._planId]?n=e(a._planId,r||t):a&&a._parent&&c.a.getState().db.cards[a._parent]&&(n=e(a._parent,r||t)),n)},ne=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var a,o;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Promise(function(){var e=Object(i.a)(v().mark((function e(t,a){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.post("/cards/copy",{from:r,to:n});case 2:e.sent&&t(!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=3,a;case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),ae=function e(t){var r=c.a.getState().db.cards,n=Object(a.a)({},t,!0);return Object.keys(r).filter((function(e){return r[e]._parent===t})).map(function(){var t=Object(i.a)(v().mark((function t(r,a){var i;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(i=e(r))&&(n=Object(o.a)(Object(o.a)({},n),i));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),n},oe=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,l,s,u;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?c.a.getState().db.cards[t.data._id]:{},l=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),u=s=r,"completed"===s.status?u=Object(o.a)(Object(o.a)({},u),{},{completed_at:{low:h()().unix("X")}}):s=Object(o.a)(Object(o.a)({},u),{},{completed_at:null});try{l.emit("data",{module:"cards",method:"put",action:"status"},Object(o.a)({_id:n._id},s),Object(i.a)(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},n._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[n._id]),u)))}));case 1:case"end":return e.stop()}}),e)}))))}catch(d){console.log(d)}case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ie=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,i,l,s;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?c.a.getState().db.cards[t.data._id]:{},i=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),s=l=r,"completed"===l.status?s=Object(o.a)(Object(o.a)({},s),{},{completed_at:{low:h()().unix("X")}}):l.status&&(s=Object(o.a)(Object(o.a)({},s),{},{completed_at:{low:null}})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},n._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[n._id]),s)))}));try{i.emit("data",{module:"cards",method:"put",action:"update220527"},Object(o.a)({_id:n._id},l))}catch(u){console.log(u)}case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ce=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,a,o,l,s=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s.length>1&&void 0!==s[1]?s[1]:null,n=s.length>2?s[2]:void 0,a=c.a.getState().db.cards,o=[],!((l=Object.keys(a).filter((function(e){return a[e]&&a[e]._parent&&(a[e]._parent===t||a[e]._parent===n)&&(!r||"completed"===r&&"completed"!==a[e].status||"completed"!==r&&a[e]._parentCompleted&&a[e]._parentCompleted.cardId&&(a[e]._parentCompleted.cardId===t||a[e]._parentCompleted.cardId===n))}))).length>0)){e.next=13;break}return e.next=8,new Promise((function(e,n){l.map(function(){var n=Object(i.a)(v().mark((function n(a,i){var c;return v().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ce(a,r,t);case 2:c=n.sent,-1===o.indexOf(a)&&o.push(a),c&&c.length>0?c.map((function(t,r){-1===o.indexOf(t)&&o.push(t),r+1===c.length&&i+1===l.length&&e(!0)})):e(!0);case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())}));case 8:if(!e.sent){e.next=11;break}return e.abrupt("return",o);case 11:e.next=14;break;case 13:return e.abrupt("return",[]);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var a,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce(r,n);case 2:a=e.sent,i=c.a.getState().db.cards,a&&a.length>0&&a.map((function(e){i[e]=Object(o.a)(Object(o.a)({},i[e]),{},{status:n,completed_at:"completed"===n?{low:h()().unix("X")}:null},"completed"===n?{_parentCompleted:{cardId:r,completed_at:{low:h()().unix("X")}}}:{_parentCompleted:null})})),i[r]=Object(o.a)(Object(o.a)({},i[r]),{},{status:n,completed_at:"completed"===n?{low:h()().unix("X")}:null}),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:i}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),se=function(e){var t=c.a.getState(),r=t.session,n=c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._notifications?c.a.getState().db.cards[e]._notifications:{};Object.keys(n).map((function(e){return n[e]=parseInt(n[e])}));var a=0;return Object.keys(n).filter((function(e){return"total"!==e})).map((function(t){c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._users&&c.a.getState().db.cards[e]._users[r._id]&&c.a.getState().timeline[e]&&parseInt(n[t])<Object.keys(c.a.getState().timeline[e]).filter((function(r){return c.a.getState().timeline[e][r]&&c.a.getState().timeline[e][r].type&&c.a.getState().timeline[e][r].type===t})).length?(n[t]=c.a.getState().timeline&&c.a.getState().timeline[e]&&Object.keys(c.a.getState().timeline[e]).length>0?Object.keys(c.a.getState().timeline[e]).filter((function(n){if(r&&r._id&&parseInt(c.a.getState().timeline[e][n].created_at)>1650666142&&c.a.getState().timeline[e][n].type===t&&c.a.getState().timeline[e][n].user&&c.a.getState().timeline[e][n].user._id!==r._id&&(!c.a.getState().timeline[e][n].readedBy||c.a.getState().timeline[e][n].readedBy&&!c.a.getState().timeline[e][n].readedBy[r._id]))return!0})).length:0,a+=parseInt(n[t])):(n[t]=parseInt(n[t]),a+=parseInt(n[t]))})),Object(o.a)(Object(o.a)({},n),{},{total:a})},ue=function(e){var t=c.a.getState(),r=t.session,n=t.db;return!(e&&36===e.length&&n.cards[e]&&!n.cards[e].isTemplate&&n.cards[e]._users&&!n.cards[e]._users[r._id]&&n.cards[e]._account&&n.cards[e]._account!==s()(r.account).toString())},de=function(e){var t=c.a.getState(),r=t.session,n=t.db;return!(e&&36===e.length&&n.cards[e]&&!n.cards[e].isTemplate&&n.cards[e]._account&&n.cards[e]._account!==s()(r.account).toString())},pe=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.a.post("/Card_Count",{id:r._id});case 2:(n=e.sent)&&parseInt(n.data)>0&&"completed"!==r.status?Object(b.c)({message:Object(b.r)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(b.r)("$__concludeAll"),text:Object(b.r)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){ie(Object(o.a)(Object(o.a)({},t),{},{data:{_id:r._id}}),{status:"completed"===r.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&le(t,r._id,"completed"===r.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(b.r)("$__cancel"),text:Object(b.r)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(ie(Object(o.a)(Object(o.a)({},t),{},{data:{_id:r._id}}),{status:"completed"===r.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&le(t,r._id,"completed"===r.status?"inProgress":"completed"));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},230:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(6),i=r(0),c=r.n(i),l=r(1040),s=r(1730),u=r(19),d=r(1048),p=r(750),f=r(1047),h=r(426),m=r(1),g=r(29);function b(){b=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(k([])));v&&v!==t&&r.call(v,o)&&(m=v);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(h.a)((function(e){return{iconButtonStyleTransaparent:{padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));t.a=function(e){var t=c.a.useState(!1),r=Object(o.a)(t,2),i=r[0],h=r[1],v=c.a.useState(e.color?e.color:"rgba(200,200,200,1)"),y=Object(o.a)(v,2),x=y[0],_=y[1],O=c.a.useRef(null),w=function(t){O.current&&O.current.contains(t.target)||(h(!1),e.onClose&&e.onClose())},j=function(){var t=Object(a.a)(b().mark((function t(r){return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.onChange&&e.onChange(r),h(!i),!e._id){t.next=5;break}return t.next=5,g.a.put("node/update",{_id:e._id,color:r});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return c.a.createElement("div",{className:"cardColorPicker",style:Object(n.a)({},e.style?e.style:{}),onClick:function(e){e.stopPropagation(),e.preventDefault()},onDrag:function(e){e.preventDefault(),e.stopPropagation()},onDragStart:function(e){e.preventDefault(),e.stopPropagation()},onDragEnter:function(e){e.preventDefault(),e.stopPropagation()},onDragCapture:function(e){e.preventDefault(),e.stopPropagation()},onDragEnterCapture:function(e){e.preventDefault(),e.stopPropagation()},onDragOver:function(e){e.preventDefault(),e.stopPropagation()}},e.children?c.a.createElement("div",{ref:O,style:{margin:3,cursor:"pointer"},onClick:function(e){h((function(e){return!e}))}},c.a.createElement("div",{onClick:function(e){}},e.children)):c.a.createElement("div",{ref:O,style:Object(n.a)(Object(n.a)({},e.label?{borderRadius:7,padding:7,color:x?Object(m.q)(x,!0):"#FFFFFF",fontSize:12}:{width:e.size?e.size:21,height:e.size?e.size:21}),{},{margin:3,backgroundColor:x,borderRadius:e.size?e.size:21,cursor:"pointer"}),onClick:function(){h((function(e){return!e}))}},e.label?e.label:""),c.a.createElement(f.a,{open:i,anchorEl:O.current,role:void 0,transition:!0,disablePortal:!!e.disablePortal},(function(t){var r=t.TransitionProps;t.placement;return c.a.createElement(d.a,Object.assign({},r,{style:{transformOrigin:"right center"}}),c.a.createElement(p.a,null,c.a.createElement(s.a,{onClickAway:w},c.a.createElement("div",{style:{position:"relative",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px 5px rgba(0,0,0,0.17)",borderRadius:7},onClick:function(e){e.stopPropagation()}},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",marginTop:"-5px",justifyContent:"end"}},c.a.createElement(u.a,{title:Object(m.r)("$__cancel",1),color:"lightgrey",icon:"close",onClick:function(){_(e.color?e.color:"rgba(200,200,200,1)"),h(!i)},size:"30px"}),e.color?c.a.createElement(u.a,{title:Object(m.r)("$__removeColor",1),color:"red",icon:"format_color_reset",onClick:function(){j(null)},size:"30px"}):c.a.createElement(c.a.Fragment,null),c.a.createElement(u.a,{title:Object(m.r)("$__saveColor",1),color:"green",icon:"save",onClick:function(){j(x)},size:"30px"})),c.a.createElement(l.a,{color:x,onChange:function(e,t){_("rgba(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,", ").concat(e.rgb.a,")")),t.stopPropagation()},disableAlpha:!0}),c.a.createElement("div",{style:{clear:"both"}})))))})))}},238:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n,a=r(7),o={tags:[],userGroups:[],users:{userGroup:[],selected:{}},units:{userGroup:[],selected:{}},clients:{userGroup:[],selected:{}},groups:{userGroup:[],selected:{}},plans:{userGroup:[],selected:{}},sideModuleWindow:!1,clearFilter:!1,text:"",cards:(n={iniDate:null,endDate:null,dateStatus:[],status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}},Object(a.a)(n,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"kpiType",[]),Object(a.a)(n,"iniKpiValue",null),Object(a.a)(n,"endKpiValue",null),n)}},29:function(e,t,r){"use strict";var n=r(8),a=r(305),o=r.n(a);r(32);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(C){s=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=u;var p={};function f(){}function h(){}function m(){}var g={};s(g,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(k([])));v&&v!==t&&r.call(v,o)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),s(y,l,"Generator"),s(y,o,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}var c=o.a.create("true"===String("true")?{baseURL:"https://ws.machen.ai"}:{baseURL:"http://localhost:3001"});o.a.defaults.withCredentials=!0,c.interceptors.request.use(function(){var e=Object(n.a)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=localStorage.getItem("TOKEN"))&&(t.headers.Authorization="Bearer ".concat(r),t.headers.Accept="application/json;charset=UTF-8;application/x-www-form-urlencoded"),e.abrupt("return",t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c.interceptors.response.use(function(){var e=Object(n.a)(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){var t=Promise.reject(e.response);return e&&e.response&&e.response.status&&401===e.response.status&&"/login"!==window.location.pathname&&"/register"!==window.location.pathname&&"/activate"!==window.location.pathname&&(localStorage.setItem("TOKEN",null),localStorage.clear(),window.open("/login","_self")),t})),t.a=c},295:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M20.45,5.43,19,4l-1.79,1.8,1.41,1.41ZM13,1.52H11v3h2Zm7,12h3v-2H20ZM9,17.67v4.81h6V17.67a6,6,0,1,0-6,0ZM4,13.48v-2H1v2ZM6.76,5.82,5,4,3.56,5.43l1.8,1.79Z"}),a.default.createElement("path",{d:"M20.45,5.43,19,4l-1.79,1.8,1.41,1.41ZM13,1.52H11v3h2Zm7,12h3v-2H20ZM9,17.67v4.81h6V17.67a6,6,0,1,0-6,0ZM4,13.48v-2H1v2ZM6.76,5.82,5,4,3.56,5.43l1.8,1.79Z"})),"Ideas");t.default=o},3:function(e,t,r){"use strict";var n=r(12),a=r(1045),o=r(993),i=r(32),c=r(34),l=r(2),s={notifications:[]},u={copy:[],selected:[],action:null},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0;return"SET_CARD"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_CARD"===t.action?Object(l.a)({},u):e},p={open:!1,nodeId:null,activeChats:[],activeModule:"users",groups:{},notifications:!0},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;return"SET_CHAT"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLOSE_CHAT"===t.action?Object(l.a)({},p):e},h={timelines:{},unreadeds:{},drafts:{}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;return"SET_CHATS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_CHATS"===t.action?Object(l.a)({},h):e},g=r(708),b=r(518),v={},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return"SET_FUNCTIONS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},x={},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},O={open:!1,miro:!1,files:[],file:0},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;return"LIGHTBOX"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"LIGHTBOX_CLOSE"===t.action?Object(l.a)({},O):e},j={total:0,lastNotification:0,firstNotification:0},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;return"SET_NOTIFICATIONS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},S={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},L=r(238),C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L.a,t=arguments.length>1?arguments[1]:void 0;return"SEARCH"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"SEARCH_CLEAR"===t.action?L.a:e},I=r(346),T=r.n(I),F=r(999),N=r.n(F),D={custom:{ColumnTitleColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",customLogo:T.a,loginBackground:N.a,linearProgress:"linear-gradient(90deg, rgba(90,35,130,0) 0%, rgba(67,18,102,1) 30%, rgba(67,18,102,1) 70%, rgba(90,35,130,0) 100%)",AvatarBackground:"radial-gradient(rgba(114,47,162,1) 0%, rgba(67,18,102,1) 100%)",AvatarIconColor:"#FFFFFF",active:"rgb(192,178,131)",color:"rgb(192,178,131)",colorText:"rgb(192,178,131)",dark:"rgb(8,27,49)",darkText:"rgb(8,27,49)",disabled:"rgb(200,200,200)",fieldRadius:"3px",fieldVariant:"standard",light:"#FFFFFF",lightText:"#FFFFFF",line:"rgb(192,178,131)",locale:"pt-BR",subMenuColor:"linear-gradient(90deg, rgba(233,233,233,1) 0%, rgba(237,237,237,1) 100%)",subMenuTextColor:"rgb(125,125,125)",subMenuTextColorActive:"rgb(192,178,131)",medium:"rgb(125,125,125)",mediumText:"rgb(150,150,150)",menu:"rgb(67,18,102)",menuColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",menuButtonColor:"rgb(192,178,131)",timelineMyMessage:"#ebe3f1"},cards:{load:[],adminViewLoader:!1,adminView:!1,loaded:!1,expanded:!1,hide:{image:!1,description:!1,dates:!1,kpi:!1,kpiChart:!1,kpiChange:!1}},timeline:{load:[]},sideModuleWindow:!1,dashboard:{period:"$__last7Days"},period:"$__last7Days",users:{},showDeleted:!1,showPrivate:!1},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D,t=arguments.length>1?arguments[1]:void 0;return"SET_SESSION"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_SESSION"===t.action?Object(l.a)({},e):e},P={cards:{load:{}},timeline:{load:{}}},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;return"SET_SESSION_LOADS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_SESSION_LOADS"===t.action?Object(l.a)({},e):e},z={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,t=arguments.length>1?arguments[1]:void 0;return"SET_MODULE"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_MODULE"===t.action?Object(l.a)({},z):e},B={},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,t=arguments.length>1?arguments[1]:void 0;return"SET_TIMELINE"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},R={cards:{},timeline:{}},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;return"TO_LOAD"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},H={users:{}},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,t=arguments.length>1?arguments[1]:void 0;return"SET_USERS_STATUS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_USERS_STATUS"===t.action?Object(l.a)({},e):e},U={typing:{}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,t=arguments.length>1?arguments[1]:void 0;return"SET_TYPING"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"RESET_TYPING"===t.action?Object(l.a)({},U):e},q=r(380);function X(){X=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var K=X().mark(Q),J=X().mark(ee);function Z(e){return e.next&&e.next(),!0}function Q(e){return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(q.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(q.b)(Z,e);case 4:case"end":return t.stop()}}),K)}function ee(){return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(q.a)([Object(q.e)("ASYNC",Q),Object(q.d)("IMMEDIATE",Q)]);case 2:case"end":return e.stop()}}),J)}var te=Object(a.a)(),re=Object(n.f)(Object(n.c)({alert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"NEW_ALERT":return Object(l.a)(Object(l.a)({},e),{},{notifications:[].concat(Object(c.a)(e.notifications),[Object(l.a)({key:t.value.options.key},t.value)])});case"CLOSE_ALERT":return Object(l.a)(Object(l.a)({},e),{},{notifications:e.notifications.map((function(e){return t.dismissAll||e.key===t.value?Object(l.a)(Object(l.a)({},e),{},{dismissed:!0}):Object(l.a)({},e)}))});case"REMOVE_ALERT":return Object(l.a)(Object(l.a)({},e),{},{notifications:e.notifications.filter((function(e){return e.key!==t.value}))});default:return e}},card:d,chat:f,chatTyping:V,chats:m,controls:g.a,db:b.a,functions:y,languages:_,lightBox:w,notifications:E,preLoader:k,search:C,session:A,sessionLoads:$,sideModule:M,timeline:Y,toLoad:G,usersStatus:W}),Object(n.a)(te,Object(o.routerMiddleware)(i.a)));te.run(ee);t.a=re},32:function(e,t,r){"use strict";var n=r(224),a=Object(n.a)();t.a=a},346:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},348:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAABN2lDQ1BBZG9iZSBSR0IgKDE5OTgpAAAokZWPv0rDUBSHvxtFxaFWCOLgcCdRUGzVwYxJW4ogWKtDkq1JQ5ViEm6uf/oQjm4dXNx9AidHwUHxCXwDxamDQ4QMBYvf9J3fORzOAaNi152GUYbzWKt205Gu58vZF2aYAoBOmKV2q3UAECdxxBjf7wiA10277jTG+38yH6ZKAyNguxtlIYgK0L/SqQYxBMygn2oQD4CpTto1EE9AqZf7G1AKcv8ASsr1fBBfgNlzPR+MOcAMcl8BTB1da4Bakg7UWe9Uy6plWdLuJkEkjweZjs4zuR+HiUoT1dFRF8jvA2AxH2w3HblWtay99X/+PRHX82Vun0cIQCw9F1lBeKEuf1UYO5PrYsdwGQ7vYXpUZLs3cLcBC7dFtlqF8hY8Dn8AwMZP/fNTP8gAAAAJcEhZcwAACxMAAAsTAQCanBgAAATuaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA2LjAtYzAwMiAxMTYuMTY0NzY2LCAyMDIxLzAyLzE5LTIzOjEwOjA3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIxLTA4LTE2VDEwOjAwOjU2LTAzOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMS0wOC0xNlQxMDowMjoyNC0wMzowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMS0wOC0xNlQxMDowMjoyNC0wMzowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NGNkYzhjZTMtOTEyYS1lODQwLWJjYjQtOWVkMTMxMGFiYjU4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjRjZGM4Y2UzLTkxMmEtZTg0MC1iY2I0LTllZDEzMTBhYmI1OCIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjRjZGM4Y2UzLTkxMmEtZTg0MC1iY2I0LTllZDEzMTBhYmI1OCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NGNkYzhjZTMtOTEyYS1lODQwLWJjYjQtOWVkMTMxMGFiYjU4IiBzdEV2dDp3aGVuPSIyMDIxLTA4LTE2VDEwOjAwOjU2LTAzOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoV2luZG93cykiLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+rzal5gAAFXlJREFUeJztnXlsZMd95z9V9a6+SDY5Q3JIzn1oNIpjO97YcrwxAluyN16ttcF617tAEGSxyALZwEBOLBIgCRDAuf5IYCAIknWAIItgs96VkhiyFcmSV5JzOFnJSizbkuYezXA4nINXs493VVX+eM1ucsjh2d1DyfwC/IPdXfWq6vvqd796wlrLZnHrrWmAI8CfA+8FaoDZdAe7FEKIotb6TlSP/72U8qWtrMkKWLG6bwkHHzy06S6cLV4yAL5ARgZAYYvtdyeEQCD3R434Rc93P+a4znPG3J/7TG7x9/8JeH83BnLfISxYS1gLv6K1/piUW12azmCrVz3WlVHsEgghAEFUi5/VWv/Q/SBlq1e8P7dNDyEkWGsIa+ELWutP9JqUrV7tba/AN4QFIQVYCGvhl1OdfLyXpLzj7/jtYomUqBo/k6bJJ3tFyh4h60BIAQKievxFrfWHe0HKHiEbIFP0ENWjl7TWj3ablD1CNgEhBNb0xiTeI2STWKbon9Wp7ppO2SNkC2iRUg+/qLV+rBuk7BGyRSzbKU91w0/ZI2QbWO6naK076qfsEbJNLCPlGa31I50iZY+QHWAZKc9prT8u1c6Xc4+QHULIzE8Ja+EzOt25SbxHSAew5DyG9cazWuuP7ISUPUI6BCGasa96+FWt9Q9LKWEbicc9QjoIIQXWWsJ642mt9ceEWp3S3QhbTeG+o6FTjdEWscPb1BpLvVJ/1st7j7ie89WttN0jBMBahBDkB3JYY1s6YUddGosQ8nnXcx8DvrzZdnuEAEtVJoVSsdMdY6z9EO9EQpRSHelHa33v79K0I9e4C1ti+W1DSJIkHennPhQubMnW2vWESCkxxnDpyjRRGOM429spaaoJAo/jx8Zafe5G7HpCltRrmqYkSYK121vINNUoR67oczeio4RYa1FK4XkuG5VjCiGI4wSt9bpWzVIvjlQopXAchzTVJEmyoTVkrcV1XRxHYW3Wx/I+12vnOArX7dw8NouOEqKUIo4S5mYrG8pqYyzFYg7Xc7YkPtJUE+R89g0NoDdop6SkWm8QNqJN9w/gKEUYxszObGYehkIhh++7G45nU9fecQ/L4LkO83NVzl68hue59xQN1lqSVHPm1BEKhYAwijd9jThJGB4uc+L4OGG4frtc4HPh4nUqlSqus/mpep7D7TsLnL90jcD31v1tFCc8cOIQxVIOvcF4NoPOiiwsUgo8z8Nzs66tWbblRbNgwIIQaevuW2+rCyFWfC+EwGhDHMUk8fqWlxICY8yq9nf3ucZVm6LXw3XdbB7WtmWdaI/Z2qblts2C+bvRFaUuaCtOi2VJDAvaExGAlAKpBFLee3Gy78SqSn/LJnTBXb+xIutPyeUjXPuaUmT116152LYDefc8lq7VCXTNyrLWYozl4PgwhYKPEJLKYp3JqVsoKXEcxeSN29y8NYtZR3EKkS2GTjVKSdJ1HLv1oJREp5qLl6Zafd4LUgriOMX1nPY8xoYpFnNYDLVaxLWpW8gOKPG70UVCMlIKhRzlchGEQGuDMRYls21erzXQ2mzKOnFdt5UM2g6EFBhjWViobmLsmbXoupnBYaylUMwxUM6cbiFqWGOxOxjPvdADP8S2RJi4S0ysKXYsuG5m4q4yOXciF2y22zzPbX0khEBrTZykK26KtS9jWfGLLjkzXSNEiOyuXFxsYIxFIKhUay19oY2hr1jAdRXG2OyudBS+57JQqdEII1SXwxxpqsnlfEaGh4iiuLlbs90bxQmNRpT9LwSVxTqmaaDU6iFSCLogsbpJSKY8J6dutfwMqTLdYU3meY8d2MfgUB9hGBH4LtYKpqdn0WllRV9JkqKUQu2kiEBkvo9ONa7bnnaqNfmcz5HDI1gLURyTy/ncmJptmb3KEVyfut2eR1MHdgPdFVk2U6YrFnKZxaW1IUlSPNelVo+4dPkGs3MVfM/FcTMnUxtDeaBEkmriaPsBRmMsvusiA5+FhSpKSXzPJYlT3jz/FjfvzHHsyBi5IPtMLzeX15pHl9BRQoTIFGcYxRhr13cMkzTzcnM+t24tcO7CVcIoppAP0FpTrTXoKxU4eGCYUl+Ocxcm0UY3Fa7MHLYNdErgeygpsdZmoY3A58TxcaqLDSZv3KZSqZELPPK5gNnZCvV6yKnjE4yMDKK13pTDGkUJxhg6pd87SkiSpOTzASePTawbcrBkDuPAQJHpm3O8cfYKFsgXAqIwRkjJ4YOjjI6UyecCavWQVGsEAs91qVTrXLh4Ha03CJ0oSaVax2vGpJZyISMjZUqlHNM357gxfYdUmyxiEMa8fvYKCNi/rx/b3BnrQRtDIZ8jTjqTS+koIWmq8XyH8dK+DYNyhVzA1PQM337jMq6r8F2Xej0in/c5cXSC/r48UZxQqzUw1iKb+81xFI16xMJCdVPBRa8ZXEySFEnmuddqDaSSHDk8wkB/kQuXJqnXQ/K5gDhO+NZ3LvG9Z05w6sQ41Xq4rkG1FFxM010YXBTNUEUjvHcwz1pLPhcwfXuWN869hes6eK5DrR5SLpc4eXwc13WoNUIgCxBiLanWpGnbKdxsbGpJPKapbjmVQojs/1TT15fnzINHuHDxOguVKvlcADG8fvYyiCOUSnnqjXDDxe4EGdDjfIi1Ft/3CKOY8xcmAVpkDJb7OH3qIEDT3GzGippt/WaQz9lmKjfVutXH8r1bb4QEvseDpw9z9tw1ZucqFPIBjSjm3IVrfM+Zo/i+RxTFHVv09dBTQpRSCODS5Rs0wphCIaBRDykPlHjg1EGMtcTxyjzHkql59Mhox8axPNwvhCCMYjzP5YFTB3nz7FXmF6rk8z71WsjFyzd44NRBlFI9yTL2LMFsrSUXeExPzzIzu0AhnynwXD7g1IkJBKwiYzmUlB35WwtLekAAp05OkM/5RGFMPh8wM7vA9PQsge9tqBc7gZ4R4nkui9U6U9MzWTJHayxw/OgYrusQbiAStDEd+bsXlnaK6zgcPTyKbV7T91ymb85Qb0Qrwi7dQs8IcR2HG9OzNMII13GI4oSD48P09xVohFFP5PNGEELQCCMGB/sYG91HoxHheg6NMGb65sy29ddW0BNCPNdhfr7K7GyFXM4njhP6igVGRwaJ4q7UQu0IUZxw4MAg/aUCcZQQ+B63b8+zuFhvJd66hZ4Q4jiKmdkKcZKgpCRJNSPDZVzXIe1OcdqOkCQpge8xMjJE0szDxEnK7Nxi12JYS+g6IUopqrUGC5UqvucRxwn9/UUGyqUN9cb9Qia6YsrlIgP9ReI4wfccZmYXqNYaHauiXAtdJ8RzFbVaRL0RoZxsd+wr9xE0FftuhdaawHMZLPdlu8RRhFFMrRbhuW9jQqyFarWBEGC0xfddisX8qqTQboMQgjhJKRXz+L6L0ZnJu1itr5v+3Sm6SohSkkYjZqFZhpMkCeX+EoViQNKhYFw3kaQphWLAQH+JJElwHYdKpUa9EXYtFN9lQrKCszhOkEpiLeTzQVeKA7oFKQT5XIBplvvEcUIUpl3TI10lRApBmqZZVYnNMoaeu7VKxfsNYwy+56DUUh2WJU11126qruuQOEmx1mKtwXVUx0ouewVtDH7gNnMqWQVK3KFHI9ZCVwmx1hI1qwuNsbie26zl7X5MqFMwxjRTBC66Oe4oSroW1+oaIUKAaW5vIQSmWVG+lFJ9u8DaLLCZ6cDs+cNU66ySpgtiq4s7JDv0a6m0hmaO/W2kz9fEUnLLbPM5lY3QNUKWihEcR9FoxNTDCNd11i6A29XI5iGloNGIsuCo62SBxi7Mo6uRMm0MY6NDLQJGhsvbrs29X7A2m8f4gf1Z5aWAsdEhtDEdK7Bejq4SkiQpvu9y8sQ4INCpJtnlHvpaSJKUINechwCdmq7No6uELCnAJTN3SSm+3bCkN7To/jx6klN/e+mMe+MdlcLdw+awR8guwx4huwx7hOwybEmpF0alUb7o3BOO3wWwW3RXtkTI1Wesnyzu/ICv7xZYC8pHPfSpzbfZEiGvflYXZ79pkd7bPybVdVgwBnIjwusaIX5Z2GAYhEvHHlB5p8JasAZyQ6J7IktIrFQg1N4O2QjCNl9ruMVM75422GXYI2SX4b4cYCYVJA1oTGviyGDInspVCJy8IDcscQMBUpBUDNUbGtFMPxTHFE5eYNeoIpKuIJzV1G9pEOAWJKUxhTaZCLl7DGkI9ZuauNG2TZUQ+GVJfl92r/Y6DNdzQpQnmL+UIgQc/tcB+9/tURxVxDVD5ZJm5s2E2mSKTiBpGMonHQ5/PEdUMWDhzmsxOgR518itgHjekN+vOPxoDmNANyy3X4szv0m2fyeVYO5cgvIFBz8aMHTGpXRIoWPL/HnN9D9EXH81orRPkR9WmKR3rPSUEOkKZs8l9B9x+DdP7Gff9679vMXLv13hb39pHicQ+P2SR/9osPXdcz8xy3f+uEr/sZVDl8DsVMrDvzbEu/5LdibJ5acbPPXvGhTHmifJicwYuf1GzKEPBXz0DwfZ99DaY3j9f9b4x99bpDapcYu9s2B6qkPCGU1p3OFHnh5eQUZtWlO53JZBV58PcYuC/Iji6vMh1/+m/RDpwEmHRNtVI49rlvIRlyMfz7U+m/q7iCQ0iKaloxTMnU059XieT//NSIsMa2DubMLiZDubeebHCjzwH/PUb+qeRiZ6ukOqNzUf+Vw/Ayeyyy5cTHnx5+a4/Y2YNIHxD3l4fZKb34gpHlAYC4264frXQsb/pQ/A2Ad9cgWJTWgtNEA0ZzjwQZ/SRPZhGloufykkP5T9LwRUJzUj3+/x2Bf2tdqdf7LOK79VYe5iiuMLJn7I59E/GuKtZxu88psVSgdVT0/N7BkhJrUE/ZKR728fmff0j97hzb9vMH7AQ3lw5a9CjLb0HXWwBrAQBILpV9onKox90Gfoe1zmzqfkhprbREJYN4z+i3bft16JmT2bUBxviisLcdXy/v/eh/KzFb74lw2e+NQtfCHpO6SwCbz+ZzVuvhITVwxCgrqHAdEt9O6hzwT8kiS/P1ugylTKzMWEg2MeblHgBILihKLvsAOmbd0UDjhcez7k5ssZKcKBvqMO8UK7DMfElnxJcuzxtri6+kJIEpqWY9aYyQg79lj7N3/9i/PkHcngaQflCZyCYP9pl2jBID1BUJY9JQN6SIj0BOGcoTqVyem+MYfh0x5TUzFW33sk0oP6ouH637X1yIEP+Cv0SLRgGTjtMvr+TKzZFC78RZ1cWbXM3WjWMPZhv7U7Lj3VYO5sku3GZYtuNPj9EicQmPtQINMzQoSCpGa59kLY+uyxJ/bxnh8pMnMpYf5citWZf7ACBlwluP1PbbF17BMBfWMOad0iRKY/yiecVtvpVyLmzqYE5ZXT6z/altDX/zYitauNg/uNng6ndETx8q8vcPEvGgDkhxWf/PP9fPq5EQ59NGDuUsLCWxrprtSihTHFlWcazF/IbuWBUy6DJx2ihcypNNZy9F+1RdHkixFx3azUkAL8vvZ067c0jhRgMnM8DS23zyfcOZ8w0/y7eT6memP1eLqJnlpZbiDwBiRPffo2P/gbZd73cyUADj0ScOiRgMmvRTz3X2eYfT1h8IzbcsicvODO2ZRrL4QMnMh8jPIpl6svhfhFSfm4y6FHAyDTPeefrBP0y7Z3bgEBKrdsYXXbSgtnNP0nXR7+5X50YjMRaiE3KLnxDzFn/08tI7MHvPSUEKMhGJJIV/CVn5/h4l/W+cCv9nP4kWwxJz7s86PfOMCTj97izmsxhQlFtgXAQXD7m22xdejRgNc+v0g4bzhwxqdwIFvdmy/HzL6RkB9ZJvuaC7nc47aSln8RzRlKE4p3/cTqN0vkhhWvfX4RryR7EuHu/bsbUvAKgtHTHtOvxPzvR6d54pFb3PlW9tiCWxB89PfLSF9gwvYC5kcVV54JM0cNOPSRgMEHPSp1zfiH/NbvJl8KiWpm9a1mIK60+wv6JDq1WJHdJJUrKS//ZoUXf3qON/9Xrd0stT11DO+LSrMW0NB3SDF80uPSVxv86ftuMPtGRsr+93gc/VhAdbpt5vh9gtmLCVe/mhkFwZCkNKGwWA59pE3IuSfr+H1yVTDRYLOgYxNDD7loMofRLyuq1zUv/uIcX/rcDN/50xr3C/fVxljyNUbOeNQSw9d/rX34ZfmMSxq1V3UpIry0kwAGH3BxkZRPZyGQW/8YM/d60nYYl8HLS6b/f9t0PvqJHP2jinjBoFOLEwj2nXSZUB59Y90/QuNe6Ckh0hXUbmjmL6Yk9eax3c3HpTUWv9QW0rrRPkUOsvB5blDx1lca6DhrO/x9Lsc+HJAfzhZw8msRjUWDWMMqKowqJl+IuPH3GSnFCcXRT+S4OZ0gaWdArQW98zP1t42eKXUrMmvm+ON5nJzgyrMN5s6npBg0MHHM5/2/1AdAUre89VxIsG/l/RIMSGbOptx6NebAwz7jPxisiPqe/791guJqcQVZHUAaWV77gyoHHs5E3CN/MEhtSvPtZ+oUkSBh2iScXvYsjnTEOzOWZSOLTuB9P1ti+Ps8alOaq8+HzF9JKYwoTv2HfMuR+84fV5l+JWLwlLsiQZQ5l4apr2eEDBx3WoTc+WbCnW/Hq0hswUD/EYdv/kmV0Q94vPsnS0hX8G+fHubI7y1y7f+FODnBD5xxeeg/t62txcmUTNl0a2VWoneEaHByoh2jGlM8+GOFVb/71uer/PUvzNM3sfbQgpLkwpN13vczpeZrI7LPr30tJFqw5IfXWTkF5YMOL3xmjsYdw8O/3I8Q8N7PlHjvZ0qrxvuN36nw8m9XKIypnhV19IwQJy+Ia5YvPn6bh368wNgP+HglifLBJBDOGV7/kyqvP1FnYNzBKa0dZc3tV8yeTTj7Z3VGP+ATLRiUC+e+UMfvy15rcc/CG5OZ3GJC8dKvzHH5qQbv/qkS/cccvD6BNZlPMn8h5bU/rHL11ZChcRen0LuIb+92iAWvTxJXDF//7AJKCty8yHLlOguNO75g3yk3e53EPRZAuOAPSJ7/bzNY0zQKEkswoChOOBumW40GxxeMnPaZOZfw5R+/g5+TOH72HlsdQhQZCgOKA6f97Fz6HkZ8t0SIjjLDZ7u716YWNy8YOuliTZapW6pfyo82xc9Gb2ppkhCUZRambw5GuWLTue/MD7IUhhWF/dlZ9NkLAyRCQql5bIbV9z6de0M0Xwlh0611sbVCOQeZVMEfInMMdgAhadUIb2fS0umQUBeZsaC28WbndbsVoBNIo61Nb0t+yLt+Sv6T8qB+Y6stv8sgIV6EcAaOf0pMb6XplnbIkcfl/6hdx3n1s/pzNsEIyRb5/+6ATXAxBA/9pPzd9/yC+tWttP1naNHfLnAaa+QAAAAASUVORK5CYII="},38:function(e,t,r){"use strict";var n=r(8),a=r(305),o=r.n(a);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(C){s=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=u;var p={};function f(){}function h(){}function m(){}var g={};s(g,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(k([])));v&&v!==t&&r.call(v,o)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),s(y,l,"Generator"),s(y,o,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}o.a.defaults.headers.post["Content-Type"]="application/json; charset=UTF-8";var c=o.a.create("true"===String("true")?{baseURL:"https://machen.azurewebsites.net/api"}:{baseURL:"http://localhost:7071/api"});o.a.defaults.withCredentials=!0,c.interceptors.request.use(function(){var e=Object(n.a)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.headers["Content-Type"]="".concat(t.headers["Content-Type"]?"".concat(t.headers["Content-Type"]):"application/json","; charset=UTF-8;"),r=localStorage.getItem("TOKEN")||"","null"!==String(r)&&""!==String(r)&&"undefined"!==String(r)&&(t.headers.Authorization="Bearer ".concat(r),t.headers.Accept="application/json;charset=UTF-8;application/x-www-form-urlencoded"),e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c.interceptors.response.use(function(){var e=Object(n.a)(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){var t=Promise.reject(e.response);return e&&e.response&&e.response.status&&401===e.response.status&&"/login"!==window.location.pathname&&"/register"!==window.location.pathname&&"/activate"!==window.location.pathname&&console.log(e),t})),t.a=c},4:function(e,t,r){"use strict";r.d(t,"r",(function(){return a})),r.d(t,"m",(function(){return o})),r.d(t,"I",(function(){return i})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return c})),r.d(t,"c",(function(){return C})),r.d(t,"l",(function(){return s})),r.d(t,"z",(function(){return u})),r.d(t,"N",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"G",(function(){return f})),r.d(t,"u",(function(){return h})),r.d(t,"D",(function(){return m})),r.d(t,"q",(function(){return g})),r.d(t,"b",(function(){return b})),r.d(t,"O",(function(){return v})),r.d(t,"K",(function(){return y})),r.d(t,"o",(function(){return x})),r.d(t,"p",(function(){return _})),r.d(t,"v",(function(){return O})),r.d(t,"w",(function(){return w})),r.d(t,"P",(function(){return j})),r.d(t,"J",(function(){return E})),r.d(t,"a",(function(){return S})),r.d(t,"n",(function(){return k})),r.d(t,"A",(function(){return L})),r.d(t,"x",(function(){return I})),r.d(t,"s",(function(){return T})),r.d(t,"E",(function(){return F})),r.d(t,"L",(function(){return N})),r.d(t,"h",(function(){return D})),r.d(t,"B",(function(){return A})),r.d(t,"M",(function(){return P})),r.d(t,"F",(function(){return $})),r.d(t,"i",(function(){return z})),r.d(t,"t",(function(){return M})),r.d(t,"y",(function(){return B})),r.d(t,"C",(function(){return Y})),r.d(t,"g",(function(){return R})),r.d(t,"k",(function(){return G})),r.d(t,"H",(function(){return H})),r.d(t,"d",(function(){return W}));var n=r(2),a=function(e){e=(e+="").replace("#","");if(!/[0-9A-Fa-f]/g.test(e)||3!==e.length&&6!==e.length)throw new Error("input is not a valid hex color.");if(3===e.length){var t=e[0],r=e[1],n=e[2];e=t+t+r+r+n+n}var a=(e=e.toUpperCase(e))[0]+e[1],o=e[2]+e[3],i=e[4]+e[5];return parseInt(a,16)+", "+parseInt(o,16)+", "+parseInt(i,16)},o=260,i={transition:"all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1)"},c={marginRight:"auto",marginLeft:"auto","&:before,&:after":{display:"table",content:'" "'},"&:after":{clear:"both"}},l={paddingRight:"15px",paddingLeft:"15px",marginRight:"auto",marginLeft:"auto","@media (min-width: 768px)":{width:"750px"},"@media (min-width: 992px)":{width:"970px"},"@media (min-width: 1200px)":{width:"1170px"},"&:before,&:after":{display:"table",content:'" "'},"&:after":{clear:"both"},"&::-webkit-scrollbar":{width:"4px",height:"4px"},"&::-webkit-scrollbar-button":{width:"0px",height:"0px"},"&::-webkit-scrollbar-thumb":{background:"#e1e1e1",border:"0px none #ffffff",borderRadius:"27px"},"&::-webkit-scrollbar-thumb:hover":{background:"#ffffff"},"&::-webkit-scrollbar-thumb:active":{background:"#000000"},"&::-webkit-scrollbar-track":{background:"#666666",border:"0px none #ffffff",borderRadius:"20px"},"&::-webkit-scrollbar-track:hover":{background:"#666666"},"&::-webkit-scrollbar-track:active":{background:"#333333"},"&::-webkit-scrollbar-corner":{background:"transparent"}},s={fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",lineHeight:"1.5em"},u=["#9c27b0","#ab47bc","#8e24aa","#af2cc5","#7b1fa2"],d=["#ff9800","#ffa726","#fb8c00","#ffa21a","#f57c00","#faf2cc","#fcf8e3"],p=["#f44336","#ef5350","#e53935","#f55a4e","#d32f2f","#ebcccc","#f2dede"],f=["#4caf50","#66bb6a","#43a047","#5cb860","#388e3c","#d0e9c6","#dff0d8"],h=["#00acc1","#26c6da","#00acc1","#00d3ee","#0097a7","#c4e3f3","#d9edf7"],m=["#e91e63","#ec407a","#d81b60","#eb3573","#c2185b"],g=["#999","#777","#3C4858","#AAAAAA","#D2D2D2","#DDD","#555555","#333","#eee","#ccc","#e4e4e4","#E5E5E5","#f9f9f9","#f5f5f5","#495057","#e7e7e7","#212121","#c8c8c8","#505050"],b="#000",v="#FFF",y="#55acee",x="#3b5998",_="#dd4b39",O="#0976b4",w="#cc2127",j="#e52d27",E="#35465c",S="#1769ff",k="#ea4c89",L="#ff4500",C={boxShadow:"0 10px 30px -12px rgba("+a(b)+", 0.42), 0 4px 25px 0px rgba("+a(b)+", 0.12), 0 8px 10px -5px rgba("+a(b)+", 0.2)"},I={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(u[0])+",.4)"},T={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(h[0])+",.4)"},F={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(f[0])+",.4)"},N={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(d[0])+",.4)"},D={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(p[0])+",.4)"},A={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(m[0])+",.4)"},P=Object(n.a)({background:"linear-gradient(60deg, "+d[1]+", "+d[2]+")"},N),$=Object(n.a)({background:"linear-gradient(60deg, "+f[1]+", "+f[2]+")"},F),z=Object(n.a)({background:"linear-gradient(60deg, "+p[1]+", "+p[2]+")"},D),M=Object(n.a)({background:"linear-gradient(60deg, "+h[1]+", "+h[2]+")"},T),B=Object(n.a)({background:"linear-gradient(60deg, "+u[1]+", "+u[2]+")"},I),Y=Object(n.a)({background:"linear-gradient(60deg, "+m[1]+", "+m[2]+")"},A),R={},G=(a(b),a(b),Object(n.a)({margin:"0 20px 10px",paddingTop:"10px",borderTop:"1px solid "+g[8],height:"auto"},s),{border:"0",borderRadius:"3px",boxShadow:"0 10px 20px -12px rgba("+a(b)+", 0.42), 0 3px 20px 0px rgba("+a(b)+", 0.12), 0 8px 10px -5px rgba("+a(b)+", 0.2)",padding:"10px 0",transition:"all 150ms ease 0s"}),H=(a(g[6]),a(b),a(b),a(b),{color:g[2],textDecoration:"none",fontWeight:"300",marginTop:"30px",marginBottom:"25px",minHeight:"32px",fontFamily:"'Roboto', 'Helvetica', 'Arial', sans-serif","& small":{color:g[1],fontSize:"65%",fontWeight:"400",lineHeight:"1"}}),W=Object(n.a)(Object(n.a)({},H),{},{marginTop:"0",marginBottom:"3px",minHeight:"auto","& a":Object(n.a)(Object(n.a)({},H),{},{marginTop:".625rem",marginBottom:"0.75rem",minHeight:"auto"})})},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return g}));var n=r(7),a=r(2),o=r(8),i=r(106),c=r.n(i),l=r(10),s=r.n(l),u=r(3),d=r(38);function p(){p=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new S(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function f(){}function h(){}function m(){}var g={};l(g,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(k([])));v&&v!==t&&r.call(v,o)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=l(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var f=function(){var e=Object(o.a)(p().mark((function e(t,r){var i,l,s,f,m,g,b,v,y,x,_,O,w,j,E,S,k,L,C,I,T,F,N,D,A,P,$,z,M,B,Y,R,G,H,W,U,V;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r.idRel,l=r.adminView,s=void 0!==l&&l,f=r.callback,m=void 0===f?null:f,g=r.cardLoad,b=void 0===g?"my":g,v=r.completed,y=void 0!==v&&v,x=r.status,_=r.deleted,O=void 0!==_&&_,w=r.archived,j=void 0!==w&&w,E=r.templates,S=void 0!==E&&E,k=r.allStatus,L=void 0!==k&&k,C=r.search,I=void 0===C?"":C,T=r.completedDays,F=void 0===T?7:T,N=r.limit,D=void 0===N?0:N,A=r.skip,P=void 0===A?0:A,$=r.startDate,z=void 0===$?null:$,M=r.endDate,B=void 0===M?null:M,Y=!!r.ignoreLoader,("search"===b||t.ignoreLoader)&&(Y=!0),R=u.a.getState(),G=R.sessionLoads,H=Object(a.a)({},G.cards.load),W=c()("".concat(JSON.stringify(r))).toString(),!(Object.keys(H).length>0&&H[W])){e.next=8;break}return e.abrupt("return",!0);case 8:return Y||t.reduxFunction("ASYNC","SET_SESSION_LOADS",Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards),{},{load:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards.load),{},Object(n.a)({},W,Y?"completed":"loading"))})})),U=(U=String(u.a.getState().session.dashboard.period).replace("$__last","")).replace("Days",""),e.next=13,new Promise(function(){var e=Object(o.a)(p().mark((function e(r){var o,c,l;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.a.post("/Card_List/",Object(a.a)(Object(a.a)(Object(a.a)({idRel:i,adminView:s,load:b,completed:y,archived:j,templates:S,status:x,allStatus:L,limit:D,skip:P,startDate:z,endDate:B},y?{completedDays:F||U}:{}),I?{search:I}:{}),O?{deleted:!0}:{}));case 3:if(!(o=e.sent)||!o.data){e.next=10;break}return c=o.data,e.next=8,h(t,c,b);case 8:(l=e.sent)&&(t.reduxFunction("ASYNC","SET_SESSION_LOADS",Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards),{},{load:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards.load),{},Object(n.a)({},W,"completed"))})})),m&&m(),r({total:c.length,cards:l}));case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("loadCards::ERR::"),console.log(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}());case 13:if(!(V=e.sent)){e.next=17;break}return t.reduxFunction("ASYNC","preLoader",Object(a.a)(Object(a.a)({},u.a.getState().preLoader),{},{cards:!1})),e.abrupt("return",V);case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),h=function(){var e=Object(o.a)(p().mark((function e(t){var r,o,i,l,s,d=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>1&&void 0!==d[1]?d[1]:[],d.length>2?d[2]:void 0,o=u.a.getState(),i=o.session,l=function(e){return!!(e&&e.data&&e.data._id&&(!e.data.private||!1===e.data.private||e.data.private&&e.users.filter((function(e){return e._id===i._id})).length>0))},e.next=6,new Promise((function(e,t){var o={};r&&r.filter((function(e){return l(e)})).length>0?r.filter((function(e){return l(e)})).map((function(t,s){var d=t.data._id;if(!u.a.getState().db.cards[t.data._id]){var p,f,h={},m={},g=[];t.users.length>0&&t.users.filter((function(e){return e._id})).map((function(e){var r=null;t&&t.myDayUsers&&t.myDayUsers.filter((function(e){return e._id})).length>0&&(r=t.myDayUsers.filter((function(t){return t._id===e._id})).length>0?t.myDayUsers.filter((function(t){return t._id===e._id}))[0].date:null),h=Object(a.a)(Object(a.a)({},h),{},Object(n.a)({},e._id,Object(a.a)(Object(a.a)({},e),r?{myDay:r}:{})))})),"step"===t.data.type&&(null===(p=t.showGroups)||void 0===p?void 0:p.filter((function(e){return e.value})).length)>0&&(g=t.showGroups.filter((function(e){return e.value}))),(null===(f=t.groups)||void 0===f?void 0:f.filter((function(e){return e._id})).length)>0&&t.groups.filter((function(e){return e._id})).map((function(e){m=Object(a.a)(Object(a.a)({},m),{},Object(n.a)({},e._id,Object(a.a)({},e)))})),t&&t.data&&t.data.planId&&delete t.data.planId,o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},d,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},u.a.getState().db.cards[d]&&u.a.getState().db.cards[d]._selected?{_selected:!0}:{}),t.data),{},{_cardCode:t.cardCode,_requireApproval:t.requireApproval||!1,_isFavorite:"false"===String(t.favorite)},t.account?{_account:c()(t.account).toString()}:{}),t&&t.createdBy&&t.createdBy.filter((function(e){return e._id})).length>0?{_createdBy:t.createdBy.filter((function(e){return e._id}))[0]}:{}),t.myDay?{_myDay:t.myDay}:{}),t.parent?{_parent:t.parent}:{}),t.plan?{_planId:t.plan}:{}),t.users?{_users:h}:{}),t.groups?{_groups:m}:{}),t.tags?{_tags:t.tags}:{}),t.aspects?{_aspects:t.aspects}:{}),t.inFlow?{_hasStep:t.inFlow}:{}),g&&g.length>0?{showGroups:g}:{}),{},{_notifications:t.notifications},t.parentCompleted&&t.parentCompleted.card?{_parentCompleted:t.parentCompleted,status:"completed",completed_at:{low:t.parentCompleted.date?t.parentCompleted.date:t.updated_at&&t.updated_at.low?t.updated_at.low:null}}:{}),t.timer?{_kpiTimer:Object(n.a)({},t.timer._id,Object(a.a)(Object(a.a)({},t.timer),{},{userId:i._id}))}:{}),t.parentPrivate?{private:!0}:{})))}s+1===r.filter((function(e){return l(e)})).length&&e(o)})):e({})}));case 6:if(!(s=e.sent)){e.next=10;break}return t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},u.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().db.cards),s)}),(function(){})),e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(o.a)(p().mark((function e(t,r){var n,a,o,i,c,l,s,u=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>2&&void 0!==u[2]&&u[2],a=u.length>3&&void 0!==u[3]?u[3]:null,o=u.length>4&&void 0!==u[4]?u[4]:"my",i=u.length>5&&void 0!==u[5]&&u[5],c=u.length>6?u[6]:void 0,l=u.length>7&&void 0!==u[7]&&u[7],e.next=8,f(t,{idRel:r,adminView:n,callback:a,cardLoad:o,completed:i,status:c,ignoreLoader:l});case 8:if(!(s=e.sent)){e.next=11;break}return e.abrupt("return",s);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=Object(o.a)(p().mark((function e(t){var r,n,a=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:7,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.next=5,new Promise(function(){var e=Object(o.a)(p().mark((function e(a,o){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/calendar"!==window.location.pathname){e.next=4;break}return e.next=3,f(t,{cardLoad:"calendar",iniDate:s()().startOf("month").unix("x"),endDate:s()().endOf("month").unix("x")});case 3:a(!0);case 4:if("/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=10;break}return e.next=7,f(t,{cardLoad:"plans",archived:!0});case 7:return e.next=9,f(t,{cardLoad:"plans",archived:!0,completed:!0,completedDays:r});case 9:a(!0);case 10:if("/sp"!==window.location.pathname||36===n[0].length||"completed"!==n[1]){e.next=14;break}return e.next=13,f(t,{cardLoad:"plans",completed:!0,completedDays:r});case 13:a(!0);case 14:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=18;break}return e.next=17,f(t,{cardLoad:"templates",templates:!0});case 17:a(!0);case 18:if("/sp"!==window.location.pathname||36===n[0].length||"admin"!==n[1]){e.next=22;break}return e.next=21,f(t,{cardLoad:"plans",adminView:!0});case 21:a(!0);case 22:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=26;break}return e.next=25,f(t,{cardLoad:"plans",deleted:!0});case 25:a(!0);case 26:if("/d"!==window.location.pathname&&"/login"!==window.location.pathname&&"/"!==window.location.pathname||"dayTasks"===n[1]){e.next=34;break}return e.next=29,f(t,{cardLoad:"dashboard"});case 29:return e.next=31,f(t,{cardLoad:"showIn"});case 31:return e.next=33,f(t,{cardLoad:"channel"});case 33:a(!0);case 34:if("/d"!==window.location.pathname||"dayTasks"!==n[1]){e.next=38;break}return e.next=37,f(t,{adminView:!0,cardLoad:"myDay"});case 37:a(!0);case 38:if("/d"!==window.location.pathname||"ourTasks"!==n[1]){e.next=42;break}return e.next=41,f(t,{adminView:!0,cardLoad:"myDay"});case 41:a(!0);case 42:if("/sp"!==window.location.pathname||!n[0]||36!==n[0].length){e.next=48;break}return e.next=45,f(t,{idRel:n[0],cardLoad:"plan"});case 45:return e.next=47,f(t,{idRel:n[0],cardLoad:"plan",completed:!0});case 47:a(!0);case 48:if("/sp"===window.location.pathname&&36!==n[0].length&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=52;break}return e.next=52,f(t,{cardLoad:"plans",archived:!0});case 52:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=55;break}return e.next=55,f(t,{cardLoad:"templates"});case 55:if("/sp"===window.location.pathname&&36!==n[0].length&&"trash"===n[1]&&f(t,{cardLoad:"deletedPlans",deleted:!0,adminView:!!(u.a.getState().session._access&&u.a.getState().session._access.plan&&u.a.getState().session._access.planAdmin)}),"/library"!==window.location.pathname){e.next=60;break}return e.next=59,f(t,{cardLoad:"plans"});case 59:a(!0);case 60:if("/calendar"!==window.location.pathname){e.next=64;break}return e.next=63,f(t,{cardLoad:"calendar",startDate:null,endDate:null});case 63:a(!0);case 64:if("/p"!==window.location.pathname&&"/acc"!==window.location.pathname||a(!0),"/bright-and-connected"!==window.location.pathname){e.next=73;break}if("tab"!==n[0]||"radar"!==n[1]){e.next=69;break}return e.next=69,f(t,{cardLoad:"links",limit:9,skip:0});case 69:if("tab"!==n[0]||"insight-boards"!==n[1]){e.next=72;break}return e.next=72,f(t,{cardLoad:"insights",limit:9,skip:0});case 72:a(!0);case 73:if("/c"!==window.location.pathname){e.next=78;break}if("tab"!==n[0]||"users"===n[1]){e.next=77;break}return e.next=77,f(t,{cardLoad:"plans"});case 77:a(!0);case 78:if("/t"!==window.location.pathname){e.next=99;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=85;break}return e.next=82,f(t,{cardLoad:"myResponsible"});case 82:return e.next=84,f(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 84:a(!0);case 85:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=89;break}return e.next=88,f(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 88:a(!0);case 89:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=99;break}return e.next=92,f(t,{cardLoad:"in"});case 92:return e.next=94,f(t,{cardLoad:"in",completed:!0,completedDays:r});case 94:return e.next=96,f(t,{cardLoad:"myResponsible"});case 96:return e.next=98,f(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 98:a(!0);case 99:if("/tags"!==window.location.pathname){e.next=104;break}if(36!==n[0].length){e.next=103;break}return e.next=103,f(t,{cardLoad:"tags",idRel:n[0]});case 103:a(!0);case 104:"/calendar"===window.location.pathname&&a(!0),"/masterAdmin"!==window.location.pathname&&"/plataformAdministrator"!==window.location.pathname||a(!0),"/subscriptionUpgrade"===window.location.pathname&&a(!0),36!==n[0].length||!u.a.getState().db.cards||u.a.getState().db.cards[n[0]]&&!u.a.getState().db.cards[n[0]]||u.a.getState().db.cards&&u.a.getState().db.cards[n[0]]&&n[0]&&!u.a.getState().db.cards[n[0]]._loadedFeeds&&"bright-and-connected"===n[1]&&a(!0);case 108:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 5:if(!e.sent){e.next=8;break}return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},518:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(724),i=r.n(o),c=r(725),l=r.n(c),s=r(726),u=r.n(s),d=r(727),p=r.n(d),f=r(994),h=r.n(f),m=r(995),g=r.n(m),b=r(996),v=r.n(b),y=r(997),x=r.n(y),_=r(124),O=r.n(_),w=r(998),j=r.n(w),E=r(108),S=r.n(E),k=r(527),L={version:k.version,swot:[{value:"strength",label:"$__strength",icon:"arrow_upward"},{value:"weakness",label:"$__weakness",icon:"arrow_downward"},{value:"opportunity",label:"$__opportunity",icon:"trending_up"},{value:"threat",label:"$__threat",icon:"trending_down"}],languages:[{value:"pt-BR",label:"$__pt-BR"},{value:"en-US",label:"$__en-US"},{value:"es-ES",label:"$__es-ES"}],planType:[{label:"$__strategic",value:null,swot:!0,overview:!0,description:"$__strategicPlanDescription"},{label:"$__flowOrProcess",value:"operational",overview:!1,swot:!1,kanban:!0,description:"$__flowOrProcesPlanDescription"},{label:"$__tacticAndOrOperational",value:"flow",swot:!1,kanban:!1,overview:!0,description:"$__operationalPlanDescription"}],status:[{value:"notStarted",label:"$__notStarted",icon:"query_builder",color:"#929497"},{value:"inProgress",label:"$__inProgress",icon:"play_circle_outline",color:"#011E41"},{value:"awaitAction",label:"$__await",icon:"hourglass_top",color:"pink"},{value:"paused",label:"$__paused",icon:"pause_presentation",color:"#EBA900"},{value:"completed",label:"$__completed",icon:"verified",color:"#5A7F71",props:{periodFilter:!0}}],currency:[{value:"BRL",label:"$__currencyBRL",symbol:"R$"},{value:"USD",label:"$__currencyUSD",symbol:"$"},{value:"EUR",label:"$__currencyEUR",symbol:"\u20ac"}],expiresIn:[{value:"12h",label:"$__12hours"},{value:null,label:"$__6hours"},{value:"3h",label:"$__3hours"},{value:"1h",label:"$__1hour"}],passwordExpire:[{value:"30",label:"$__30days"},{value:"60",label:"$__60days"},{value:"90",label:"$__90days"}],plans:[{value:"p0",label:"$__saasPlanName0",settings:Object(a.a)({space:5368709120,admins:1,price:0,onBoarding:!1,brightAndConnected:{feed:!1,feedDays:!1,radarLimit:25,insight:!1},plan:{activeLimit:2,planClient:!1,clientAdmin:!1,machenPlan:!1,templates:!1,guidelineLimit:2,feedLimit:4,radarLimit:25,insightLimit:25},task:{activeLimit:25,filter:!1,kpi:!1,timeSheet:!1,recurrence:!1},files:{uploadLimit:26214400},chat:{groupUsersLimit:7},support:{email:!0,priority:0,chat:!1},mobile:{},addOn:{learneng:!1,denkenDiscount:0}},"onBoarding",{technician:!1,custom:!1})},{value:"p1",label:"$__saasPlanName1",settings:Object(a.a)({space:26843545600,admins:1,price:149,onBoarding:0,whiteLabel:!1,brightAndConnected:{feed:!0,feedDays:15,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:1,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:104857600},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:5}},"onBoarding",{technician:1e3,custom:4990})},{value:"p2",label:"$__saasPlanName2",settings:Object(a.a)({space:53687091200,admins:9,price:890,onBoarding:4990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:2,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:1e3,custom:4990})},{value:"p3",label:"$__saasPlanName3",settings:Object(a.a)({space:107374182400,admins:19,price:1790,onBoarding:6990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:1e3,custom:4990})},{value:"p4",label:"$__saasPlanName4",settings:Object(a.a)({space:214748364800,admins:49,price:3990,onBoarding:10990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:1e3,custom:4990})},{value:"p5",label:"$__saasPlanName5",settings:Object(a.a)({space:0,admins:0,price:0,onBoarding:0,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}},"onBoarding",{technician:!0,custom:4990})}],type:[{value:"plan",label:"$__plan",icon:"view_comfy",color:null,calendar:!1},{value:"strength",label:"$__strength",icon:"arrow_upward",color:null,calendar:!1},{value:"weakness",label:"$__weakness",icon:"arrow_downward",color:null,calendar:!1},{value:"opportunity",label:"$__opportunity",icon:"trending_up",color:null,calendar:!1},{value:"threat",label:"$__threat",icon:"trending_down",color:null,calendar:!1},{value:"guideline",label:"$__guideline",icon:O.a,color:null,calendar:!0},{value:"guidelineD",label:"$__guidelineD",icon:i.a,color:null,calendar:!0},{value:"guidelineR",label:"$__guidelineR",icon:u.a,color:null,calendar:!0},{value:"guidelineC",label:"$__guidelineC",icon:l.a,color:null,calendar:!0},{value:"guidelineE",label:"$__guidelineE",icon:p.a,color:null,calendar:!0},{value:"objective",label:"$__objective",icon:"gps_fixed",color:null,calendar:!0},{value:"goal",label:"$__goal",icon:"flag",color:null,calendar:!0},{value:"iniciative",label:"$__iniciative",icon:"play_arrow",color:null,calendar:!0},{value:"task",label:"$__task",icon:"fact_check",color:null,calendar:!0},{value:"meeting",label:"$__meeting",icon:"meeting_room",color:null,calendar:!0},{value:"myTask",label:"$__myTask",icon:"person_pin",color:null,calendar:!0},{value:"link",label:"$__radar",icon:"public",color:null,calendar:!0},{value:"insight",label:"$__insight",icon:S.a,color:null,calendar:!0}],dateStatus:[{value:"notStarted",label:"$__notStarted",icon:"query_builder"},{value:"inProgress",label:"$__inProgress",icon:"play_circle_outline"}],priority:[{value:null,label:"$__none",color:"#c6c6c6"},{value:"normal",label:"$__normal",color:"#c6c6c6"},{value:"low",label:"$__low",color:"#faba00"},{value:"medium",label:"$__medium",color:"#ff7c32"},{value:"high",label:"$__high",color:"#ff0000"}],automation:[{value:"doNotChange",label:"$__doNotChange"},{value:"replace",label:"$__replaceWith"},{value:"add",label:"$__add"},{value:"remove",label:"$__remove"}],fileExtensions:[{ext:["jpg","jpeg","jpe","jfif","gif","png","webp","svg","eps"],icon:!1,title:"image",viewer:"img"},{ext:["txt"],icon:"description",title:"Text",viewer:"text"},{ext:["doc","docx","dot","doc","dotx"],icon:h.a,title:"Microsoft Word",viewer:"microsoft"},{ext:["xls","xlt","ooxml","xlsx"],icon:g.a,title:"Microsoft Excel",viewer:"microsoft"},{ext:["ppt","pptx","ppsx","sldx"],icon:v.a,title:"Microsoft PowerPoint",viewer:"microsoft"},{ext:["pdf"],icon:j.a,title:"PDF",viewer:"pdf"},{ext:["aac","wav","ts","smf","ogg","mp3","3gp","caf","m4a"],icon:"audiotrack",title:"audioFile",viewer:"audio"},{ext:["avi","mov","mp4","3gpp"],icon:"movie",title:"movieFile",viewer:"movie"}],access:[{name:"$__admin",permissions:{create:!0,read:!0,run:!0,update:!0,delete:!0,moderate:!0,levels:0}},{name:"$__manager",permissions:{create:!0,read:!0,run:!0,update:!0,delete:!0,moderate:!0,levels:0}},{name:"$__user",permissions:{create:!0,read:!0,run:!0,update:!1,delete:!1,moderate:!1,levels:0}},{name:"$__guest",permissions:{create:!1,read:!0,run:!0,update:!1,delete:!1,moderate:!1,levels:1}}],tag:[],userGroup:[],dataType:[{name:"user",icon:"contact_page",module:"user",reqId:!1,view:{c:{pages:["users"],access:["userAdmin","userModerate","master"]}},hash:null,db:"users",iniModule:"userEdit",modules:["resumeUser","userEdit","access","twoFactor","cards","mobile","settings","delete"],requireFields:["name","email"],hideFields:["independentAccount"],disabledFields:[],data:{type:"user"},sharedIn:{attach:[],copy:[],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"user",icon:"contact_page",module:"user",reqId:!1,view:{c:{pages:["units"],access:["userAdmin","userModerate","master"]}},hash:!0,db:"users",iniModule:"userEdit",modules:["resumeUser","userEdit","access","twoFactor","cards","mobile","settings","delete"],requireFields:["name","email"],hideFields:["independentAccount"],disabledFields:[],data:{type:"user"},sharedIn:{attach:[],copy:[],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"client",title:"unity",icon:"business",module:"user",reqId:!1,view:{c:{pages:["units"],access:["userAdmin","userModerate"],noId:!0}},hash:null,db:"cards",iniModule:"userEdit",modules:["userEdit","delete","settings"],requireFields:["name"],disabledFields:["email"],hideFields:[],data:{type:"client"}},{name:"step",icon:"123",module:"step",reqId:!0,db:"cards",iniModule:"columnEdit",modules:["columnEdit","users","flow","delete","log","settings"],requireFields:["name"],disabledFields:[],fieldsTitle:{name:"$__columnName",placeholder:"$__columnPlaceholder"},sharedIn:{attach:[],copy:[],shared:[]}},{name:"chatGroup",icon:"group_work",module:"chat",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["cardEdit","users","files","delete","log"],hideFields:["image","progress","status","tags","deadline","priority","recurrence","plan"],requireFields:["name"],disabledFields:[],fieldsTitle:{name:"$__groupName",placeholder:"$__groupNamePlaceholder"},sharedIn:{attach:[],copy:[],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"feed",icon:"rss_feed",module:"feeds",reqId:!1,view:{"bright-and-connected":{pages:["feeds"]},sp:{pages:["bright-and-connected"]}},db:"feeds",iniModule:"feedEdit",modules:["resumeFeed","feedEdit"],disabledFields:[],data:{status:"notStarted"},sharedIn:{attach:[],copy:["plan","client"],shared:[]}},{name:"link",icon:"public",module:"insights",reqId:!0,view:{"bright-and-connected":{pages:["radar"]},sp:{pages:["radar"]}},hash:null,db:"cards",iniModule:"link",modules:["resumeLink","cardEdit","checklist","steps","timeline","sendTo","log","users","files","timeLog","settings","delete","myDay"],hideFields:["image","status","client","recurrence"],disabledFields:["url"],data:{status:"notStarted"},sharedIn:{attach:["plan","client"],copy:["plan","client"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"insight",icon:S.a,module:"insights",reqId:!0,view:{"bright-and-connected":{pages:["insight-boards"]},sp:{pages:["insight-boards"]}},hash:null,db:"cards",iniModule:"cardEdit",modules:["resumeLink","cardEdit","checklist","timeline","sendTo","log","users","files","timeLog","settings","delete","myDay"],hideFields:["image","status","client","recurrence"],data:{status:"notStarted"},sharedIn:{attach:["plan","client"],copy:["plan","client"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"plan",icon:"view_comfy",module:"plan",reqId:!1,view:{sp:{pages:["StrategyAndPlans","home"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","steps","timeline","users","sendTo","log","files","timeLog","delete","settings"],hideFields:["image","recurrence"],requireFields:["name"],disabledFields:[],data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:[],copy:["client"],shared:[]},fieldsTitle:{name:"$__planName",placeholder:"$__setPlanName"}},{name:"plan",icon:"tips_and_updates",module:"plan",reqId:!1,view:{sp:{pages:["templates"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","steps","templateOptions","steps","timeline","files","delete"],hideFields:["image","recurrence"],requireFields:["name"],disabledFields:[],data:{status:"notStarted"},fieldsTitle:{name:"$__planName",placeholder:"$__setPlanName"}},{name:"objective",icon:"gps_fixed",module:"planning",myTasks:!0,reqId:!0,view:{sp:{pages:["objectives"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:["plan","guideline","guidelineD","guidelineR","guidelineE","guidelineC"],copy:["plan","guideline","guidelineD","guidelineR","guidelineE","guidelineC"],shared:["plan","guideline","guidelineD","guidelineR","guidelineE","guidelineC"]}},{name:"goal",icon:"flag",module:"planning",myTasks:!0,reqId:!0,view:{sp:{pages:["goals"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:["plan","objective"],copy:["plan","objective"],shared:["plan","objective"]}},{name:"iniciative",icon:"play_arrow",module:"agile",myTasks:!0,reqId:!0,view:{sp:{pages:["agile","actions","dashboard"]},t:{pages:["myDay","ourDay","allTasks","unlinkedCards","myTasks"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","goal","iniciative","task","meeting","myTask"],copy:["plan","goal","iniciative","task","meeting","myTask"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"myTask",alias:"task",icon:"person_pin",module:"myTasks",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","sendTo","myDay","client","log","files","timeLog","settings","delete"],hideFields:["image"],disabledFields:[],sendTo:!0,myTasks:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"],copy:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"task",icon:"fact_check",module:"agile",myTasks:!0,reqId:!0,view:{sp:{pages:["agile","actions","dashboard"]},t:{pages:["myDay","ourDay","allTasks","unlinkedCards","myTasks"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","goal","iniciative","task","meeting","myTask"],copy:["plan","goal","iniciative","task","meeting","myTask"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"meeting",icon:"meeting_room",module:"agile",myTasks:!0,reqId:!0,view:{sp:{pages:["agile","actions","dashboard"]},t:{pages:["myDay","ourDay","allTasks","unlinkedCards","myTasks"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","myDay","budget","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name","startDate"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","goal","iniciative","task","meeting","myTask"],copy:["plan","goal","iniciative","task","meeting","myTask"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"strength",icon:"arrow_upward",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"weakness",icon:"arrow_downward",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"opportunity",icon:"trending_up",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"threat",icon:"trending_down",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guideline",icon:O.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["client"],disabledFields:[],sendTo:!0,view:{sp:{pages:["guidelines","matrix"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineD",icon:i.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineR",icon:u.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineE",icon:p.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineC",icon:l.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"swot",icon:x.a,db:"cards",hash:["matrix"]},{name:"matrix",icon:O.a,db:"cards",hash:["matrix"]}],cards:{},users:{},feeds:{},notifications:{},loaded:!1,viewList:!1,myTasksMenuExpanded:!1,adminView:!1,adminViewLoader:!1,orderByTitle:!0,orderByTitlePosition:"ASC",groupByColor:!1};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;return"SET_DB"===t.action&&t.value?Object(n.a)(Object(n.a)({},e),t.value):e}},527:function(e){e.exports=JSON.parse('{"name":"machen","version":"3.1.118","private":true,"dependencies":{"@date-io/date-fns":"1.3.13","@emotion/react":"^11.9.0","@emotion/styled":"^11.8.1","@fortawesome/react-fontawesome":"^0.1.14","@material-ui/core":"^4.11.0","@material-ui/icons":"^4.5.1","@material-ui/lab":"^4.0.0-alpha.56","@material-ui/pickers":"^3.2.10","@mui/material":"^5.8.1","@nivo/bar":"^0.70.1","@nivo/bullet":"^0.79.1","@nivo/circle-packing":"^0.70.1","@nivo/core":"^0.70.1","@nivo/pie":"^0.70.1","@nivo/sankey":"^0.70.1","@reactour/mask":"^1.0.4","@reactour/popover":"^1.0.5","@reactour/tour":"^2.13.0","@reactour/utils":"^0.4.7","autonumeric":"^4.6.2","axios":"^0.21.1","base-64":"^1.0.0","bcryptjs":"^2.4.3","browser-image-compression":"^1.0.14","chartist":"^0.10.1","chartist-plugin-tooltip":"0.0.11","chartist-plugin-tooltips":"0.0.17","chartist-plugin-tooltips-updated":"^0.1.3","compress":"^0.99.0","cpf-cnpj-validator":"^1.0.3","crypto-js":"^4.0.0","date-fns":"^2.16.1","dotenv":"^6.2.0","draft-js":"^0.11.7","draftjs-to-html":"^0.9.1","emoji-picker-react":"^3.4.7","fg-loadcss":"^3.1.0","file-saver":"^1.3.3","history":"4.9.0","html-to-draftjs":"^1.5.0","import":"0.0.6","install":"^0.13.0","jquery":"^3.5.1","jwt-decode":"^3.1.2","material-table":"^1.69.0","memoize-one":"^6.0.0","moment":"2.24.0","moment-timezone":"^0.5.31","node-sass":"^4.13.1","nouislider":"14.0.2","npm":"^7.6.0","pdf-lib":"^1.16.0","perfect-scrollbar":"1.4.0","react":"^18.2.0","react-aspect-ratio":"^1.1.2","react-audio-player":"^0.17.0","react-beautiful-dnd":"^13.1.1","react-big-calendar":"^1.5.0","react-bootstrap-sweetalert":"4.4.1","react-chartist":"0.13.3","react-color":"^2.19.3","react-contextmenu":"^2.14.0","react-cookie":"^4.1.1","react-credit-cards":"^0.8.3","react-cropper":"^1.3.0","react-custom-scroll":"^4.2.1","react-data-export":"^0.6.0","react-datepicker":"^4.8.0","react-datetime":"2.16.3","react-doc-viewer":"^0.1.5","react-dom":"^16.9.0","react-draft-wysiwyg":"^1.15.0","react-easy-swipe":"0.0.18","react-export-excel":"^0.5.3","react-fetch-preloader":"0.0.3","react-file-drop":"^3.0.7","react-file-viewer":"^1.2.1","react-google-login":"^5.2.2","react-image-file-resizer":"^0.4.7","react-jvectormap":"0.0.12","react-keyed-file-browser":"^1.10.0","react-loading-skeleton":"^3.0.1","react-mentions":"^4.1.1","react-nestable":"^2.0.0","react-number-format":"^4.4.1","react-popper":"^2.2.4","react-render-html":"^0.6.0","react-responsive-carousel":"^3.2.23","react-router-dom":"5.0.1","react-router-redux":"^4.0.8","react-scripts":"^3.4.3","react-select":"^3.1.0","react-sound":"^1.2.0","react-swipeable-views":"0.13.3","react-table":"6.10.0","react-tagsinput":"3.19.0","react-textarea-autosize":"^8.4.0","react-toastify":"9.0.0","react-virtualized":"^9.22.3","react-virtuoso":"^3.1.5","react-window-infinite-loader":"^1.0.8","reactjs-pdf-reader":"^1.0.12","reactour":"^1.18.7","redux-saga":"^1.1.3","socket.io-client":"^4.4.1","styled-components":"^5.2.0","utf-8-validate":"^5.0.9","utf8":"^3.0.0","uuid":"^8.3.2"},"scripts":{"start":"react-scripts start","build":"react-scripts build && gulp licenses","test":"react-scripts test --env=jsdom","eject":"react-scripts eject","deploy":"npm run build","lint:check":"eslint . --ext=js,jsx; exit 0","lint:fix":"eslint . --ext=js,jsx --fix; exit 0","install:clean":"rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start","compile-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.css","minify-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.min.css --output-style compressed","map-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.css --source-map true"},"optionalDependencies":{"@types/googlemaps":"3.37.3","@types/markerclustererplus":"2.1.33","ajv":"6.10.2","typescript":"3.5.3"},"devDependencies":{"envify":"^4.1.0","eslint-config-prettier":"6.0.0","eslint-plugin-prettier":"3.1.0","gulp":"^4.0.2","gulp-append-prepend":"1.0.8","prettier":"1.18.2","terser":"^5.14.1","terser-brunch":"^4.1.0","uglifyify":"^5.0.2"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":[]}}')},544:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(19),i=r(14),c=(r(32),r(3),r(12)),l=r(13),s=r(426),u=r(1),d=r(21),p=Object(s.a)((function(e){return{iconButtonStyle:{margin:0,marginTop:"-8px",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));t.a=Object(l.b)((function(e,t){return{cards:e.db.cards[t.nodeId],timeline:e.timeline[t.nodeId]}}),(function(e){return Object(c.b)(i,e)}))((function(e){var t=p();a.a.useEffect((function(){return function(){}}),[]);var r=Object(d.k)(e.nodeId);return r.total<1?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{top:0,zIndex:0}},a.a.createElement(o.a,{className:t.iconButtonStyle,badgeContent:r.total,color:Object(u.d)("menu"),icon:0===r.total?"notifications_none":"notifications_active",size:"17px",transparent:!0}))}))},545:function(e,t,r){var n=r(294),a={data:{},options:{lineSmooth:n.Interpolation.cardinal({tension:0}),low:0,high:100,chartPadding:{top:0,right:0,bottom:0,left:0}}},o={data:{labels:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],series:[[542,443,320,780,553,453,326,434,568,610,756,895],[150,133,440,199,799,100,499,657,50,352,117,400],[900,700,800,600,100,200,700,400,410,333,355,499]]},options:{axisX:{showGrid:!1},low:0,high:1e3,chartPadding:{top:0,right:5,bottom:0,left:0}},responsiveOptions:[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]],animation:{draw:function(e){"bar"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},i={data:{labels:["12am","3pm","6pm","9pm","12pm","3am","6am","9am"],series:[[230,750,450,300,280,240,200,190]]},options:{lineSmooth:n.Interpolation.cardinal({tension:0}),low:0,high:1e3,chartPadding:{top:0,right:0,bottom:0,left:0}},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},c={data:{labels:["M","T","W","T","F","S","S"],series:[[12,17,7,17,23,18,38]]},options:{lineSmooth:n.Interpolation.cardinal({tension:10}),axisX:{showGrid:!1},low:0,high:50,chartPadding:{top:0,right:0,bottom:0,left:0},showPoint:!1},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},l={data:{labels:["'07","'08","'09","'10","'11","'12","'13","'14","'15"],series:[[10,16,8,13,20,15,20,34,30]]},options:{lineSmooth:n.Interpolation.cardinal({tension:0}),low:0,high:50,chartPadding:{top:0,right:0,bottom:0,left:0},classNames:{point:"ct-point ct-white",line:"ct-line ct-white"}},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},s={data:{labels:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],series:[[542,443,320,780,553,453,326,434,568,610,756,895]]},options:{seriesBarDistance:10,axisX:{showGrid:!1}},responsiveOptions:[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]],animation:{draw:function(e){"bar"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},u={data:{labels:["'06","'07","'08","'09","'10","'11","'12","'13","'14","'15"],series:[[287,480,290,554,690,690,500,752,650,900,944]]},options:{lineSmooth:n.Interpolation.cardinal({tension:10}),axisY:{showGrid:!0,offset:40},axisX:{showGrid:!1},low:0,high:1e3,showPoint:!0,height:"300px"},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},d={data:{labels:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],series:[[542,443,320,780,553,453,326,434,568,610,756,895],[412,243,280,580,453,353,300,364,368,410,636,695]]},options:{seriesBarDistance:10,axisX:{showGrid:!1},height:"300px"},responsiveOptions:[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]],animation:{draw:function(e){"bar"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},p={data:{labels:["'06","'07","'08","'09","'10","'11","'12","'13","'14","'15"],series:[[287,385,490,554,586,698,695,752,788,846,944],[67,152,143,287,335,435,437,539,542,544,647],[23,113,67,190,239,307,308,439,410,410,509]]},options:{lineSmooth:n.Interpolation.cardinal({tension:10}),axisY:{showGrid:!0,offset:40},axisX:{showGrid:!1},low:0,high:1e3,showPoint:!0,height:"300px"},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}};e.exports={model:a,emailsSubscriptionChart:o,completedTasksChart:i,roundedLineChart:c,straightLinesChart:l,simpleBarChart:s,colouredLineChart:u,multipleBarsChart:d,colouredLinesChart:p,pieChart:{data:{labels:["62%","32%","6%"],series:[62,32,6]},options:{height:"230px"}}}},546:function(e,t,r){"use strict";var n,a=r(7),o=r(2),i=r(4),c=r(1),l={container:Object(o.a)(Object(o.a)({},i.l),{},(n={position:"relative",border:"0.5px solid ".concat(Object(c.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"},Object(a.a)(n,"padding","3px"),Object(a.a)(n,"minWidth","150px"),Object(a.a)(n,"display","flow-root"),n)),cardContainer:Object(o.a)(Object(o.a)({},i.l),{},{position:"relative",minWidth:"150px",display:"flow-root"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(c.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(c.d)("color"),fontWeight:"500",alignItems:"center"}},infos:{position:"absolute",float:"left",width:"100%",height:"auto",display:"block"},description:{position:"relative",float:"left",padding:"5px",width:"100%",overflow:"hidden"},dates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(c.d)("medium"),fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{position:"relative",minHeight:"20px",minWidth:"40px",float:"right"},users:{position:"absolute",bottom:"7px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};t.a=l},576:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},599:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},640:function(e,t,r){},69:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(2),a=r(6),o=r(0),i=r.n(o),c=r(747),l=r(746),s=r(426),u=r(23),d=r(748),p=r(1),f=Object(s.a)((function(){return{customColor:{display:"flex",alignItems:"center","& .MuiBadge-badge":{backgroundColor:Object(p.d)("color"),color:Object(p.d)("light"),display:"flex",alignItems:"center",zIndex:"1500 !important"}},root:{"& .MuiBadge-badge":{display:"flex",alignItems:"center",zIndex:20}}}})),h=Object(u.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",fontSize:e.typography.pxToRem(12),border:"1px solid #dadde9",borderRadius:"7px",boxShadow:"0 0 3px 3px rgba(0,0,0,0.03)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"1000 !important"}}}))(l.a);function m(e){var t=f(),r=i.a.useState(e.badgeVisible||!1),o=Object(a.a)(r,2),l=o[0],s=o[1],u=i.a.useState(e.tooltipprops&&e.tooltipprops.open?e.tooltipprops.open:(!e.tooltipprops||"false"!==String(e.tooltipprops.open))&&void 0),m=Object(a.a)(u,2),g=m[0],b=m[1];return i.a.useEffect((function(){e&&e.tooltipprops&&e.tooltipprops.open&&!g&&b(!0),e&&e.tooltipprops&&g&&"false"===String(e.tooltipprops.open)&&b(!1)})),i.a.createElement("div",{className:t.root},i.a.createElement(h,{title:e.title&&"string"===typeof e.title?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{color:Object(p.d)("darkText"),display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",height:"auto"}},Object(p.r)(e.title,1))):e.title?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.customColor},i.a.createElement("div",{style:{position:"relative"}},e.title,e.onClose&&i.a.createElement(c.a,{style:{position:"absolute",left:"5px",top:"0px",zIndex:10,cursor:"pointer"},onClick:function(){return e.onClose()},title:"close"},"close")))):"",className:null,open:g,disableFocusListener:!(!e.tooltipprops||!e.tooltipprops.disableFocusListener)&&e.tooltipprops.disableFocusListener,disableHoverListener:!(!e.tooltipprops||!e.tooltipprops.disableHoverListener)&&e.tooltipprops.disableHoverListener,disableTouchListener:!(!e.tooltipprops||!e.tooltipprops.disableTouchListene)&&e.tooltipprops.disableTouchListene,onClose:function(){e.tooltipprops&&e.tooltipprops.onClose&&e.tooltipprops.onClose()},interactive:!("string"===typeof e.title||!e.tooltipprops||!e.tooltipprops.interactive)&&e.tooltipprops.interactive},i.a.createElement(d.a,{overlap:"rectangular",badgeContent:e.count,style:{opacity:1,fontSize:"5px"},max:e.max||9,anchorOrigin:{vertical:"top",horizontal:"right"},invisible:e.count&&!l},"string"===typeof e.icon?i.a.createElement(c.a,{onMouseEnter:function(){return!e.badgeVisible&&s(!0)},onMouseLeave:function(){return!e.badgeVisible&&s(!1)},onClick:e.onClick?function(t){e.onClick(),t.stopPropagation()}:null,className:e.className,style:Object(n.a)({width:e.size?e.size:"fit-content",height:e.size?e.size:"fit-content",fontSize:e.size||"22px",color:e.color||Object(p.d)("medium"),opacity:!e.disabled||l?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)},e.icon):i.a.createElement(e.icon,{onMouseEnter:function(){return!e.badgeVisible&&s(!0)},onMouseLeave:function(){return!e.badgeVisible&&s(!1)},onClick:e.onClick?function(t){e.onClick(),t.stopPropagation()}:null,className:e.className,style:Object(n.a)({width:e.size||"22px",height:e.size||"22px",fontSize:e.size||"22px",color:e.color||Object(p.d)("medium"),opacity:!e.disabled||l?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)}))))}},708:function(e,t,r){"use strict";var n=r(2),a={sideModuleWindow:!1,period:"$__last7Days",users:{},showDeleted:!1,hidePrivate:!1,lockPrivate:!1,unlockedPrivates:0,board:null,toCopyMove:null,addCard:{},agileOrderBy:"name",agileOrderDesc:"DESC"};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0;return"SET_CONTROL"===t.action&&t.value?Object(n.a)(Object(n.a)({},e),t.value):"RESET_CONTROLS"===t.action?Object(n.a)({},e):e}},724:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M.2,11.6H0V17H.2c0,.1,0,.1.1.1H1L18,.4H16.4L1.1,15.7V12.2L12.9.4H11.3L.2,11.6Z"}),a.default.createElement("path",{d:"M.2,11.6H0V17H.2c0,.1,0,.1.1.1H1L18,.4H16.4L1.1,15.7V12.2L12.9.4H11.3L.2,11.6Z"}),a.default.createElement("path",{d:"M0,1V7.1H0c.1,0,.1,0,.1.1H.4a.1.1,0,0,0,.1.1H1L7.1,1.4h0l1-1H.6A.6.6,0,0,0,0,1Z"})),"GuidelineC");t.default=o},725:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M17.8,6.4H18V1H17L0,17.6H1.6L16.9,2.3V5.8L5.1,17.6H6.7L17.8,6.4Z"}),a.default.createElement("path",{d:"M17.8,6.4H18V1H17L0,17.6H1.6L16.9,2.3V5.8L5.1,17.6H6.7L17.8,6.4Z"}),a.default.createElement("path",{d:"M18,17V10.9H17l-6.1,6.1h0l-1,1h7.5A.6.6,0,0,0,18,17Z"})),"GuidelineD");t.default=o},726:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M6.4.2H.6l17,17V16.4L2.3,1.1H5.8L17.6,12.9V11.3L6.4.2Z"}),a.default.createElement("path",{d:"M6.4.2H.6l17,17V16.4L2.3,1.1H5.8L17.6,12.9V11.3L6.4.2Z"}),a.default.createElement("path",{d:"M17,0H10.5l6.1,6.1h0l1,1V.6A.6.6,0,0,0,17,0Z"})),"GuidelineE");t.default=o},727:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M11.6,17.8h5.8c.1,0,.1,0,.1-.1h-.1L.4,0V1.6L15.7,16.9H12.2L.4,5.1V6.7L11.6,17.8Z"}),a.default.createElement("path",{d:"M11.6,17.8h5.8c.1,0,.1,0,.1-.1h-.1L.4,0V1.6L15.7,16.9H12.2L.4,5.1V6.7L11.6,17.8Z"}),a.default.createElement("path",{d:"M1,18H7.3c0-.1,0-.1.1-.1h.1a.1.1,0,0,0,.1-.1h0a.1.1,0,0,0,.1-.1H7.6a.1.1,0,0,1-.1-.1h0L1.4,10.9h0l-1-1v7.5A.6.6,0,0,0,1,18Z"})),"GuidelineR");t.default=o},728:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},830:function(e,t,r){},91:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},924:function(e,t,r){},994:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},995:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},996:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},997:function(e,t,r){var n=r(61);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(112)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M0 5.22H6.6V6.32H0z"}),a.default.createElement("path",{d:"M8.8 5.22H15.4V6.32H8.8z"}),a.default.createElement("path",{d:"M17.6 5.22H24.200000000000003V6.32H17.6z"}),a.default.createElement("path",{d:"M26.4 5.22H33V6.32H26.4z"}),a.default.createElement("path",{d:"M0 0H6.6V3.03H0z"}),a.default.createElement("path",{d:"M8.8 0H15.4V3.03H8.8z"}),a.default.createElement("path",{d:"M17.6 0H24.200000000000003V3.03H17.6z"}),a.default.createElement("path",{d:"M26.4 0H33V3.03H26.4z"}),a.default.createElement("path",{d:"M0 7.58H6.6V8.68H0z"}),a.default.createElement("path",{d:"M8.8 7.58H15.4V8.68H8.8z"}),a.default.createElement("path",{d:"M17.6 7.58H24.200000000000003V8.68H17.6z"}),a.default.createElement("path",{d:"M26.4 7.58H33V8.68H26.4z"}),a.default.createElement("path",{d:"M0 9.94H6.6V11.04H0z"}),a.default.createElement("path",{d:"M8.8 9.94H15.4V11.04H8.8z"}),a.default.createElement("path",{d:"M17.6 9.94H24.200000000000003V11.04H17.6z"}),a.default.createElement("path",{d:"M26.4 9.94H33V11.04H26.4z"}),a.default.createElement("path",{d:"M0 12.3H6.6V13.4H0z"}),a.default.createElement("path",{d:"M8.8 12.3H15.4V13.4H8.8z"}),a.default.createElement("path",{d:"M26.4 12.3H33V13.4H26.4z"}),a.default.createElement("path",{d:"M0 14.65H6.6V15.75H0z"}),a.default.createElement("path",{d:"M8.8 14.65H15.4V15.75H8.8z"}),a.default.createElement("path",{d:"M26.4 14.65H33V15.75H26.4z"}),a.default.createElement("path",{d:"M0 17.01H6.6V18.110000000000003H0z"}),a.default.createElement("path",{d:"M8.8 17.01H15.4V18.110000000000003H8.8z"}),a.default.createElement("path",{d:"M26.4 17.01H33V18.110000000000003H26.4z"}),a.default.createElement("path",{d:"M0 19.37H6.6V20.470000000000002H0z"}),a.default.createElement("path",{d:"M26.4 19.37H33V20.470000000000002H26.4z"})),"SWOT");t.default=o},998:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},999:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"}},[[1093,1,2]]]);
//# sourceMappingURL=main.7c030ecc.chunk.js.map