MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/public_html/WC/static/js/main.7618c2e7.chunk.js
/*! For license information please see main.7618c2e7.chunk.js.LICENSE.txt */
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[0],{1:function(e,t,r){"use strict";r.d(t,"t",(function(){return w})),r.d(t,"s",(function(){return P})),r.d(t,"r",(function(){return M})),r.d(t,"l",(function(){return z})),r.d(t,"v",(function(){return G})),r.d(t,"a",(function(){return R})),r.d(t,"b",(function(){return I})),r.d(t,"c",(function(){return j})),r.d(t,"d",(function(){return _})),r.d(t,"e",(function(){return E})),r.d(t,"f",(function(){return L})),r.d(t,"g",(function(){return F})),r.d(t,"h",(function(){return k})),r.d(t,"i",(function(){return Y})),r.d(t,"j",(function(){return D})),r.d(t,"k",(function(){return B})),r.d(t,"m",(function(){return x})),r.d(t,"n",(function(){return S})),r.d(t,"o",(function(){return T})),r.d(t,"p",(function(){return y})),r.d(t,"q",(function(){return C})),r.d(t,"u",(function(){return A})),r.d(t,"w",(function(){return v})),r.d(t,"x",(function(){return O}));var n=r(10),a=r(8),o=r(2),i=r(0),c=r.n(i),l=r(186),s=r(73),u=r.n(s),d=r(6),p=r.n(d),f=r(3),h=r(20),m=r(38);function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var b=window.location.hostname.indexOf("a1b2c3d4")>-1||window.location.hostname.indexOf("localhost")>-1,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(" ").forEach((function(e,t){if(e&&e.indexOf("$__")>-1){var n=e.replace("$__","").trim().toLowerCase();if(b&&!r[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}var w=function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""};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 j(){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 E=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},k=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}))))},L=function(){var e=Object(n.a)(g().mark((function e(t,r){var n,i,c;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=f.a.getState(),i=n.db,c="cards",i.cards[r._id]?c="cards":i.users[r._id]&&(c="users"),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},f.a.getState().db),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},f.a.getState().db[c]),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},f.a.getState().db[c][r._id]),{},{deleted:!0}))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),C=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}!1===a&&(r+=e.substr(n,1))}return r},I=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)}})}))," ")},T=function(e){var t=y(e).split("\n"),r="";return t.forEach((function(e){e.split(" ").forEach((function(e){var t=e.split("\n");if(t.length>0)t.forEach((function(e){if(e.indexOf(".youtube.com/watch?")>-1){var t=e.split("?")[1].split("v=")[1].split("&")[0];t&&(r+='<iframe title="outModule" 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 title="outModule" 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" rel="noopener noreferrer">').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 title="outModule" 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" rel="noopener noreferrer">').concat(t[0]," </a>"):r+="".concat(e," ")})),r+=""})),r},D=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=arguments;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.length>2&&void 0!==n[2]&&n[2])try{m.a.delete("/node/favorite/".concat(r))}catch(t){console.log(t)}else try{m.a.put("/node/favorite",{_id:r})}catch(t){console.log(t)}case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),N=function(e){for(var t=e;1===t.length;)t="0"+t;return t},A=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 0===c.indexOf("#")&&(c=c.slice(1)),3===c.length&&(c=c[0]+c[0]+c[1]+c[1]+c[2]+c[2]),c.length,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))};function P(e,t){return void 0!==e?e.length<=t?e:e.slice(0,t-3)+"...":e}function $(e){var t,r=0;for(t=0;t<(null===e||void 0===e?void 0:e.length);t+=1)r=(null===e||void 0===e?void 0:e.charCodeAt(t))+((r<<5)-r);var n="#";for(t=0;t<3;t+=1){n+="00".concat((r>>8*t&255).toString(16)).slice(-2)}return n}function M(e){return{sx:{bgcolor:$(e)},children:"".concat(null===e||void 0===e?void 0:e.slice(0,2))}}var B=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;return r=(null===e||void 0===e?void 0:e.low)?parseInt(e.low):parseInt(e),t?p()(1e3*r).tz("America/Sao_Paulo").format(t):p()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM/YYYY")?p()(1e3*r).tz("America/Sao_Paulo").format("H:mm"):p()(new Date).tz("America/Sao_Paulo").format("YYYY")===p()(1e3*r).tz("America/Sao_Paulo").format("YYYY")?p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM H:mm"):p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")};function z(e){function t(e){return e<=9&&(e="0"+e),e}return t(Math.round(e/3600))+":"+t(Math.round(e%3600/60))+":"+t(e%3600%60)}function Y(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 R(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]}function G(e){var t=e,r="",n=0,a=0,o=0;return e<60?r="".concat(t," ").concat(v("$__seconds",1)):e>3600?(t-=3600*(n=Math.ceil(Math.trunc(t/3600))),t-=60*(a=Math.ceil(Math.trunc(t/60)>0?Math.trunc(t/60):0)),o=Math.ceil(t>0?t:0),r="".concat(n," hora").concat(n>1?"s":""," ").concat(a," ").concat(v("$__minutes",1)," ").concat(o," ").concat(v("$__seconds",1))):(t-=60*(a=Math.ceil(Math.trunc(t/60)>0?Math.trunc(t/60):0)),o=Math.ceil(t>0?t:0),r="".concat(a," ").concat(v("$__minutes",1)," ").concat(o," ").concat(v("$__seconds",1))),{total:r,hours:n,minutes:a,seconds:o}}},101:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(916),l=r(135),s=r(165),u=r(34),d=r(405),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=e.tooltipprops&&e.tooltipprops.open?e.tooltipprops.open:(!e.tooltipprops||"false"!==String(e.tooltipprops.open))&&void 0;return 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.w)(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:u,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)}))))}},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(916),c=r(121),l=r(1);function s(e){return o.a.createElement(c.a,{title:e.title?Object(l.w)(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}))}},1118:function(e,t,r){},1134:function(e,t,r){},1153:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},1154:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},1155:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},1156:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},1157:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},1158:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"},1177:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},1178:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},1181: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="},1190:function(e,t,r){"use strict";(function(e){var n,a=r(2),o=r(88),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(71),d=r(15),p=r(3),f=r(13),h=r(14),m=r(101),g=r(198),b=r(687),v=r(121),y=r(11),x=r(343),w=r(34),_=r(689),O=r(1),j=u.b.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(O.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)(_.a)((function(t){var r,n,o=t.classes,i=p.a.getState().db,l=c.a.useRef(!0);c.a.useEffect((function(){return l.current=!0,function(){l.current=!1}}),[]);var u=t.data&&t.data._id?p.a.getState().db.cards[t.data._id]:{};"Teste - MKT GJP"===u.name&&console.log(u,p.a.getState().db.cards[u._parent]);var d=Object.keys(p.a.getState().db.cards).filter((function(e){return p.a.getState().db.cards[e]&&u&&u._parent&&p.a.getState().db.cards[u._parent]&&p.a.getState().db.cards[e]._parent===p.a.getState().db.cards[u._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(j,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:u.isDragDisable||t.isDragDisable||!1,inLine:t.inLine||null,className:o.container,selectable:t.showSelected||!1,selected:u._selected||!1,priority:u.priority?i.priority.filter((function(e){return String(e.value)===String(u.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:u._id,module:"cardEdit",activeModule:p.a.getState().db.dataType.filter((function(e){return e.name===u.type}))[0].iniModule||e,data:u}))}}),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"}},u.name?u.name:Object(O.w)("$__new",1),c.a.createElement("div",{style:{fontSize:10,color:"gray"}},Object(O.w)("$__createdAt"),":",Object(O.k)(u.created_at)),c.a.createElement(b.a,{nodeId:u._id})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},c.a.createElement("div",null,Object(O.w)("$__step","*")," ",d.findIndex((function(e){return e._id===u._parent}))+1," ",Object(O.w)("$__of")," ",d.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}},d.map((function(e,t){return c.a.createElement(v.a,{arrow:!0,key:e._id,title:c.a.createElement("div",null,e.name," (",d.findIndex((function(e){return e._id===u._parent}))>t?Object(O.w)("$__completed"):d.findIndex((function(e){return e._id===u._parent}))===t?Object(O.w)("$__".concat(u.status)):Object(O.w)("$__waitingForPreviousStep"),")")},c.a.createElement("div",{key:e._id,style:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({height:7},d.findIndex((function(e){return e._id===u._parent}))>t?{backgroundColor:"#02b915"}:{}),d.findIndex((function(e){return e._id===u._parent}))===t?{backgroundColor:"#00a2e9"}:{}),d.findIndex((function(e){return e._id===u._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(O.w)("$__".concat(u.status),"*"))},c.a.createElement("div",null,c.a.createElement(y.a,{color:u.status&&p.a.getState().db.status.filter((function(e){return e.value===u.status}))[0].color||null},p.a.getState().db.status.filter((function(e){return e.value===u.status}))[0].icon))))),c.a.createElement("div",{style:{width:"100%",padding:"7px",clear:"both"}},(u.startDate||u.endDate||u.startDate||u.endDate)&&c.a.createElement("div",{className:o.dates},u.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*u.startDate)instanceof Date&&!isNaN(new Date(1e3*u.startDate))?s()(new Date(1e3*u.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(u.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),u.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*u.endDate)instanceof Date&&!isNaN(new Date(1e3*u.endDate))?s()(new Date(1e3*u.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(u.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))),u&&u._users&&Object.keys(u._users).length>1&&c.a.createElement("div",{className:o.usersContent},c.a.createElement("div",{className:o.users},c.a.createElement(x.a,{_id:u._id,data:u,transparent:!0,myDay:!0,limit:3})))),c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},c.a.createElement(g.a,{options:u._tags,showOptions:!0})))))})))}).call(this,r(632)(e))},1191:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},1192:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},1195:function(e,t,r){e.exports=r.p+"static/media/sample.ab31b41d.xlsx"},1196:function(e,t,r){e.exports=r.p+"static/media/sampleoptions.65339041.xlsx"},1208:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},1209:function(e,t,r){e.exports=r.p+"static/media/mentionNotification.5a7d9f42.mp3"},121:function(e,t,r){"use strict";var n=r(34),a=r(135),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},122:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(11),l=r(150),s=r(405),u=r(495),d=r(569),p=r(568),f=r(359),h=r(294),m=r(755),g=r(360),b=r(567),v=r(135),y=r(165),x=r(1);t.a=Object(o.memo)((function(e){var t=Object(y.a)((function(e){return{iconButtonStyleTransaparent:{padding:"3px 3px 3px 3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.33)"}},iconButtonStyleWhite:{padding:"3px 3px 3px 3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.33)"},border:"solid 1px rgb(130,130,130)"},active:{padding:"3px 3px 3px 3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.33)"},border:"solid 1px ".concat(Object(x.d)("color")),backgroundColor:"#FFFFFF"}}}))(),r=i.a.useState(!1),o=Object(a.a)(r,2),w=o[0],_=o[1],O=i.a.useRef(null),j=function(t){t&&t.target&&t.target.className&&"string"===typeof t.target.className&&t.target.className.indexOf("ignoreClickAway")>-1||document.getElementById("MuiDialog-container")&&document.getElementById("MuiDialog-container").querySelectorAll("div.ignoreClickAway")||setTimeout((function(){_(!1),e.onClose&&e.onClose()}),100)};function E(t){"Tab"===t.key&&(t.preventDefault(),_(!1),e.onClose&&e.onClose())}return i.a.createElement("div",{style:Object(n.a)(Object(n.a)({},e.style?e.style:{}),e.onClick?{cursor:"pointer"}:{}),onClick:e.onClick?function(){e.onClick()}:null},i.a.createElement("div",{style:Object(n.a)({display:"flex",alignItems:"center"},e.onClick?{pointerEvents:"none"}:{})},i.a.createElement(v.a,{title:Object(x.w)("$__options",1)},e.hideText?i.a.createElement(f.a,{ref:O,"aria-controls":w?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){_((function(e){return!e})),!w&&e.onOpen&&e.onOpen(),w&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.active?t.active:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(c.a,{usePropagation:!0,size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"})):i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(u.a,{ref:O,"aria-controls":w?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){_((function(e){return!e})),!w&&e.onOpen&&e.onOpen(),w&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.active?t.active:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement("div",{style:Object(n.a)({display:"flex",alignItems:"center",pointerEvents:"none"},e.icon?{}:{paddingLeft:7})},e.icon?i.a.createElement("div",{style:{marginTop:-2,marginRight:7}},i.a.createElement(c.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon})):i.a.createElement(i.a.Fragment,null),i.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(x.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text||"BUTTON_NAME"),e.popper||e.options?i.a.createElement(c.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:"arrow_drop_down"}):i.a.createElement(i.a.Fragment,null)))))),e.popper||e.options?i.a.createElement(b.a,{open:w,anchorEl:O.current,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps,a=t.placement;return i.a.createElement(p.a,Object.assign({},r,{style:Object(n.a)(Object(n.a)({},"bottom"===a?{transformOrigin:"center top"}:{transformOrigin:"center bottom"}),{},{zIndex:"100 !important"})}),i.a.createElement(g.a,{style:{marginTop:5}},i.a.createElement(d.a,{onClickAway:function(e){j(e)}},e.popper?e.popper:e.options&&e.options.length>0?i.a.createElement(m.a,{autoFocusItem:w,id:"menu-list-grow",onKeyDown:E,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return i.a.createElement(h.a,{key:r,style:{color:t&&t.color?t.color:Object(x.d)("menu"),padding:"12px 7px"},className:"ignoreClickAway",onClick:function(r){e.stopPropagation&&j(r),t.onClick&&t.onClick(),e.onClose&&e.onClose(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},i.a.createElement("div",{style:{pointerEvents:"none"}},t.render?t.render:t.avatar?i.a.createElement(l.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)):i.a.createElement(s.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},i.a.createElement(c.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(x.d)("menu")})),!t.render&&i.a.createElement("span",{style:{marginLeft:"7px"}},Object(x.w)(t.name,1))))}))):i.a.createElement(i.a.Fragment,null))))})):i.a.createElement(i.a.Fragment,null))}))},124:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},1274:function(e,t,r){e.exports=r(1880)},1284:function(e,t){},141:function(e,t,r){"use strict";var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(1),s=r(121),u=r(11);t.a=function(e){var t=e.legend,r=e.customColors,d=Object(i.useRef)(),p=Object(i.useState)([]),f=Object(o.a)(p,2),h=f[0],m=f[1],g=Object(i.useState)([]),b=Object(o.a)(g,2),v=b[0],y=b[1],x=t;return Object(i.useEffect)((function(){if(d.current){r&&(x=x.map((function(e){var t=r.find((function(t){return Object(l.w)(t.label)===e.label}));return t?Object(a.a)(Object(a.a)({},e),{},{color:t.color}):e})));var e=new ResizeObserver((function(){var e=d.current.clientWidth,t=Object(n.a)(x),r=[];[510,420,350].forEach((function(a,o){if(e<a){var i;switch(o){case 0:i=4;break;case 1:i=3;break;case 2:i=2;break;default:i=5}t=Object(n.a)(x),r=t.splice(i,5)}})),m(t),y(r)}));return e.observe(d.current),function(){return e.disconnect()}}}),[t]),c.a.createElement("div",{ref:d,style:{marginLeft:"20px",display:"block",alignSelf:"center",width:"100%",overflow:"hidden"}},c.a.createElement("div",{style:{display:"flex",width:"500px"}},h.map((function(e){var t=e.id,r=e.color,n=e.name,a=e.label,o=e.key,i=Object(l.w)(n||(a||t)),s=i.charAt(0)+i.slice(1).toLowerCase();return c.a.createElement("div",{key:o,style:{display:"flex",marginRight:"16px",whiteSpace:"nowrap",alignSelf:"center"}},c.a.createElement("div",{style:{width:"15px",height:"15px",borderRadius:"10px",backgroundColor:r,marginTop:"2px"}}),c.a.createElement("p",{style:{margin:"0px",marginTop:"-0.8px",marginLeft:"6px",fontSize:"14px",display:"block"}},["paused","notstarted","completed","inprogress","awaitaction"].includes(s)?Object(l.w)("$__".concat(s)):s))})),v.length>0&&c.a.createElement(s.a,{title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{marginBottom:"10px",fontSize:"16px",marginTop:"10px",justifyContent:"center"}},v.map((function(e){var t=e.id,r=e.color,n=e.name,a=e.label,o=e.key,i=Object(l.w)(n||(a||t)),s=i.charAt(0)+i.slice(1).toLowerCase();return c.a.createElement("div",{key:o,style:{display:"flex",marginTop:"4px",marginRight:"16px",whiteSpace:"nowrap",alignSelf:"center",width:"100%"}},c.a.createElement("div",{style:{width:"15px",height:"15px",borderRadius:"10px",backgroundColor:r,alignSelf:"center"}}),c.a.createElement("p",{style:{margin:"0px",marginLeft:"6px",display:"block",fontSize:"16px"}},["paused","notstarted","completed","inprogress","awaitaction"].includes(s)?Object(l.w)("$__".concat(s)):s))}))))},c.a.createElement("div",{style:{alignSelf:"center",border:"1px solid #D3D3D3 ",fontSize:"16px",borderRadius:"5px",display:"flex",backgroundColor:"#f5f5f5",cursor:"pointer"}},c.a.createElement(u.a,{style:{alignSelf:"center"},size:16},"add"),c.a.createElement("p",{style:{margin:"0px"}},v.length),c.a.createElement(u.a,{style:{alignSelf:"center"},size:16},"expand_more")))))}},143:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(444),d=r.n(u),p=r(14),f=r(13),h=r(15),m=r(3),g=r(50),b=r(198),v=r(20),y=r(64),x=r(11),w=r(46),_=r(143),O=r(153),j=r(144),E=r(25),k=r(300),S=r(150),L=r(756),C=r(1227),I=r(135),T=r(165),D=r(33),F=r(22),N=r(691),A=r(1),P=r(78),$=r(152),M=r.n($),B=r(674),z=r.n(B),Y=Object(T.a)(N.a);t.a=Object(p.b)(null,(function(e){return Object(f.b)(h,e)}))(Object(i.memo)((function(e){var t,r=Y(),l=m.a.getState(),u=l.db,p=l.session,f=l.functions,h=l.timeline,T=f.socket,N=c.a.useState(!1),$=Object(o.a)(N,2),B=$[0],R=$[1],G=c.a.useState(!1),H=Object(o.a)(G,2),W=H[0],U=H[1],q=c.a.useState(null),V=Object(o.a)(q,2),J=V[0],X=V[1],K=c.a.useState(null),Z=Object(o.a)(K,2),Q=Z[0],ee=Z[1],te=c.a.useState(!1),re=Object(o.a)(te,2),ne=re[0],ae=re[1],oe=c.a.useState(!1),ie=Object(o.a)(oe,2),ce=ie[0],le=ie[1],se=c.a.useState(null),ue=Object(o.a)(se,2),de=ue[0],pe=ue[1],fe=e.storie,he=c.a.useRef(!0);c.a.useEffect((function(){return he.current=!0,function(){he.current=!1}}),[]);var me=c.a.createRef(),ge=c.a.useRef(0);Object(i.useEffect)((function(){var t;he.current&&e.onResize&&(null===me||void 0===me||null===(t=me.current)||void 0===t?void 0:t.clientHeight)&&ge.current!==me.current.clientHeight&&(ge.current=me.current.clientHeight,e.onResize(me.current.clientHeight||83))}),[me]);var be=null;if(fe.filesCount&&fe.filesCount>0&&fe.user&&fe.user._id&&fe.user._id!==p._id&&(!fe.files||fe.files&&fe.files.length<fe.filesCount))return c.a.createElement(c.a.Fragment,null);var ve=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];he.current&&(U(!0),e&&clearTimeout(be))},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;be=setTimeout((function(){he.current&&U(!1)}),e)},xe=function(t){var r=e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,n={chatId:m.a.getState().chat.id,react:t,user:p._id,db:e.db,nodeId:r,message:e.storie._id};Object(P.e)(e,n),T.emit("data",{module:"timeline",method:"post",action:"interact"},n)};if(!fe)return null;var we="";"timer"===fe.type&&String(fe.ini)&&String(fe.fin)&&(we=fe.fin-fe.ini);var _e=null;fe.urlPreview&&(_e=JSON.parse(fe.urlPreview));var Oe,je=Object(A.w)(Object(P.g)(fe.message,fe));fe._reactions&&Object.keys(fe._reactions).length>0&&Object.keys(fe._reactions).forEach((function(e){Object.keys(fe._reactions[e]).length>0&&Object.keys(fe._reactions[e]).forEach((function(t){t===p._id&&(Oe=e)}))}));var Ee=!1;e.storie&&e.storie.user&&e.storie.user._id===p._id&&(Ee=!0);var ke=function(){Object(A.c)({message:Object(A.w)("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(P.c)(e,{id:fe._id,idRel:fe.idRel,deletedReason:J,deleted:!0}),fe.deleted=!0,ee(!1),X(null)}})};if(!fe.filesCount&&""===fe.message&&fe.cardId&&fe.cardId!==e.nodeId&&!m.a.getState().db.cards[fe.cardId])return c.a.createElement(c.a.Fragment,null);if(fe.deleted&&fe.user._id!==p._id)return c.a.createElement(c.a.Fragment,null);var Se=function(t){var r=t.name.split("."),n=r[r.length-1],o="attachment";u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&(o=u.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 i="img";return u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer&&(i=u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer),c.a.createElement("div",{key:t._id,style:Object(a.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"===i?{width:"350px",height:"50px"}:"movie"===i?{width:"350px",height:"280px"}:{width:"150px",height:"150px"}),onClick:function(r){e.openLightBox&&e.openLightBox(t._id),r.preventDefault()},title:t.name},("img"===i||"movie"!==i&&"audio"!==i&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")||"movie"!==i&&"audio"!==i&&!("img"===i&&o&&o.indexOf("svg")>-1))&&c.a.createElement(I.a,{title:t.name},c.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"===i&&"attachment"===o&&c.a.createElement(x.a,{icon:o,size:"50px"}),"img"===i&&"string"===typeof o&&o.indexOf("https")>-1&&-1===o.indexOf("svg")&&c.a.createElement("img",{alt:"altImage",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){}}),"movie"!==i&&"img"!==i&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?c.a.createElement(x.a,{icon:o,size:"50px"}):"movie"===i||"img"===i||"img"===i&&o&&o.indexOf("svg")>-1?c.a.createElement(c.a.Fragment,null):c.a.createElement("img",{alt:"MACHEN_IMAGE",src:o,style:{width:"100%",height:"100%"}}),"img"===i&&o&&o.indexOf(".svg")>-1?c.a.createElement("img",{alt:"altImage",src:z.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}):c.a.createElement(c.a.Fragment,null),"movie"===i&&c.a.createElement("video",{style:{width:"100%"},controlsList:"nodownload",src:"https://machen.azureedge.net/".concat(t.file)}),"audio"===i&&c.a.createElement(d.a,{src:"https://machen.azureedge.net/".concat(t.file),controls:!0}),c.a.createElement("div",{style:{clear:"both"}}))};return c.a.createElement("div",{style:Object(a.a)(Object(a.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:me},c.a.createElement("div",{className:"message",style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"calc(88% - 15px)",float:Ee?"right":"left"},Ee?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){ye(1e3)},onMouseOver:function(){e.isReply||ve(!0)},onClick:function(){e.isReply||ve(!0)}},e.showUserName&&!Ee&&c.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:Object(A.d)("menu")}},(!p.GlobalData.hideDeletedUsers||p&&p.GlobalData&&p.GlobalData.hideDeletedUsers&&fe.user&&!fe.user.deleted&&(!m.a.getState().db.users[fe.user._id]||m.a.getState().db.users[fe.user._id]&&!m.a.getState().db.users[fe.user._id].deleted))&&fe.user.name?fe.user.name:Object(A.w)("$__deletedUser")),c.a.createElement("div",{style:Object(a.a)({position:"relative",float:Ee?"right":"left",padding:"7px 15px",width:"100%",background:Ee?"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"},fe.approval?{border:"solid 4px ".concat(fe.message.indexOf("$__approved")>-1?"green":"red")}:{})},fe&&fe.filesCount&&fe&&fe.user&&fe.user._id===p._id&&parseInt(fe.filesCount)>0&&fe.files&&0===Object.keys(fe.files).length?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{position:"relative",justifyContent:"center",alignItems:"center",color:"lightgray"}},Object(A.w)("$__transferringFile".concat(parseInt(fe.filesCount)>1?"s":""))),c.a.createElement("div",{className:"files",style:{position:"relative",maxWidth:"calc(100% - 15px)",width:"100%",display:"flex"}},(parseInt(fe.created_at),s()().unix("x"),c.a.createElement(c.a.Fragment,null)))):c.a.createElement(c.a.Fragment,null),fe.files&&Object.keys(fe.files).length>0?c.a.createElement("div",{className:"files",style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:Ee?"right":"left"},Ee?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:Ee?"flex-end":"none",flexWrap:"wrap"})},Object.keys(fe.files).map((function(e,t){return c.a.createElement("div",{key:"".concat(e,"-").concat(t)},Se(fe.files[e]))}))):fe.files&&fe.files.length>0?c.a.createElement("div",{className:"files",style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:Ee?"right":"left"},Ee?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:Ee?"flex-end":"none",flexWrap:"wrap"})},fe.files.map((function(e,t){return Se(e)}))):c.a.createElement(c.a.Fragment,null),!e.isReply&&e.storie&&e.storie.reply&&h&&(h[e.nodeId]&&h[e.nodeId][e.storie.reply]||h[p._id]&&h[p._id][e.storie.reply])&&c.a.createElement("div",{style:{position:"relative",width:"calc(100% - 20px)",opacity:.66,display:"flex",justifyContent:"center",marginBottom:"7px"}},c.a.createElement(_.a,{isReply:!0,storie:h[e.nodeId]&&h[e.nodeId][e.storie.reply]?h[e.nodeId][e.storie.reply]:h[p._id][e.storie.reply],db:e.db,nodeId:e.nodeId,openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},messageClick:function(){e.replyClick&&e.replyClick()}})),fe.deleted&&"timer"!==fe.type?c.a.createElement("div",{style:{color:"lightGray",height:33,padding:7}},Object(A.w)("$__removed","*"),"*"):function(){if("comment"===fe.type&&fe.message)return c.a.createElement("div",null,fe.urlPreview&&_e.img&&_e.title&&_e.contentSnippet?c.a.createElement(D.a,{style:{marginBottom:15}},!B&&_e.img&&c.a.createElement(F.a,{xs:12,sm:6,md:4,lg:3,xl:2},c.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(_e.img),onError:function(e){he.current&&R(!0)},alt:_e.title||_e.link})),c.a.createElement(F.a,{xs:12,sm:6,md:8,lg:9,xl:10},c.a.createElement("div",{style:{fontSize:"14px",color:Object(A.d)("menu"),fontWeight:"bold"}},_e.title),_e.site&&c.a.createElement("div",{style:{fontSize:"12px"}},_e.site),_e.contentSnippet&&c.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},_e.contentSnippet),c.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:_e.link,target:"_blank",rel:"noopener noreferrer"},Object(A.w)("$__openLink","*")))):c.a.createElement(c.a.Fragment,null),c.a.createElement(F.a,{xs:12,sm:12,md:12,lg:12,xl:12},Object(A.b)(Object(A.o)(je),e.searchText)),c.a.createElement("div",{style:{clear:"both"}}));if("comment"===fe.type&&!fe.message&&fe.cardId!==e.nodeId&&m.a.getState().db.cards[fe.cardId])return c.a.createElement(g.a,{db:"cards",data:m.a.getState().db.cards[fe.cardId],Avatar:!0,expanded:!0,ignoreList:!0});if("log"===fe.type){var t={};if("$__stepChangeListPosition"===fe.message&&fe.newData){var n=JSON.parse(fe.newData);return c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},c.a.createElement(x.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),fe.message.indexOf("$__")>-1?Object(A.w)(fe.message,1):fe.message," "),c.a.createElement("ul",{style:{listStyle:"decimal"}},n.filter((function(e){return m.a.getState().db.cards[e]})).map((function(e){return c.a.createElement("li",null,m.a.getState().db.cards[e].name)}))))}return"$__updated"===fe.message?(t=JSON.parse(fe.newData),c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},c.a.createElement(x.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),fe.message.indexOf("$__")>-1?Object(A.w)(fe.message,1):fe.message," "),fe.newData&&c.a.createElement("ul",{style:{position:"relative",width:"98%"}},Object.keys(t).map((function(r,n){if("icon"===r)return c.a.createElement("li",{key:n,style:{display:"flex"}},Object(A.w)("$__icon",1),":",c.a.createElement(x.a,{icon:t[r],color:Object(A.d)("color"),size:"17px"}));if("customColumns"===r){var a=JSON.parse(t[r]);return c.a.createElement("li",{key:n},Object(A.w)("$__customColumns",1),":",c.a.createElement("ul",null,Object.keys(a).map((function(e,t){return c.a.createElement("li",{key:t},Object(A.w)("$__".concat(e)),"=>"," ",c.a.createElement("span",{style:{color:Object(A.d)("menu"),fontWeight:"bold"}},Object(A.w)("".concat(a[e].name))))}))))}return"customDashboard"===r?c.a.createElement("li",{key:n},Object(A.w)("$__customDashboard",1),": ",Object(A.w)("$__updated",1)):"_id"!==r&&"id"!==r&&"client"!==r&&"planId"!==r&&"_parent"!==r&&"owner"!==r&&"image"!==r?"status"===r?c.a.createElement("li",{key:n},Object(A.w)("$__status",1),": ",Object(A.w)("$__".concat(t[r]),1)):"note"===r?c.a.createElement("li",{key:n},Object(A.w)("$__note",1),": ",c.a.createElement("div",null,Object(A.b)(Object(A.o)(t[r]),e.searchText))):"kpi_type"===r||"priority"===r||"risk"===r||"complexity"===r||"impact"===r?c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),": ",Object(A.w)("$__".concat(t[r]),1)):"name"===r||"description"===r?c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),": ",t[r]):"url"===r?c.a.createElement("li",{key:n},"url",":",c.a.createElement("a",{href:t[r],target:"blank",style:{}},Object(A.b)(Object(A.o)(t[r]),e.searchText))):"_tags"!==r&&"string"===typeof t[r]&&"kpi_ini"!==r&&"kpi_fin"!==r&&"startDate"!==r&&"endDate"!==r&&"updated_at"!==r&&"created_at"!==r&&"content"!==r?c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),": ",t[r].indexOf("$__")>-1?Object(A.w)("$__".concat(t[r]),1):t[r]):"kpi_ini"===r||"kpi_fin"===r?c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),": ",Object(A.h)(t[r],fe.kpi_type?fe.kpi_type:"decimal")):"startDate"===r||"endDate"===r||"updated_at"===r||"created_at"===r||"completed_at"===r?c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),": ",t[r]?s()(new Date(1e3*t[r])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):Object(A.w)("$__removed")):"boolean"===typeof t[r]?c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),": ",t[r]?Object(A.w)("$__enable",1):Object(A.w)("$__disable",1)):"_tags"===r?c.a.createElement("li",{key:n},"TAGS: ",c.a.createElement(b.a,{options:t[r],showOptions:!0})):c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),"::UPDATED_VALUE"):c.a.createElement("li",{key:n},Object(A.w)("$__".concat(r),1),"::UPDATED_VALUE")})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))):c.a.createElement("div",{style:{position:"relative",width:"100%"}},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},c.a.createElement(x.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),fe.approval&&fe.message.indexOf("$__approved")>-1?c.a.createElement(x.a,{icon:"verified",color:"green"}):fe.approval&&fe.message.indexOf("$__rejected")>-1?c.a.createElement(x.a,{icon:"gpp_bad",color:"red"}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{wordBreak:"break-word"}},Object(A.b)(Object(A.o)(je),e.searchText)),c.a.createElement("div",{style:{clear:"both"}})),fe.cardId?c.a.createElement("div",{style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"285px"},e.boxStyle&&e.boxStyle.maxWidth?{maxWidth:e.boxStyle.maxWidth}:{}),{},{width:"100%",display:"block"})},c.a.createElement(g.a,{db:"cards",data:m.a.getState().db.cards[fe.cardId],ignoreList:!0,onlyOption:!0,notGlobalExpanded:!0,noExpanding:!0,disabled:!0})):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}}))}if("timer"===fe.type){var o=we,i="";if(we<60)i="".concat(o," ").concat(Object(A.w)("$__seconds",1));else if(we>3600){var l=Math.trunc(o/3600);o-=3600*l;var u=Math.trunc(o/60)>0?Math.trunc(o/60):0,d=(o-=60*u)>0?o:0;i="".concat(l," hora").concat(l>1?"s":""," ").concat(u," ").concat(Object(A.w)("$__minutes",1)," ").concat(d," ").concat(Object(A.w)("$__seconds",1))}else{var p=Math.trunc(o/60)>0?Math.trunc(o/60):0,f=(o-=60*p)>0?o:0;i="".concat(p," ").concat(Object(A.w)("$__minutes",1)," ").concat(f," ").concat(Object(A.w)("$__seconds",1))}return Q?c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},c.a.createElement(E.a,{label:Object(A.w)("$__cancelReason",1),variant:Object(A.d)("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){he.current&&X(e.target.value)}},placeholder:Object(A.w)("$__cancelReason_placeholder",1)})),c.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},c.a.createElement(v.a,{transparent:!0,title:Object(A.w)("$__cancel","*"),color:Object(A.d)("lightgrey"),icon:"cancel",onClick:function(){he.current&&(ee(!1),X(null))},size:"25px"}),c.a.createElement(v.a,{transparent:!0,title:Object(A.w)("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){he.current&&ke()},size:"25px"})),c.a.createElement("div",{style:{clear:"both"}})):c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative"}},fe&&fe._toUser&&Object.keys(fe._toUser).length>0&&c.a.createElement("div",{className:r.timeInfo},c.a.createElement(L.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(fe._toUser).map((function(e){return c.a.createElement(I.a,{key:e,title:fe._toUser[e].displayName?fe._toUser[e].displayName:fe._toUser[e].name},c.a.createElement(S.a,{alt:fe._toUser[e].name,src:fe._toUser[e].image||null,style:{width:27,height:27,border:"none"}},fe._toUser[e].name.substr(0,1)))})))),fe.manualEntry?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"schedule"}),c.a.createElement("div",{className:"text"},s()(1e3*fe.ini).tz("America/Sao_Paulo").format("DD/MM/YYYY"))):c.a.createElement(c.a.Fragment,null,parseInt(s()(1e3*fe.ini).tz("America/Sao_Paulo").format("YYYY"))>2021?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"schedule"}),c.a.createElement("div",{className:"text"},s()(1e3*fe.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):c.a.createElement(c.a.Fragment,null),parseInt(s()(1e3*fe.fin).tz("America/Sao_Paulo").format("YYYY"))>2021?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"watch_later"}),c.a.createElement("div",{className:"text"},s()(1e3*fe.fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):c.a.createElement(c.a.Fragment,null)),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"hourglass_full"}),c.a.createElement("div",{className:"text"},i)),c.a.createElement("div",{style:{clear:"both"}}),fe.deleted?c.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(A.d)("menu")}},Object(A.w)("$__cancelled")):c.a.createElement(c.a.Fragment,null)),c.a.createElement("div",null,je),fe.deleted&&fe.deletedReason&&c.a.createElement("div",{style:{color:"red"}},Object(A.w)("$__cancelReason",1),": ",fe.deletedReason),c.a.createElement("div",{style:{clear:"both"}}),fe.deleted||!W&&!s()(fe.created_at).unix("x")?c.a.createElement(c.a.Fragment,null):c.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px"}},c.a.createElement(O.a,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){ee(!0)},show:"hover"}]}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))}if("kpi"===fe.type){var h=fe&&fe.balance?fe.balance:0;return c.a.createElement("div",null,fe.cardId?c.a.createElement(g.a,{db:"cards",data:m.a.getState().db.cards[fe.cardId],ignoreList:!0,noOptions:!0}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",null,je),c.a.createElement("div",{className:parseFloat(fe.value)>0?r.valuePositive:r.valueNegative},Object(A.h)(fe.value,fe.kpi_type?fe.kpi_type:"decimal")),!e.stories&&c.a.createElement("div",{className:r.lastValue},Object(A.w)("$__balance",1),": ",Object(A.h)(h,fe.kpi_type?fe.kpi_type:"decimal")),c.a.createElement("div",{style:{clear:"both"}}))}}()),fe.user&&fe.user._id&&c.a.createElement("div",{style:Object(a.a)(Object(a.a)({position:"absolute"},Ee?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},c.a.createElement(k.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:fe.user._id},c.a.createElement(S.a,Object.assign({},fe.user._id&&!(null===(t=m.a.getState().db.users[fe.user._id])||void 0===t?void 0:t.deleted)?{alt:fe.user.displayName?fe.user.displayName:fe.user.name,src:"".concat(fe.user.image)}:{alt:Object(A.w)("$__deletedUser"),src:null},{style:{width:"22px",height:"22px"}})))),c.a.createElement("div",{style:Object(a.a)(Object(a.a)({position:"absolute"},Ee?{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"}),onMouseLeave:ye,onMouseOut:ye},!fe.deleted&&fe._reactions&&Object.keys(fe._reactions).length>0&&c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},fe&&fe._reactions.like&&Object.keys(fe._reactions.like).length>0&&c.a.createElement(w.a,{icon:"thumb_up",iconColor:Object(A.d)("menu"),title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.like).sort((function(e,t){return fe._reactions.like[e].reactDate&&String(fe._reactions.like[e].reactDate.low)&&fe._reactions.like[t].reactDate&&String(fe._reactions.like[t].reactDate.low)&&parseInt(fe._reactions.like[e].reactDate.low)<parseInt(fe._reactions.like[t].reactDate.low)?-1:fe._reactions.like[e].reactDate&&String(fe._reactions.like[e].reactDate.low)&&fe._reactions.like[t].reactDate&&String(fe._reactions.like[t].reactDate.low)&&parseInt(fe._reactions.like[e].reactDate.low)>parseInt(fe._reactions.like[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.like[e].name,src:fe._reactions.like[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.like[e].displayName?fe._reactions.like[e].displayName:fe._reactions.like[e].name,fe._reactions.like[e].reactDate&&fe._reactions.like[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.like[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))),style:{fontSize:"12px",margin:0}}),fe&&fe._reactions&&fe._reactions.nolike&&Object.keys(fe._reactions.nolike).length>0&&c.a.createElement(w.a,{icon:"thumb_down",iconColor:Object(A.d)("medium"),style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.nolike).sort((function(e,t){return fe._reactions.nolike[e].reactDate&&String(fe._reactions.nolike[e].reactDate.low)&&fe._reactions.nolike[t].reactDate&&String(fe._reactions.nolike[t].reactDate.low)&&parseInt(fe._reactions.nolike[e].reactDate.low)<parseInt(fe._reactions.nolike[t].reactDate.low)?-1:fe._reactions.nolike[e].reactDate&&String(fe._reactions.nolike[e].reactDate.low)&&fe._reactions.nolike[t].reactDate&&String(fe._reactions.nolike[t].reactDate.low)&&parseInt(fe._reactions.nolike[e].reactDate.low)>parseInt(fe._reactions.nolike[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.nolike[e].name,src:fe._reactions.nolike[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.nolike[e].displayName?fe._reactions.nolike[e].displayName:fe._reactions.nolike[e].name,fe._reactions.nolike[e].reactDate&&fe._reactions.nolike[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.nolike[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),fe&&fe._reactions&&fe._reactions.love&&Object.keys(fe._reactions.love).length>0&&c.a.createElement(w.a,{icon:"favorite",iconColor:Object(A.d)("medium"),style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.love).sort((function(e,t){return fe._reactions.love[e].reactDate&&String(fe._reactions.love[e].reactDate.low)&&fe._reactions.love[t].reactDate&&String(fe._reactions.love[t].reactDate.low)&&parseInt(fe._reactions.love[e].reactDate.low)<parseInt(fe._reactions.love[t].reactDate.low)?-1:fe._reactions.love[e].reactDate&&String(fe._reactions.love[e].reactDate.low)&&fe._reactions.love[t].reactDate&&String(fe._reactions.love[t].reactDate.low)&&parseInt(fe._reactions.love[e].reactDate.low)>parseInt(fe._reactions.love[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.love[e].name,src:fe._reactions.love[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.love[e].displayName?fe._reactions.love[e].displayName:fe._reactions.love[e].name,fe._reactions.love[e].reactDate&&fe._reactions.love[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.love[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),fe&&fe._reactions&&fe._reactions.approve&&Object.keys(fe._reactions.approve).length>0&&c.a.createElement(w.a,{icon:"verified",iconColor:"green",style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.approve).sort((function(e,t){return fe._reactions.approve[e].reactDate&&String(fe._reactions.approve[e].reactDate.low)&&fe._reactions.approve[t].reactDate&&String(fe._reactions.approve[t].reactDate.low)&&parseInt(fe._reactions.approve[e].reactDate.low)<parseInt(fe._reactions.approve[t].reactDate.low)?-1:fe._reactions.approve[e].reactDate&&String(fe._reactions.approve[e].reactDate.low)&&fe._reactions.approve[t].reactDate&&String(fe._reactions.approve[t].reactDate.low)&&parseInt(fe._reactions.approve[e].reactDate.low)>parseInt(fe._reactions.approve[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.approve[e].name,src:fe._reactions.approve[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.approve[e].displayName?fe._reactions.approve[e].displayName:fe._reactions.approve[e].name,fe._reactions.approve[e].reactDate&&fe._reactions.approve[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.approve[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),fe&&fe._reactions&&fe._reactions.attention&&Object.keys(fe._reactions.attention).length>0&&c.a.createElement(w.a,{icon:"report_problem",iconColor:"red",style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.attention).sort((function(e,t){return fe._reactions.attention[e].reactDate&&String(fe._reactions.attention[e].reactDate.low)&&fe._reactions.attention[t].reactDate&&String(fe._reactions.attention[t].reactDate.low)&&parseInt(fe._reactions.attention[e].reactDate.low)<parseInt(fe._reactions.attention[t].reactDate.low)?-1:fe._reactions.attention[e].reactDate&&String(fe._reactions.attention[e].reactDate.low)&&fe._reactions.attention[t].reactDate&&String(fe._reactions.attention[t].reactDate.low)&&parseInt(fe._reactions.attention[e].reactDate.low)>parseInt(fe._reactions.attention[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.attention[e].name,src:fe._reactions.attention[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.attention[e].displayName?fe._reactions.attention[e].displayName:fe._reactions.attention[e].name,fe._reactions.attention[e].reactDate&&fe._reactions.attention[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.attention[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),c.a.createElement("div",{style:{clear:"both"}})),!e.isReply&&c.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:"7px",marginRight:"7px"}},W&&!e.noReactions&&!fe.deleted&&c.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){ve(!0)}},c.a.createElement(x.a,{icon:Oe&&"like"===Oe?"thumb_up":"thumb_up_off_alt",iconColor:Oe&&"like"===Oe?Object(A.d)("menu"):Object(A.d)("medium"),title:Object(A.w)("$__like",1),size:"18px",onClick:function(){xe("like")},onMouseLeave:ye}),c.a.createElement(x.a,{icon:Oe&&"nolike"===Oe?"thumb_down":"thumb_down_off_alt",title:Object(A.w)("$__notlike",1),iconColor:Oe&&"nolike"===Oe?Object(A.d)("menu"):Object(A.d)("medium"),size:"18px",onClick:function(){xe("nolike")},onMouseLeave:ye}),c.a.createElement(x.a,{icon:Oe&&"love"===Oe?"favorite":"favorite_border",title:Object(A.w)("$__love",1),iconColor:Oe&&"love"===Oe?Object(A.d)("menu"):Object(A.d)("medium"),size:"18px",onClick:function(){xe("love")},onMouseLeave:ye}),c.a.createElement(x.a,{icon:"verified",title:Object(A.w)("$__approve",1),iconColor:Oe&&"approve"===Oe?"green":Object(A.d)("medium"),size:"18px",onClick:function(){xe("approve")},onMouseLeave:ye}),c.a.createElement(x.a,{icon:"report_problem",title:Object(A.w)("$__attention",1),iconColor:Oe&&"attention"===Oe?"red":Object(A.d)("medium"),size:"18px",onClick:function(){xe("attention")},onMouseLeave:ye}),fe&&fe.user&&fe.user._id===p._id&&c.a.createElement(x.a,{icon:"forward",title:Object(A.w)("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){ae(!0)},onMouseLeave:ye}),c.a.createElement(x.a,{icon:"reply",title:Object(A.w)("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(a.a)(Object(a.a)({},m.a.getState().chats),{},{drafts:Object(a.a)(Object(a.a)({},m.a.getState().chats.drafts||{}),{},Object(n.a)({},e.nodeId,Object(a.a)(Object(a.a)({},m.a.getState().chats.drafts&&m.a.getState().chats.drafts[e.nodeId]?m.a.getState().chats.drafts[e.nodeId]:{}),{},{reply:fe._id})))}))},onMouseLeave:ye}),!fe.deleted&&"comment"===fe.type&&fe.user&&fe.user._id&&fe.user._id===p._id&&parseInt(fe.created_at)>parseInt(s()().unix("x"))-360?c.a.createElement(v.a,{id:"chat_message_delete",title:Object(A.w)("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){ke()},size:"18px",transparent:!0}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}),s()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("H:mm")):s()(new Date).tz("America/Sao_Paulo").format("YYYY")===s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),fe.readedBy&&Object.keys(fe.readedBy).length>0&&c.a.createElement(I.a,{title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe.readedBy).sort((function(e,t){return fe&&fe.readedBy[e]&&fe.readedBy[e].readedDate&&fe.readedBy[t]&&fe.readedBy[t].readedDate&&String(fe.readedBy[e].readedDate.low)&&String(fe.readedBy[t].readedDate.low)&&parseInt(fe.readedBy[e].readedDate.low)<parseInt(fe.readedBy[t].readedDate.low)?-1:fe&&fe.readedBy[e]&&fe.readedBy[e].readedDate&&fe.readedBy[t]&&fe.readedBy[t].readedDate&&String(fe.readedBy[e].readedDate.low)&&String(fe.readedBy[t].readedDate.low)&&parseInt(fe.readedBy[e].readedDate.low)>parseInt(fe.readedBy[t].readedDate.low)?1:0})).map((function(e,t){return fe.user._id!==e&&fe.readedBy&&fe.readedBy[e]&&fe.readedBy[e].name&&c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe.readedBy[e].name,src:fe.readedBy[e].image||null}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe.readedBy[e].displayName?fe.readedBy[e].displayName:fe.readedBy[e].name,fe.readedBy[e].readedDate&&fe.readedBy[e].readedDate.low&&" (".concat(s()(1e3*fe.readedBy[e].readedDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))},c.a.createElement("div",null,c.a.createElement(x.a,{color:"#FFFFFF",size:"14px",style:{marginLeft:"7px"}},"done_all")))),c.a.createElement("div",{style:{clear:"both"}})),ne?c.a.createElement(C.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:ne},c.a.createElement("div",{className:"forwardMessage"},c.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},c.a.createElement(y.a,{title:Object(A.w)("$__forwardMessage",1),icon:"forward",onCancel:function(){ae(!1)}})),c.a.createElement("div",{style:{padding:15}},c.a.createElement(j.a,{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){pe(e)}})),c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},c.a.createElement(v.a,{shadow:!0,title:Object(A.w)("$__cancel"),text:Object(A.w)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){ae(!1),pe(null)}}),de&&c.a.createElement("div",{style:{marginLeft:"15px"}},c.a.createElement(v.a,{shadow:!0,title:Object(A.w)("$__forward"),text:Object(A.w)("$__forward"),icon:"forward",size:"25px",load:!!ce,onClick:function(){le(!0),Object(P.d)(e,Object(a.a)(Object(a.a)({},fe),{},{_forwardToId:de})),setTimeout((function(){ae(!1),pe(null),e.reduxFunction("ASYNC","SET_CHAT",Object(a.a)(Object(a.a)({},m.a.getState().chat),{},{db:"users",nodeId:de[0],loading:!1})),le(!1)}),6e3)}}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}}))})))},144:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(15),s=r(3),u=r(13),d=r(14),p=r(11),f=r(25),h=r(150),m=r(756),g=r(569),b=r(495),v=r(294),y=r(755),x=r(1227),w=r(135),_=r(165),O=r(570),j=r(24),E=r(1),k=r(75);function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var L=Object(_.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)"}}}}));t.a=Object(d.b)(null,(function(e){return Object(u.b)(l,e)}))((function(e){var t,r,i,l,u,d=L(),_=c.a.useRef(null),C=c.a.useState(!1),I=Object(o.a)(C,2),T=I[0],D=I[1],F=e.data,N=s.a.getState(),A=N.db,P=N.session,$=N.sideModule,M=c.a.useState(e.selected?e.selected:[]),B=Object(o.a)(M,2),z=B[0],Y=B[1],R=c.a.useState(""),G=Object(o.a)(R,2),H=G[0],W=G[1],U=c.a.useState(!e.selectedShow||!String(null===(t=e.selectedShow)||void 0===t?void 0:t.internal)||(null===(r=e.selectedShow)||void 0===r?void 0:r.internal)),q=Object(o.a)(U,2),V=q[0],J=q[1],X=c.a.useState(!(!e.selectedShow||!String(null===(i=e.selectedShow)||void 0===i?void 0:i.external))&&(null===(l=e.selectedShow)||void 0===l?void 0:l.external)),K=Object(o.a)(X,2),Z=K[0],Q=K[1],ee=c.a.useRef();c.a.useEffect((function(){return ee.current=!0,function(){ee.current=!1}}),[]),c.a.useEffect((function(){e.selected&&JSON.stringify(e.selected)!==JSON.stringify(z)&&ee.current&&Y(e.selected)}),[e.selected]);var te=e.admins?Object(k.i)(F&&F._id?F._id:null,null,{onlyCard:!(!F||!F._id)}):Object(j.u)(F&&F._id?F._id:null,{onlyCard:!(!F||!F._id),all:!0,allPlataform:e.allPlataform||!1}),re=$&&$.id?Object(j.t)($.id):0,ne=function(){var t=Object(a.a)(S().mark((function t(r){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=Array.from(z),e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],ee.current&&Y(n),e.onSelect&&e.onSelect(n),e.multiple||ee.current&&D(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ae=function(t){var r=t.pr,a=t.selected,o=te[r];return o?c.a.createElement(v.a,{autoFocus:!1,onClick:function(e){ne(r),e.preventDefault(),e.stopPropagation()},className:"ignoreClickAway"},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center",cursor:"pointer",pointerEvents:"none"}},c.a.createElement(h.a,{alt:o.name||null,src:o.image||null,style:Object(n.a)({},e.avatarSize?{width:e.avatarSize,height:e.avatarSize}:{})},o&&o.name?o.name.substr(0,1):""),c.a.createElement("div",{style:{marginLeft:"15px",color:"black"}},c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},className:"ignoreClickAway"},o.name||o.name),c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center"}},o._parent&&A.users[o._parent]&&A.users[o._parent].image?c.a.createElement("div",{style:{position:"relative",bottom:-4,right:-7,width:17,height:17,borderRadius:"50%",backgroundImage:"url(".concat(A.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):c.a.createElement(c.a.Fragment,null),o._parent&&A.users[o._parent]&&A.users[o._parent].name?c.a.createElement("div",{style:{position:"relative",float:"left",fontSize:11,color:"lightgray",marginLeft:7}},A.users[o._parent].name):c.a.createElement(c.a.Fragment,null)),a?c.a.createElement("div",{style:{position:"absolute",right:0,top:0,bottom:0,alignItems:"center",justifyContent:"center",display:"flex"}},0===z.indexOf(o._id)?c.a.createElement("div",null,c.a.createElement(p.a,{icon:"admin_panel_settings",color:"lightgray"})):c.a.createElement(c.a.Fragment,null),c.a.createElement(p.a,{icon:"check",color:"green"})):c.a.createElement(c.a.Fragment,null)))):c.a.createElement(c.a.Fragment,null)};return c.a.createElement("div",null,c.a.createElement(b.a,{ref:_,"aria-controls":T?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!F||e.permission||F&&te&&te[P._id]&&te[P._id].access&&parseInt(te[P._id].access)>2||re>3)&&D(!0)},className:e.transparent?d.iconButtonStyleTransaparent:d.iconButtonStyleWhite},z&&0===z.length?Object(E.w)(e.text||"$__selectUser"):c.a.createElement("div",null,c.a.createElement(m.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},null===z||void 0===z||null===(u=z.filter((function(e){return e&&s.a.getState().db.users[e]})))||void 0===u?void 0:u.map((function(t){var r,n,a,o;return c.a.createElement(w.a,{key:t,title:s.a.getState().db.users[t]&&s.a.getState().db.users[t].displayName?s.a.getState().db.users[t].displayName:(null===(r=s.a.getState().db.users[t])||void 0===r?void 0:r.name)||""},c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},c.a.createElement(h.a,{alt:s.a.getState().db.users[t].name||"",src:s.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=s.a.getState().db.users[t])||void 0===n||null===(a=n.name)||void 0===a?void 0:a.substr(0,1))||""),!e.multiple&&c.a.createElement("span",{style:{marginLeft:15}},s.a.getState().db.users[t].displayName?s.a.getState().db.users[t].displayName:(null===(o=s.a.getState().db.users[t])||void 0===o?void 0:o.name)||"")))})),e.multiple&&c.a.createElement(w.a,{title:Object(E.w)(e.text||"$__selectUser")},c.a.createElement(h.a,{style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"},alt:"ADD",src:null},"+"))))),c.a.createElement(x.a,{open:T},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"space-between"}},c.a.createElement(g.a,{onClickAway:function(e){_.current&&_.current.contains(e.target)||ee.current&&D(!1)}},c.a.createElement("div",{style:{position:"relative"}},c.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative"}},c.a.createElement(f.a,{id:"quickUser_Search",label:Object(E.w)("$__searchByName",1),variant:Object(E.d)("fieldVariant"),name:"searchValue",InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(O.a,{position:"end",style:{cursor:"pointer"},onClick:function(){W(""),D(!1)}},c.a.createElement(p.a,{icon:"close"})),onChange:function(e){W(e.target.value)}},value:H,placeholder:Object(E.w)("$__searchByName",1),autoFocus:!0})),c.a.createElement("div",{style:{display:"flex",padding:"0px 15px",fontSize:12,marginTop:-5}},c.a.createElement("div",{style:{border:"solid 1px ".concat(V?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",borderRadius:10,backgroundColor:"".concat(V?"#585858":"lightGray"),color:Object(E.u)(V?"#585858":"#d3d3d3",!0)},onClick:function(){J((function(e){return!e}))}},Object(E.w)("$__showInternal")),c.a.createElement("div",{style:{border:"solid 1px ".concat(Z?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",marginLeft:7,borderRadius:10,backgroundColor:"".concat(Z?"#585858":"lightGray"),color:Object(E.u)(Z?"#585858":"#d3d3d3",!0)},onClick:function(){Q((function(e){return!e}))}},Object(E.w)("$__showExternals"))),c.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative",maxHeight:250,overflowY:"auto"}},c.a.createElement(y.a,{id:"menu-list-grow",autoFocusItem:!1,autoFocus:!1,onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),ee.current&&D(!1))}},Object.keys(te).filter((function(e){return!(te[e].deleted||!(""===H||H&&te[e].name&&te[e].name.toLowerCase().indexOf(H.toLowerCase())>-1)||!(!Z&&"external"!==te[e].type||Z&&"external"===te[e].type||!V&&"user"!==te[e].type||V&&"user"===te[e].type))})).sort((function(e,t){return te[e].name<te[t].name?-1:te[e].name>te[t].name?1:0})).filter((function(e){return te&&te[e]&&te[e]._id})).map((function(e){return c.a.createElement(ae,{pr:e,key:e,selected:-1!==z.indexOf(te[e]._id)})})))))))))}))},147:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(165),i=r(754),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)))}},15: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}))},152:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},1521:function(e,t,r){},153:function(e,t,r){"use strict";var n=r(5),a=r(2),o=r(0),i=r.n(o),c=r(11),l=r(150),s=r(405),u=r(495),d=r(569),p=r(568),f=r(359),h=r(294),m=r(755),g=r(360),b=r(567),v=r(135),y=r(165),x=r(1),w=Object(y.a)((function(e){return{iconButtonStyleTransaparent:Object(a.a)({padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{}),iconButtonStyleWhite:Object(a.a)({padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{})}}));t.a=Object(o.memo)((function(e){var t=w(),r=i.a.useState(!1),y=Object(n.a)(r,2),_=y[0],O=y[1],j=i.a.useRef(null),E=Object(o.useRef)();Object(o.useEffect)((function(){return E.current={mounted:!0},function(){E&&E.current&&E.current.mounted&&(E.current.mounted=!1)}}),[]);var k=function(t){t.preventDefault(),t.stopPropagation(),j.current&&j.current.contains(t.target)||setTimeout((function(){var t;(null===E||void 0===E||null===(t=E.current)||void 0===t?void 0:t.mounted)&&O(!1),e.onClose&&e.onClose()}),150)};function S(t){var r;"Tab"===t.key&&(t.preventDefault(),(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.mounted)&&O(!1),e.onClose&&e.onClose())}return e.options&&0!==e.options.length?i.a.createElement("div",{style:Object(a.a)({zIndex:"100 !important"},e.style?e.style:{}),className:_?"ignoreCardClickAway":""},i.a.createElement(v.a,{title:e.title?e.title:Object(x.w)("$__options",1)},e.text?i.a.createElement(u.a,{ref:j,"aria-controls":_?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){var r;(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.mounted)&&O((function(e){return!e})),!_&&e.onOpen&&e.onOpen(),_&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(x.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),i.a.createElement(c.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):i.a.createElement(f.a,{ref:j,"aria-controls":_?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){var r;(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.mounted)&&O((function(e){return!e})),!_&&e.onOpen&&e.onOpen(),_&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(c.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),i.a.createElement(b.a,{open:_,anchorEl:j.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps;t.placement;return i.a.createElement(p.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),i.a.createElement(g.a,null,i.a.createElement(d.a,{onClickAway:k},i.a.createElement(m.a,{autoFocusItem:_,id:"menu-list-grow",onKeyDown:S,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return i.a.createElement(h.a,{key:r,style:{color:t&&t.color?t.color:Object(x.d)("menu"),padding:"12px 7px"},className:"ignoreClickAway",onClick:function(r){e.forceStopPropagation||k(r),t.onClick&&t.onClick(),e.onClose&&e.onClose(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},i.a.createElement("div",{style:{pointerEvents:"none"}},t.render?t.render:t.avatar?i.a.createElement(l.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)):i.a.createElement(s.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},i.a.createElement(c.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(x.d)("menu")})),!t.render&&i.a.createElement("span",{style:{marginLeft:"7px"}},Object(x.w)(t.name,1))))}))))))}))):i.a.createElement(i.a.Fragment,null)}))},155:function(e,t,r){"use strict";var n=r(1928),a=r(34),o=r(1),i=Object(a.a)({root:{"&:hover":{backgroundColor:"transparent"},color:Object(o.d)("color")}})(n.a);t.a=i},156:function(e,t,r){},159:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},1624:function(e,t){},1626:function(e,t){},1637:function(e,t){},1639:function(e,t){},1664:function(e,t){},1666:function(e,t){},1667:function(e,t){},1672:function(e,t){},1674:function(e,t){},1680:function(e,t){},1682:function(e,t){},1701:function(e,t){},1713:function(e,t){},1716:function(e,t){},1750:function(e,t,r){},1751:function(e,t,r){},176:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n,a,o=r(88),i=r(0),c=r.n(i),l=r(71),s=r(754),u=l.b.div(n||(n=Object(o.a)(["\n  position: relative;\n  width: 100%;\n  height: 100%;\n  padding-top: 20px;\n  padding-bottom: 20px;\n"]))),d=l.b.div(a||(a=Object(o.a)(["\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  width: 100%;\n  height: 100%;\n  background-color: #ffffffeb;\n  z-index: 7000;\n  display:flex;\n  align-items:center;\n  justify-content:center;\n"])));function p(e){return c.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?c.a.createElement(d,null,c.a.createElement(s.a,{size:50|e.size})):c.a.createElement(u,null,c.a.createElement(s.a,null)))}},1766:function(e,t,r){},1767:function(e,t,r){var n={"./AboutPlan.jsx":[473],"./Actions.jsx":[865],"./ActionsDetailed.jsx":[866],"./ActionsDough.jsx":[534],"./DayTasks.jsx":[535],"./Funnel.jsx":[536],"./Goal.jsx":[867],"./GoalsDetailed.jsx":[868],"./GoalsDough.jsx":[537],"./Guideline.jsx":[869],"./LastCompleted.jsx":[538],"./LateTask.jsx":[539],"./MatrixDough.jsx":[540],"./MatrixDoughDetailed.jsx":[870],"./Meta.jsx":[200],"./Modal.jsx":[542],"./NextTask.jsx":[541],"./Notes.jsx":[723],"./Objective.jsx":[871],"./ObjectiveDetailed.jsx":[872],"./ObjetiveDough.jsx":[545],"./TaskByCreator.jsx":[543],"./TaskByPerson.jsx":[474],"./TaskByResponsible.jsx":[544],"./TaskDoneBar.jsx":[873],"./TaskDoneBarMonth.jsx":[876],"./TaskDoneByTime.jsx":[475],"./TaskDoneDoughTable.jsx":[875],"./TimeLine.jsx":[476],"./Timesheet copy.jsx":[1936,3],"./Timesheet.jsx":[477]};function a(e){if(!r.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],a=t[0];return Promise.all(t.slice(1).map(r.e)).then((function(){return r(a)}))}a.keys=function(){return Object.keys(n)},a.id=1767,e.exports=a},179:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(73),d=r.n(u),p=r(14),f=r(13),h=r(15),m=r(3),g=r(11),b=r(144),v=r(135),y=r(241),x=r(122),w=r(1);t.a=Object(p.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(f.b)(h,e)}))((function(e){var t,r,i,l,u,p,f,h=c.a.useState(e.nodeId?e.nodeId:d()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),_=Object(o.a)(h,2),O=_[0],j=_[1],E=(m.a.getState().db,c.a.useRef());c.a.useEffect((function(){j(e.nodeId?e.nodeId:d()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]);var k=Object(a.a)(Object(a.a)({},e.defaultValues||{}),m.a.getState().searchs[O]||{});c.a.useEffect((function(){e.defaultValues&&e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},m.a.getState().searchs),{},Object(n.a)({},O,Object(a.a)(Object(a.a)({},e.defaultValues||{}),m.a.getState().searchs[O]||{}))))}),[O]);var S=function(t){var r=t.card,o=(t.type,t.order);return c.a.createElement("div",{key:r,style:{padding:"3px 7px",backgroundColor:"rgba(0,0,0,0.1)",boxShadow:"rgba(0,0,0,0.2) 0px 0px 3px 3px 3px",margin:"3px",display:"flex",alignItems:"center",width:"fit-content",borderRadios:"0px 0px 8px 0px"}},m.a.getState().db.cards[r].name.substr(0,20)," ",c.a.createElement(g.a,{icon:"close",color:"lightGray",style:{marginLeft:10,width:10,height:10,padding:7,backgroundColor:"#80808087",borderRadius:7},size:10,onClick:function(){var t=m.a.getState().searchs[O].selectedCards;0===o&&(delete t.guideline,delete t.objective,delete t.goal,delete t.action),1===o&&(delete t.objective,delete t.goal,delete t.action),2===o&&(delete t.goal,delete t.action),3===o&&delete t.action,e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},m.a.getState().searchs),{},Object(n.a)({},O,Object(a.a)(Object(a.a)({},m.a.getState().searchs[O]||{}),{},{selectedCards:t}))))}}))};return c.a.createElement("div",{style:Object(a.a)({zIndex:"100 !important",display:"flex",justifyContent:"space-between",alignItems:"center"},e.style?e.style:{})},c.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%"}},c.a.createElement(x.a,{text:Object(w.w)("$__filter"),icon:"filter_alt",popper:c.a.createElement("div",{style:{padding:"15px",zIndex:1},ref:E,id:"cal-menufilter"},c.a.createElement(y.a,Object.assign({},e,{onChange:function(t){e.onChange&&e.onChange(t)}})))}),e.showFilters?c.a.createElement("div",{style:{padding:"3px 15px",display:"flex",cursor:"pointer"}},k.text&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},(null===(t=e.title)||void 0===t?void 0:t.text)||Object(w.w)("$__text"),": ",c.a.createElement("span",{style:{color:Object(w.d)("darkText")}}," ",k.text)),k.ref1&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},(null===(r=e.title)||void 0===r?void 0:r.text)||Object(w.w)("$__text"),": ",c.a.createElement("span",{style:{color:Object(w.d)("darkText")}}," ",k.text)),k.ref2&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},(null===(i=e.title)||void 0===i?void 0:i.text)||Object(w.w)("$__text"),": ",c.a.createElement("span",{style:{color:Object(w.d)("darkText")}}," ",k.text)),k.tagsByText&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(w.w)("$__tagsByText"),": ",c.a.createElement("span",{style:{color:Object(w.d)("darkText")}}," ",k.tagsByText)),k.startDate&&k.endDate&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},c.a.createElement("div",{style:{display:"flex",width:"100%",padding:"7px 7px",fontSize:"12px",fontWeight:400,justifyContent:"space-between"}},c.a.createElement("label",{style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},s()(1e3*k.startDate).format("YYYY-MM-DD  HH:MM:ss")),c.a.createElement(g.a,{size:"22px",color:Object(w.d)("color"),icon:"today",onClick:e.onClick})),c.a.createElement("div",{style:{display:"flex",width:"100%",padding:"7px 7px",fontSize:"12px",fontWeight:400,justifyContent:"space-between"}},c.a.createElement("label",{style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},s()(1e3*k.endDate).format("YYYY-MM-DD  HH:MM:ss")),c.a.createElement(g.a,{size:"22px",color:Object(w.d)("color"),icon:"today",onClick:e.onClick}))),k.users&&k.users.length>0?c.a.createElement("div",{style:{display:"flex",fontSize:11,width:150}},c.a.createElement(b.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!1,data:m.a.getState().db.cards[O],noLimit:!0,multiple:!0,selected:k.users,transparent:!0})):c.a.createElement(c.a.Fragment,null),k.responsible&&k.responsible.length>0?c.a.createElement("div",{style:{display:"flex",fontSize:11,width:150}},c.a.createElement(b.a,{avatarSize:"23px",data:m.a.getState().db.cards[O],selected:k.responsible,transparent:!0})):c.a.createElement(c.a.Fragment,null),k.tags&&c.a.createElement("div",{style:{display:"flex",fontSize:11}},k.tags.map((function(e,t){return c.a.createElement("div",{key:e.value,className:"tag",style:{backgroundColor:e.color||"lightgray",color:e.color?Object(w.u)(e.color,!0):"#FFFFFF",display:"flex",alignItems:"center",padding:"3px 7px",borderRadius:"7px",marginLeft:5,whiteSpace:"nowrap",height:"fit-content"}},e.parent&&m.a.getState().db.tag.filter((function(t){return t.value===e.parent})).length>0?c.a.createElement("div",{style:{fontSize:8,marginRight:3}},m.a.getState().db.tag.filter((function(t){return t.value===e.parent}))[0].label," / "):c.a.createElement(c.a.Fragment,null),e.label)}))),k.status&&!k.status.all&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(w.w)("$__status"),": ",c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(k.status).filter((function(e,t){return k.status[e]})).map((function(e,t){return c.a.createElement(v.a,{title:Object(w.w)(m.a.getState().db.status.filter((function(t){return t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:m.a.getState().db.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),k.priority&&!k.priority.all&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(w.w)("$__priority"),": ",c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(k.priority).filter((function(e,t){return k.priority[e]&&m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return c.a.createElement(v.a,{title:Object(w.w)(m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:m.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),k.risk&&!k.risk.all&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(w.w)("$__risk"),": ",c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(k.risk).filter((function(e,t){return k.risk[e]&&m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return c.a.createElement(v.a,{title:Object(w.w)(m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:m.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),k.complexity&&!k.complexity.all&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(w.w)("$__complexity"),": ",c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(k.complexity).filter((function(e,t){return k.complexity[e]&&m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return c.a.createElement(v.a,{title:Object(w.w)(m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:m.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),k.impact&&!k.impact.all&&c.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(w.w)("$__impact"),": ",c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(k.impact).filter((function(e,t){return k.impact[e]&&m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return c.a.createElement(v.a,{title:Object(w.w)(m.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:m.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))):c.a.createElement(c.a.Fragment,null),k&&k.selectedCards&&Object.keys(k.selectedCards).length>0?c.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",font:10,alignItems:"center",justifyContent:"flex-start",grid:3,display:"flex"}},(null===(l=k.selectedCards)||void 0===l?void 0:l.guideline)?c.a.createElement(S,{card:k.selectedCards.guideline,type:"guideline",order:0}):c.a.createElement(c.a.Fragment,null),(null===(u=k.selectedCards)||void 0===u?void 0:u.objective)?c.a.createElement(S,{card:k.selectedCards.objective,type:"objective",order:1}):c.a.createElement(c.a.Fragment,null),(null===(p=k.selectedCards)||void 0===p?void 0:p.goal)?c.a.createElement(S,{card:k.selectedCards.goal,type:"goal",order:2}):c.a.createElement(c.a.Fragment,null),(null===(f=k.selectedCards)||void 0===f?void 0:f.action)?c.a.createElement(S,{card:k.selectedCards.action,type:"action",order:3}):c.a.createElement(c.a.Fragment,null),Object.keys(k.selectedCards).length>1?c.a.createElement(g.a,{title:Object(w.w)("$__clearAll"),icon:"clear_all",color:"#80808087",size:17,onClick:function(){e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},m.a.getState().searchs),{},Object(n.a)({},O,Object(a.a)(Object(a.a)({},m.a.getState().searchs[O]||{}),{},{selectedCards:{}}))))}}):c.a.createElement(c.a.Fragment,null)):c.a.createElement(c.a.Fragment,null)),e.children?e.children:c.a.createElement(c.a.Fragment,null))}))},180:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(10),a=(r(1172),r(55));function o(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};u(x,c,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,c)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),u(O,s,"Generator"),u(O,c,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}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=10;break}return n=c.onUploadProgress,e.next=5,a.a.post("Upload/",s,{onUploadProgress:n,headers:{"Content-Type":"multipart/form-data"}});case 5:i=e.sent,console.log(i),i&&(u=i.data),e.next=15;break;case 10:return e.next=12,a.a.post("Upload/",s,{headers:{"Content-Type":"application/json; multipart/form-data; charset=UTF-8"}});case 12:l=e.sent,console.log(l),l&&(u=l.data);case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(0),c&&c.onUploadError&&c.onUploadError(e.t0),r(!1);case 21:return e.prev=21,t(!0),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[0,17,21,24]])})));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)}}()},182:function(e,t,r){"use strict";r.d(t,"e",(function(){return m})),r.d(t,"c",(function(){return b})),r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return f})),r.d(t,"d",(function(){return y})),r.d(t,"f",(function(){return h}));var n=r(8),a=r(2),o=r(10),i=r(38),c=r(497),l=r(6),s=r.n(l),u=(r(73),r(3)),d=r(75);r(24);function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var f=function(){var e=Object(o.a)(p().mark((function e(t){var r,o,l,s,d;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Object(a.a)({},t),Object.keys(o).forEach((function(e){o[e]||delete o[e]})),l={},s={},o.users&&o.users.length>0&&o.users.forEach((function(e,t){var r=u.a.getState().db.users[e];s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},e,Object(a.a)({_id:e,name:r.name,image:r.image||null},0===t?{isResponsible:!0}:{})))})),d=Object(c.a)(),i.a.post("card/add",Object(a.a)({_id:d},o)),l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},d,Object(a.a)(Object(a.a)({_id:d},o),{},{_users:s}))),(null===(r=l[d])||void 0===r?void 0:r.users)&&delete l[d].users,e.abrupt("return",l);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=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]:"order",n=a.length>2&&void 0!==a[2]?a[2]:0,e.prev=2,i.a.post("kanban/reorder",{cards:t,orderBy:r}),e.abrupt("return",!0);case 7:e.prev=7,e.t0=e.catch(2),n<3&&setTimeout((function(){h(t,r,n+1)}),3e3);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t){return e.apply(this,arguments)}}(),m=function(e,t){var r=Object(a.a)({},u.a.getState().db.cards);t.cards&&t.cards.length>0&&t.cards.forEach((function(e,t){r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},e,Object(a.a)(Object(a.a)({},r[e]),{},{step:"".concat(t+1)})))})),e.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),r)}))},g=function(){var e=Object(o.a)(p().mark((function e(t){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.a.put("card/link",t);case 3:return e.abrupt("return",!0);case 6:e.prev=6,e.t0=e.catch(0),setTimeout((function(){g(t)}),3e3);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),b=function(e,t,r,n){var o=u.a.getState().session,c=u.a.getState().db.cards[r],l=u.a.getState().db.cards[t],p={};c&&c.automationDueDateType&&"add"===c.automationDueDateType&&(p=Object(a.a)({endDate:s()("".concat(s()().format("YYYY-MM-DD")," 23:59:59")).add((null===c||void 0===c?void 0:c.automationDueDate)||1,"days").unix("X")},l.startDate?{}:{startDate:s()().unix("X")})),c&&c.automationStatusType&&"replace"===c.automationStatusType&&(p=Object(a.a)(Object(a.a)({},p),{},{status:c.automationStatus||"notStarted"},c.automationStatus&&"completed"===c.automationStatus?{completed_at:s()().unix("x")}:{}));var f,h=[];if(c.execAsResponsible?(f=o._id,l._users[o._id]||Object(d.b)(e,o._id,"4",l._id)):c&&c.automationUsers&&"add"===c.automationUsers&&c._users&&Object.keys(c._users).filter((function(e){return e})).length>0&&Object.keys(c._users).filter((function(e){return e})).forEach((function(t){if(c._users[t].isResponsible&&(f=t),l&&(!l._users||l._users&&!l._users[t])){var r=!(!l._users||!l._users[t]);Object(d.b)(e,t,c._users[t].access,l._id,r)}})),c&&c.automationTags&&"doNotChange"!==c.automationTags&&c._tags&&c._tags.length>0){var m=l._tags?Array.from(l._tags):[];if("replace"===c.automationTags){var b=[],y=[];c._tags.forEach((function(e){m.findIndex((function(t){return t.value===e.value}))>-1&&(b.push(e.value),m.splice(m.findIndex((function(t){return t.value===e.value})),1))})),c._tags.forEach((function(e){-1===m.findIndex((function(t){return t.value===e.value}))&&(m.push(e),-1===y.indexOf(e.value)&&y.push(e.value))})),p=Object(a.a)(Object(a.a)(Object(a.a)({},p),b.length>0?{removeTags:b}:{}),y.length>0?{addTags:y}:{}),m=Array.from(c._tags)}if("add"===c.automationTags){var x=[];c._tags.forEach((function(e){0===m.filter((function(t){return t.value===e.value})).length&&(x.push(e.value),m.push(e))})),p=Object(a.a)(Object(a.a)({},p),{},{addTags:x})}if("remove"===c.automationTags){var w=[];c._tags.forEach((function(e){m.findIndex((function(t){return t.value===e.value}))>-1&&(w.push(e.value),m.splice(m.findIndex((function(t){return t.value===e.value})),1))})),p=Object(a.a)(Object(a.a)({},p),{},{removeTags:w})}p=Object(a.a)(Object(a.a)({},p),{},{_tags:m})}return c&&c.automationUsers&&"remove"===c.automationUsers&&c._users&&Object.keys(c._users).filter((function(e){return e})).length>0&&Object.keys(c._users).filter((function(e){return e})).forEach((function(e){l&&l._users&&l._users[e]&&-1===h.indexOf(e)&&h.push(e)})),c&&c.automationUsers&&"removeAll"===c.automationUsers&&(l&&l._users&&Object.keys(l._users).filter((function(e){return e})).length>0&&Object.keys(l._users).filter((function(e){return e})).forEach((function(e){-1===h.indexOf(e)&&e!==n&&h.push(e)})),f=n),c&&c.automationUsers&&"replace"===c.automationUsers&&(c._users&&Object.keys(c._users).length>0&&Object.keys(c._users).filter((function(e){return e})).forEach((function(t){if(c._users[t].isResponsible&&(f=t),l&&(!l._users||l._users&&!l._users[t])){var r=!(!l._users||!l._users[t]);Object(d.b)(e,t,c._users[t].access,l._id,r)}})),l&&l._users&&Object.keys(l._users).filter((function(e){return e})).length>0&&Object.keys(l._users).filter((function(e){return e})).forEach((function(e){c._users[e]||-1!==h.indexOf(e)||h.push(e)}))),c&&c.keepUserWhoCreatedActivity&&n&&h.indexOf(n)>-1&&h.splice(h.indexOf(n),1),h.length>0&&i.a.put("cards/removeAccess/",{cardId:l._id,userIds:h}),f&&Object(d.l)(e,{cardId:l._id,userId:f}),c.setIcon&&(p=Object(a.a)(Object(a.a)({},p),{},{icon:c.setIcon})),"{}"!==JSON.stringify(p)&&v(Object(a.a)({_id:t},p)),t&&r&&u.a.getState().db.cards[r]&&u.a.getState().db.cards[t]&&36===r.length&&g({idRel:t,destination:r}),p&&p.status&&"completed"===p.status&&!p.completed_at&&(p=Object(a.a)(Object(a.a)({},p),{},{completed_at:s()().unix("x")})),p},v=function(){var e=Object(o.a)(p().mark((function e(t){var r,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(a.a)({},t),e.next=3,i.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)}}(),y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.a.getState().db.cards,o=arguments.length>3?arguments[3]:void 0,i={},c=[];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&&!r[t].deleted})).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})).forEach((function(o,l){var s=[];Object.keys(r).length>0&&Object.keys(r).filter((function(n){return!((r[n]._parent!==o||(t.deleted||r[n].deleted)&&!t.deleted)&&(0!==l||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,n){if(!t.order||"order"===(null===t||void 0===t?void 0:t.order)){var a,o,i,c,l,s,u,d,p,f,h,m,g=0,b=0;if((null===(a=r[e])||void 0===a?void 0:a.order)&&(g=String((null===(o=r[e])||void 0===o||null===(i=o.order)||void 0===i?void 0:i.low)?null===(c=r[e])||void 0===c||null===(l=c.order)||void 0===l?void 0:l.low:null===(s=r[e])||void 0===s?void 0:s.order)),(null===(u=r[n])||void 0===u?void 0:u.order)&&(b=String((null===(d=r[n])||void 0===d||null===(p=d.order)||void 0===p?void 0:p.low)?null===(f=r[n])||void 0===f||null===(h=f.order)||void 0===h?void 0:h.low:null===(m=r[n])||void 0===m?void 0:m.order)),parseInt(g)<parseInt(b))return-1;if(parseInt(g)>parseInt(b))return 1}return 0})).forEach((function(e,t){s.push(Object(a.a)(Object(a.a)({},r[e]),{},{order:String(t)}))})),i=Object(a.a)(Object(a.a)({},i),{},Object(n.a)({},o,{id:o,name:r[o].name,icon:r[o].icon||null,items:s})),-1===c.indexOf(o)&&c.push(o)}));var l=function(e){return o.text&&void 0!==o.text&&null!==o.text&&""!==o.text&&(e=Array.from(e.filter((function(e){var t;return e.name.toLowerCase().indexOf(o.text.toLowerCase())>-1||(null===(t=e.description)||void 0===t?void 0:t.toLowerCase().indexOf(o.text.toLowerCase()))>-1})))),o.startDate&&void 0!==o.startDate&&null!==o.startDate&&""!==o.startDate&&(e=Array.from(e.filter((function(e){return parseInt(e.startDate)>=parseInt(o.startDate)})))),o.endDate&&void 0!==o.endDate&&null!==o.endDate&&""!==o.endDate&&(e=Array.from(e.filter((function(e){return parseInt(e.endDate)<=parseInt(o.endDate)})))),o.tags&&o.tags&&o.tags.filter((function(e){return e.value})).length>0&&(e=Array.from(e.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return o.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})))),e=(e=(e=(e=(e=e.filter((function(e){return!(e.status&&!(e&&e.status&&o.status&&o.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&o.priority&&o.priority[e.priority]||o.priority.null&&!e.priority)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.complexity&&o.complexity[e.complexity]||o.complexity.null&&!e.complexity)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.risk&&o.risk[e.risk]||o.risk.null&&!e.risk)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.impact&&o.impact[e.impact]||o.impact.null&&!e.impact)})).map((function(e){return e})),o.users&&o.users.length>0&&(e=e.filter((function(e){return o.users.filter((function(t){return e&&e._users&&e._users[t]})).length>0})).map((function(e){return e}))),e};return o&&Object.keys(i).forEach((function(e){i[e].items=l(i[e].items)})),{columns:i,columnOrder:c}},x=function(){var e=Object(o.a)(p().mark((function e(t){var r,o,l,s,d,f,h,m,v,y,x,w,_,O;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.nodeId,o=t.reason,l=void 0===o?null:o,s=t.approval,d=void 0!==s&&s,f=t.approved,h=void 0!==f&&f,m=u.a.getState().db.cards[r],v=u.a.getState().db.cards[m._parent],y=v.onConcludedStepMoveTo?v.onConcludedStepMoveTo:Object.keys(u.a.getState().db.cards).filter((function(e){return u.a.getState().db.cards[e]._parent===v._parent&&"step"===u.a.getState().db.cards[e].type&&parseInt(u.a.getState().db.cards[e].step)===parseInt(v.step)+1}))[0],x=u.a.getState().db.cards[y],d&&v._id&&(w={_id:Object(c.a)(),idRel:r,cardId:v._id,message:"".concat(h?"$__approved":"$__rejected"," - ").concat(l?"$__reason: ".concat(l):""),type:"log",filesCount:0,approval:!0,db:"cards"},i.a.post("timeline/add",w),!h&&v._parent&&(v._parent&&g({idRel:r,destination:v._parent}),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),{},Object(n.a)({},r,Object(a.a)(Object(a.a)({},u.a.getState().db.cards[r]),{},{_parent:v._parent,requireApproval:null})))})))),(!d||d&&h)&&(_=u.a.getState().db.cards[r]&&u.a.getState().db.cards[r]._createdBy&&u.a.getState().db.cards[r]._createdBy._id?u.a.getState().db.cards[r]._createdBy._id:null,O=b(t,r,y,_),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),{},Object(n.a)({},r,Object(a.a)(Object(a.a)(Object(a.a)({},u.a.getState().db.cards[r]),O),{},{_parent:v.onConcludedStepMoveTo},(null===x||void 0===x?void 0:x.requireApproval)?{requireApproval:!0}:{requireApproval:null})))})));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},1873:function(e,t,r){},1875:function(e,t,r){},1879:function(e,t,r){},1880:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(49),i=r.n(o),c=r(43),l=r(3),s=r(2030),u=r(14),d=r(88),p=r(2),f=r(10),h=r(8),m=r(5),g=r(334),b=r(73),v=r.n(b),y=r(100),x=r.n(y),w=r(6),_=r.n(w),O=r(186),j=(r(1287),r(71)),E=r(1223),k=r(20),S=r(1);function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function C(e){var t=a.a.useState(!!l.a.getState().session.consent),r=Object(m.a)(t,1)[0],n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!0),b=Object(m.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){setTimeout((function(){y(!1)}),6e3)}),[i]);var x=function(){var e=Object(f.a)(L().mark((function e(){var t;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0),h(!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"},l.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 d?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"policyAndTermsConsent"},a.a.createElement(E.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!r,onClick:function(e){}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.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.w)("$__TermsOfUseAndPrivacyPolicy")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},i?a.a.createElement("iframe",{title:"outModule",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",{title:"outModule",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(k.a,{id:"policyButtonConsent",title:Object(S.w)(i?"$__accepted":"$__IReadAndIAgree","*"),text:i?null:Object(S.w)("$__IReadAndIAgree","*"),color:i?"green":Object(S.d)("menu"),icon:"verified",onClick:i?null:function(){c(!0)},size:"25px"}),i?Object(S.w)("$__PrivacyPolicy","*"):a.a.createElement(a.a.Fragment,null)),i&&!v?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(k.a,{id:"termsofuseButtonConsent",title:Object(S.w)("$__IReadAndIAgreeTheTermsOfUse","*"),text:Object(S.w)("$__IReadAndIAgreeTheTermsOfUse","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){x()},size:"25px"})):a.a.createElement(a.a.Fragment,null)))))}var I=r(15),T=r(13);function D(){D=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var F=Object(u.b)((function(e){return{session:e.session}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useRef();if(t&&(!t.require||t.require&&!t.require.licensingAgreement))return a.a.createElement(a.a.Fragment,null);var n=function(){var e=Object(f.a)(D().mark((function e(){var t;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={accepted_at:"".concat(_()().unix("X")),version:"2022-10-24"},l.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"agreement"},{version:JSON.stringify(t)});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{id:"licensingAgreement"},a.a.createElement(E.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!0},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.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.w)("$__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",{title:"outModule",id:"licensing",ref:r,onLoad:function(){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(k.a,{id:"agreementButtonConsent",title:Object(S.w)("$__IReadAndIAgree","*"),text:Object(S.w)("$__IReadAndIAgree","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){n()},size:"25px"}))))))})),N=r(35),A=r(19),P=r(916),$=r(263),M=r.n($),B=r(76),z=r(264),Y=(r(994),r(782),r(526),r(1926),r(165)),R=r(569),G=(r(1222),r(294)),H=(r(2038),r(1895)),W=r(1891),U=r(1930),q=r(1892),V=(Object(Y.a)({TextField:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px",fontSize:"14px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& .MuiInput-underline:after":{border:"1px solid rgb(192,178,131)"},"& .MuiInput-underline:before:before":{borderBottom:"1px solid rgb(192,178,131)"}}}),Object(Y.a)({TextField:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& .MuiInput-underline:after":{border:"1px solid rgb(192,178,131)"},"& +:before":{borderBottom:"1px solid rgb(192,178,131)"}}}),Object(Y.a)({TextField:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px",fontSize:"14px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& .MuiInput-underline:after":{border:"1px solid rgb(192,178,131)"},"& .MuiInput-underline:before:before":{borderBottom:"1px solid rgb(192,178,131)"}}}),r(153)),J=r(405),X=r(2035),K=r(1893),Z=r(7),Q={block:{},left:{float:"left!important",display:"block"},right:{margin:"0",fontSize:"12px",float:"right!important",padding:"15px"},footer:Object(p.a)(Object(p.a)({bottom:"0",borderTop:"1px solid "+Z.p[15],padding:"15px 0"},Z.k),{},{zIndex:4}),container:Object(p.a)(Object(p.a)({zIndex:3},Z.e),{},{position:"relative"}),containerFluid:Object(p.a)(Object(p.a)({zIndex:3},Z.f),{},{position:"relative"}),a:{color:Z.w[0],textDecoration:"none",backgroundColor:"transparent"},list:{marginBottom:"0",padding:"0",marginTop:"0"},inlineBlock:{display:"inline-block",padding:"0",width:"auto"},whiteColor:{"&,&:hover,&:focus":{color:Z.I}}},ee=Object(Y.a)(Q);function te(e){var t,r,n=ee(),o=e.fluid,i=e.white,c=(e.rtlActive,x()((t={},Object(h.a)(t,n.container,!o),Object(h.a)(t,n.containerFluid,o),Object(h.a)(t,n.whiteColor,i),t))),l=n.a+x()(Object(h.a)({}," "+n.whiteColor,i));x()((r={},Object(h.a)(r,n.block,!0),Object(h.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(K.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",rel:"noopener noreferrer"},"SONNE GLOBAL")," | ".concat("$__footerDescription"!==Object(S.w)("$__footerDescription",1)?Object(S.w)("$__footerDescription",1):""))))}var re=r(11),ne=r(1162),ae=r.n(ne),oe=r(444),ie=r.n(oe),ce=r(754),le=r(34),se=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"}}},ue=r(674),de=r.n(ue);var pe=Object(u.b)((function(e){return{lightbox:e.lightBox}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(se)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.lightBox,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),f=Object(m.a)(d,2),h=f[0],g=f[1],b=a.a.useState(null),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(null),_=Object(m.a)(w,2),O=_[0],j=_[1],k=a.a.useState(!0),L=Object(m.a)(k,2),C=L[0],I=L[1];a.a.useEffect((function(){return window.addEventListener("keydown",(function(e){T(e)}),!1),function(){window.removeEventListener("keydown")}}),[]),a.a.useEffect((function(){if(o.open&&o.files.length>0&&o.file&&o.file!==y){u(!0),x(o.file);var e=l.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=t.length>0?t[t.length-1]:null;"pdf"===(a?n.fileExtensions.filter((function(e){return e.ext.indexOf(a.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(a.toLowerCase())>-1}))[0].viewer:"file":null)&&(I(!0),j(r)),setTimeout((function(){u(!1),j(r)}),1e3)}}),[o]);var T=function(e){if(39!==e.keyCode&&40!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&27!==e.keyCode||1===l.a.getState().lightBox.files.length&&27!==e.keyCode)return!1;if(l.a.getState().lightBox.open){var t;if(l.a.getState().lightBox.files.forEach((function(e,r){e._id===l.a.getState().lightBox.file&&(t=r)})),39===e.keyCode||40===e.keyCode)t+1===l.a.getState().lightBox.files.length?t=0:t+=1,F("R");else{if(37!==e.keyCode&&38!==e.keyCode)return 27===e.keyCode&&void D();0===t?t=l.a.getState().lightBox.files.length-1:t-=1,F("L")}u(!0),setTimeout((function(){u(!1)}),1e3)}},D=function(){setTimeout((function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}),500),window.removeEventListener("keydown",(function(e){T(e)}),!1)},F=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l.a.getState().lightBox.open&&(u(!0),l.a.getState().lightBox.files.forEach((function(e,r){e._id===l.a.getState().lightBox.file&&(t=r)})),"R"===h||"R"===r?t+1===l.a.getState().lightBox.files.length?t=0:t+=1:"L"!==h&&"L"!==r||(0===t?t=l.a.getState().lightBox.files.length-1:t-=1),l.a.getState().lightBox.files.length>0&&l.a.getState().lightBox.files[t]&&e.reduxFunction("ASYNC","LIGHTBOX",Object(p.a)(Object(p.a)({},l.a.getState().lightBox),{},{file:l.a.getState().lightBox.files[t]._id})),setTimeout((function(){u(!1),g(!1)}),700))};if(!l.a.getState().lightBox.open&&0===l.a.getState().lightBox.files.length)return null;var A=l.a.getState().lightBox.files.filter((function(e){return e._id===y}))[0];if(!A||!A.file)return a.a.createElement(a.a.Fragment,null);var P=A&&A.name?A.name.split("."):null,$=P.length>0?P[P.length-1]:null,M=$?n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1}))[0].viewer:"file":null,B=O,z=A&&A.file?"https://fl.machen.ai/?arq=".concat(A.file.replace("&","||MCH-ECOM||"),"&name=").concat(A.name.replace("&","||MCH-ECOM||")):null,Y="https://fls.machen.ai/".concat(encodeURIComponent(A.file),"/name/").concat(encodeURIComponent(A.name));return n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0&&(B=n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(A.file)),a.a.createElement(N.a,null,a.a.createElement(ae.a,{onSwipeMove:function(e,t){e.x>100?g("L"):e.x<-100?g("R"):e.y<-100&&D()},onSwipeEnd:function(e){!1!==h&&F()}},a.a.createElement(E.a,{className:t.backdrop,open:l.a.getState().lightBox.open,onClick:function(e){D()}},a.a.createElement("div",{id:"lightBox",className:t.header,style:{zIndex:"9999 !important"},onClick:function(e){D(),e.stopPropagation()}},a.a.createElement("div",{className:t.btClose},a.a.createElement(re.a,{title:Object(S.w)("$__close","*"),color:Object(S.d)("light"),onClick:function(){D()}},"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()}},s?a.a.createElement("div",{className:t.loader},a.a.createElement(ce.a,null)):"img"===M?a.a.createElement("div",{className:t.img},"string"===typeof O&&(-1===O.indexOf("https://")||O.indexOf("svg")>-1)?a.a.createElement(a.a.Fragment,null,"img"===M&&B&&B.indexOf("svg")>-1&&a.a.createElement("a",{href:z},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:de.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),Object(S.w)("$__clickHereToDownload",1)))):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:"".concat(B),onError:function(e){return e.target.src=B}})):s||"movie"!==M?s||"microsoft"!==M?s||"text"!==M?!s&&"pdf"===M&&O?a.a.createElement("div",{className:t.embed},C&&a.a.createElement("div",{className:t.loader},a.a.createElement(ce.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(50,"%")}},a.a.createElement(N.a,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(Y)})))))):s||"audio"!==M?s||"file"!==M?s?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(O)}):a.a.createElement("a",{href:z},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},Object(S.w)("$__clickHereToDownload",1))):a.a.createElement(ie.a,{src:O,autoPlay:!0,controls:!0}):a.a.createElement(a.a.Fragment,null,a.a.createElement(N.a,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(Y)}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(N.a,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(Y)}))):a.a.createElement("video",{className:t.movie,src:O,controls:!0})),l.a.getState().lightBox.files.length>1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.leftButtom},a.a.createElement(re.a,{title:Object(S.w)("$__previous","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){F("L")}},"keyboard_arrow_left")),a.a.createElement("div",{className:t.rightButtom},a.a.createElement(re.a,{title:Object(S.w)("$__next","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){F("R")}},"keyboard_arrow_right"))),a.a.createElement("div",{className:t.footer,onClick:function(e){e.stopPropagation()}},a.a.createElement("a",{href:z},a.a.createElement(re.a,{title:Object(S.w)("$__download","*"),color:Object(S.d)("light"),size:"33px"},"get_app")))))))}))),fe=r(176);var he=function(){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(fe.a,null)))};var me=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(se)((function(e){var t=e.classes;return l.a.getState().lightBox.miro||l.a.getState().lightBox.miroBoard?l.a.getState().lightBox.miro||l.a.getState().lightBox.miroBoard?a.a.createElement(E.a,{className:t.backdrop,open:l.a.getState().lightBox.miro},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.btClose},a.a.createElement(re.a,{title:Object(S.w)("$__close","*"),color:Object(S.d)("light"),onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}},"close"))),a.a.createElement("div",{className:t.content,style:{zIndex:1e3}},a.a.createElement("iframe",{title:"outModule",style:{position:"absolute",width:"100%",height:"100%"},src:"https://miro.com/app/live-embed/".concat(l.a.getState().lightBox.miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):null:a.a.createElement(a.a.Fragment,null)}))),ge=r(58),be=r(147);var ve=function(e){return a.a.createElement("div",{id:"sideModule_closeButton",style:Object(p.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(be.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(k.a,{id:"sideModule_saveButton",title:Object(S.w)("$__save",1),color:Object(S.d)("color"),icon:"save",onClick:function(){e.save()},size:"25px"}),e.saveClose&&a.a.createElement(k.a,{id:"sideModule_saveAndCloseButton",title:Object(S.w)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&a.a.createElement(k.a,{title:Object(S.w)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},ye=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(p.a)(Object(p.a)({},Z.k),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"30%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(p.a)(Object(p.a)({},Z.k),{},{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(p.a)(Object(p.a)({},Z.k),{},{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(p.a)(Object(p.a)({},Z.k),{},{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")}}},xe=r(260),we=r(201),_e=r(25),Oe=r(301),je=r(570),Ee=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")}}},ke=r(75);function Se(){Se=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Le=Object(u.b)((function(e,t){return{tag:e.db.tag,userGroup:e.db.userGroup,sideModule:e.sideModule}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=e.classes,r=l.a.getState(),o=r.sideModule,i=r.db,c=r.session,s=i.users,u=i.dataType,d=o.data,g=Object(n.useState)(d),b=Object(m.a)(g,1)[0],v=a.a.useState(!Object(S.x)(d&&d.email?d.email:"")),y=Object(m.a)(v,2),x=y[0],w=y[1],_=Object(S.j)(),O=JSON.stringify(b)!==JSON.stringify(d),j=function(t){var r=t.value,n=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},t.name,r));!r&&n[t.name]&&delete n[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:n}))},E=function(t){O&&!t?Object(S.c)({message:Object(S.w)("$__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(f.a)(Se().mark((function t(r){var n;return Se().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.e)(d.email);case 2:if(n=t.sent,d.name){t.next=7;break}Object(S.c)({message:Object(S.w)("$__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===d.type}))[0].disabledFields.indexOf("email")||!x){t.next=11;break}Object(S.c)({message:x,variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 11:if(-1!==u.filter((function(e){return e.name===d.type}))[0].disabledFields.indexOf("email")||!(!Object(S.x)(o.data.email)||s[d._id]&&d.email!==s[d._id].email&&n)){t.next=15;break}w(Object(S.w)("$__invalidEmail",1)),t.next=19;break;case 15:return t.next=17,Object(ke.o)(e);case 17:t.sent&&(Object(S.c)({message:Object(S.w)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&E(!0));case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),L=!1;return(d._id===c._id||_&&_.user&&(_.userAdmin||_.userEdit))&&(L=!0),a.a.createElement("div",null,a.a.createElement(ve,{save:L&&O?function(){return k()}:null,saveClose:L&&O?function(){return k(!0)}:null,close:function(){return E(!0)}}),L||!L&&o.data.image,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(we.a,{maxWidthOrHeight:600,img:o.data&&o.data.image?o.data.image:null,onChange:L?function(e,t){j({name:"file",value:t})}:null,avatar:!0,avatarIcon:d.type&&"user"!==d.type?d.type&&"group"!==d.type?"business":"groups":"person"})),a.a.createElement("form",{className:t.data,autoComplete:"off",id:"sideModule_user_data"},a.a.createElement(_e.a,{id:"sideModule_user_fullName",label:Object(S.w)("$__fullName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"person"})),onChange:function(e){j(e.target)},onBlur:function(e){if(d&&!d.name){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";j({name:"name",value:t.trim()})}}},value:d&&d.fullName?d.fullName:"",placeholder:Object(S.w)("$__fullName",1),autoFocus:!0,disabled:!L}),a.a.createElement(_e.a,{id:"sideModule_user_displayName",label:Object(S.w)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){j(e.target)},onBlur:function(e){j(e.target)}},value:d&&d.name?d.name:"",placeholder:Object(S.w)("$__displayName",1),disabled:!L}),-1===u.filter((function(e){return e.name===d.type}))[0].disabledFields.indexOf("email")&&a.a.createElement(_e.a,{id:"sideModule_user_email",label:Object(S.w)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",InputProps:{autoComplete:"new-password",className:!x&&d.email&&Object(S.x)(d&&d.email?d.email:"")?"":"invalid",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"alternate_email"})),onChange:function(e){w(null),j(e.target)},onBlur:function(){var e=Object(f.a)(Se().mark((function e(t){var r;return Se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(d._id&&"new"!==d._id&&s[d._id]&&s[d._id].email!==t.target.value||!d._id||"new"===d._id)){e.next=9;break}if(!Object(S.x)(t.target.value)||s[d._id]&&t.target.value===s[d._id].email){e.next=8;break}return e.next=4,Object(ke.e)(t.target.value);case 4:r=e.sent,w(r?Object(S.w)("$__emailAlreadyExists",1):null),e.next=9;break;case 8:w(Object(S.w)("$__invalidEmail",1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:d&&d.email?d.email:"",placeholder:Object(S.w)("$__email",1),disabled:!L}),L&&_&&_.user&&(_.userAdmin||_.userEdit)?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_tags"},a.a.createElement(Oe.a,{data:{values:d.tags||[],_id:d._id},options:l.a.getState().db.tag?l.a.getState().db.tag:[],placeholder:"$__tagsPlaceholder",dbNode:"tag",callBack:function(e){j({name:"tags",value:e})},secondaryParent:d._parent,colorPickerCallBack:function(e){l.a.getState().functions.socket.emit("tag.UPD",e)}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(Oe.a,{data:{values:d.groups||[],_id:d._id},options:l.a.getState().db.userGroup?l.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){j({name:"groups",value:e})},secondaryParent:d._parent,colorPickerCallBack:function(e){}}))):a.a.createElement(a.a.Fragment,null)))}))),Ce=r(46);function Ie(e){var t=a.a.useState({cPassword:"",password:""}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(0),d=Object(m.a)(u,2),f=d[0],h=d[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.w)("$__passwordTip_1")),a.a.createElement("p",null,Object(S.w)("$__passwordTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.w)("$__passwordTip_3")),a.a.createElement("li",null,Object(S.w)("$__passwordTip_4")),a.a.createElement("li",null,Object(S.w)("$__passwordTip_5")),a.a.createElement("li",null,Object(S.w)("$__passwordTip_6")),a.a.createElement("li",null,Object(S.w)("$__passwordTip_7")))),a.a.createElement(_e.a,{label:Object(S.w)("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){o(Object(p.a)(Object(p.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:h(0);break;case 1:h(1);break;case 2:h(2);break;case 3:h(3);break;case 4:h(4)}e.length<8&&h(0)}(e.target.value),f>2&&n.password===e.target.value?s(!0):s(!1)}},value:n.password}),a.a.createElement(_e.a,{label:Object(S.w)("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{color:l?"green":"lightgray"},l?"verified":"check")),autoComplete:"new-password",onChange:function(t){o(Object(p.a)(Object(p.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.w)("$__passwordTooWeak",1):2===f?Object(S.w)("$__weakPassword",1):3===f?Object(S.w)("$__goodPassword",1):4===f?Object(S.w)("$__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 Te=r(59),De=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")}}},Fe=r(38);function Ne(){Ne=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ae=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(De)((function(e){var t=e.classes,r=l.a.getState(),n=r.sideModule,o=r.session,i=r.functions,s=r.db,u=i.socket,d=n.data,g=a.a.useState(d),b=Object(m.a)(g,1)[0],v=a.a.useState(!1),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(null),O=Object(m.a)(_,2),j=O[0],E=O[1],k=a.a.useState(0),L=Object(m.a)(k,2),C=L[0],I=L[1],T=Object(S.j)(),D=function(t){return w(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},{_access:Object(p.a)(Object(p.a)({},n.data._access),{},Object(h.a)({},t.name,t.value))})})),!0},F=function(t){var r={_id:d._id,isAdmin:t};try{l.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"save"},r,(function(t){t.error?console.log("saveAdminError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}},N=function(t){!t&&x?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},A=function(){var t=Object(f.a)(Ne().mark((function t(r){return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return w(!1),t.next=3,Object(ke.p)(e);case 3:t.sent&&(Object(S.c)({message:Object(S.w)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),F(!d._access.admin||null),r&&N(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),P=function(){var e=Object(f.a)(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u.emit("data",{module:"user",method:"post",action:"accessSendInvite"},{_id:l.a.getState().sideModule.data._id,name:l.a.getState().sideModule.data.name,email:l.a.getState().sideModule.data.email},(function(){Object(S.c)({message:Object(S.w)("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=Object(f.a)(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Fe.a.post("/user/new-password",{userId:d._id,password:j});case 3:e.sent&&(E(null),Object(S.c)({message:Object(S.w)("$__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.w)("$__invalidRequest",1)," | ").concat(Object(S.w)("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"right",confirm:null});case 10:I(C+1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),M=s.plans[0];o&&o.GlobalData&&String(o.GlobalData.plan)&&s.plans.filter((function(e){return e.value===o.GlobalData.plan})).length>0&&s.plans.filter((function(e){return e.value===o.GlobalData.plan}))[0].settings&&(M=s.plans.filter((function(e){return e.value===o.GlobalData.plan}))[0]);var B=1;M&&M.settings&&M.settings.admins&&(B=parseInt(M.settings.admins)),o&&o.GlobalData&&o.GlobalData.customAdmins&&(B=parseInt(o.GlobalData.customAdmins));var z=Object.keys(s.users).filter((function(e){return s.users[e]&&e!==d._id&&s.users[e]._access&&s.users[e]._access.admin&&(!s.users[e]._parent||s.users[e]._parent&&s.users[s.users[e]._parent]&&!s.users[s.users[e]._parent].independentAccount)})).length||0;return d._access&&d._access.owner&&o._id!==d._id||o._id===d._id?a.a.createElement("div",null,a.a.createElement(ve,{save:x?function(){return A()}:null,saveClose:x?function(){return A(!0)}:null,close:function(){return N(!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(Ie,{onConfirmed:function(e){E(e)},clear:C})),j&&a.a.createElement("div",{style:{padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"7px"},onClick:function(){$()}},a.a.createElement(Ce.a,{icon:"save",text:Object(S.w)("$__save","*"),title:!Object(S.w)("$__save","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")})))):a.a.createElement("div",null,a.a.createElement(ve,{save:x?function(){return A()}:null,saveClose:x?function(){return A(!0)}:null,close:function(){return N(!0)}}),a.a.createElement("div",{className:t.data},a.a.createElement("fieldset",null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.enabled),onChange:function(e){D({name:"enabled",value:!d._access||!d._access.enabled})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__permitPlataformAccess",1)),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__userAccess_PlataformAccessDescription",1)))),d._access&&"owner"===d._access?a.a.createElement("fieldset",null,a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null," ",Object(S.w)("$__youAreAccountOwner",1)))):z<B||d&&d._access&&d._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:d&&d._access&&d._access.admin?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:d&&d._access&&d._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(re.a,{icon:"supervised_user_circle",size:"33px",color:d&&d._access&&d._access.admin?null:"#FFFFFF"}),Object(S.w)("$__guest"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:d&&d._access&&d._access.admin?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:d&&d._access&&d._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(re.a,{icon:"supervisor_account",size:"33px",color:d&&d._access&&d._access.admin?"#FFFFFF":null}),Object(S.w)("$__supervisorAccount")))),a.a.createElement("fieldset",null,a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)(d&&d._access&&d._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.w)("$__adminLimitReached")),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__adminLimitReachedDescription",1)),a.a.createElement("div",{style:{position:"relative",marginTop:7,color:"red",fontWeight:"bolder"}},Object(S.w)("$__usedUsers","*")," ",z," ",Object(S.w)("$__of","*")," ",B,a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("acc#tab/subscriptionUpgrade")}},Object(S.w)("$__upgradeSubscription")))))),d._access&&d._access.enabled&&d._access.admin&&a.a.createElement(a.a.Fragment,null,a.a.createElement(a.a.Fragment,null,d._token&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.w)("$__unregisteredUserAlert",1)),a.a.createElement(Ce.a,{text:Object(S.w)("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){P()}})),d._token&&d._token._id&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.w)("$__urlToActivate",1)),a.a.createElement("input",{type:"text",value:"".concat("https://software.machen.ai","/activate?token=").concat(d._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(Te.a,{checked:!(!d._access||!d._access.user),onChange:function(e){D({name:"user",value:!d._access||!d._access.user})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__users",1)),d._access&&(!d._access||d._access.user&&!1!==d._access.user)?a.a.createElement(a.a.Fragment,null,!d._access.userAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userRead),onChange:function(e){D({name:"userRead",value:!d._access||!d._access.userRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__read",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userInteract),onChange:function(e){D({name:"userInteract",value:!d._access||!d._access.userInteract})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__interact",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userEdit),onChange:function(e){D({name:"userEdit",value:!d._access||!d._access.userEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__edit",1))),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userAdmin),onChange:function(e){D({name:"userAdmin",value:!d._access||!d._access.userAdmin})},name:"checkeduserAdmin",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__admin",1))):a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__userAccess_UserAccessDescription",1)))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(Te.a,{checked:!(!d._access||!d._access.plan),onChange:function(e){D({name:"plan",value:!d._access||!d._access.plan})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__plan",1)),d._access&&(!d._access||d._access.plan&&!1!==d._access.plan)?a.a.createElement(a.a.Fragment,null,!d._access.planAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planRead),onChange:function(e){D({name:"planRead",value:!d._access||!d._access.planRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__read",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planEdit),onChange:function(e){D({name:"planEdit",value:!d._access||!d._access.planEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__edit",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.createTemplate),onChange:function(e){D({name:"createTemplate",value:!d._access||!d._access.createTemplate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__createTemplate",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planModerate),onChange:function(e){D({name:"planModerate",value:!d._access||!d._access.planModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__moderate",1))),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planAdmin),onChange:function(e){D({name:"planAdmin",value:!d._access||!d._access.planAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__admin",1))):a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__userAccess_StrategyAndPlansAccessDescription")))),T&&T.master&&d._isAdmin?a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feed),onChange:function(e){D({name:"feed",value:!d._access||!d._access.feed})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__feed",1)),d._access&&(!d._access||d._access.feed&&!1!==d._access.feed)?a.a.createElement(a.a.Fragment,null,!d._access.feedAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feedEdit),onChange:function(e){D({name:"feedEdit",value:!d._access||!d._access.feedEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__edit",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feedModerate),onChange:function(e){D({name:"feedModerate",value:!d._access||!d._access.feedModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__moderate",1))),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feedAdmin),onChange:function(e){D({name:"feedAdmin",value:!d._access||!d._access.feedAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__admin",1))):a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__feedAccess_StrategyAndPlansAccessDescription")))):a.a.createElement(a.a.Fragment,null),T&&T.masterAdmin?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:"red"}},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.masterAdmin),onChange:function(e){D({name:"masterAdmin",value:!d._access||!d._access.masterAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__accountAdministrator",1)),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__accountAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null),T&&T.masterAdmin&&o&&(o.email.indexOf("@sonne.global")>-1||o.email.indexOf("@machen.ai")>-1)&&(d.email.indexOf("@sonne.global")>-1||d.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(Te.a,{checked:!(!d._access||!d._access.machenAdmin),onChange:function(e){D({name:"machenAdmin",value:!d._access||!d._access.machenAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__machenAdministrator",1)),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.w)("$__machenAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null)),b&&b._access&&b._access.admin&&d&&d._access&&!d._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)))}))),Pe=r(55);function $e(){$e=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Me=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(De)((function(e){var t=a.a.useState(!1),r=Object(m.a)(t,1)[0],o=a.a.useState({image:null,status:!1}),i=Object(m.a)(o,2),c=i[0],l=i[1],s=a.a.useState(null),u=Object(m.a)(s,2),d=u[0],h=u[1];Object(n.useEffect)((function(){g()}),[]);var g=function(){var e=Object(f.a)($e().mark((function e(){var t,r;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/M_User_TwoFactor",{action:"has"});case 2:if(!((t=e.sent)&&t.data&&t.data.result)){e.next=7;break}l(Object(p.a)(Object(p.a)(Object(p.a)({},c),t.data.result),{},{status:!0})),e.next=11;break;case 7:return e.next=9,Pe.a.post("/M_User_TwoFactor",{action:"create"});case 9:(r=e.sent)&&l(Object(p.a)(Object(p.a)(Object(p.a)({},c),r.data.result),{},{status:!1}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=Object(f.a)($e().mark((function e(){var t;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/M_User_TwoFactor",{action:"verify",code:d});case 2:(t=e.sent)&&t.data&&t.data.result?l(Object(p.a)(Object(p.a)({},c),{},{status:!0})):(Object(S.c)({message:Object(S.w)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),l(Object(p.a)(Object(p.a)({},c),{},{status:!1}))),h(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=Object(f.a)($e().mark((function e(){var t;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/M_User_TwoFactor",{action:"disable",code:d});case 2:(t=e.sent)&&t.data&&t.data.result?(l({image:null,status:!1}),g()):Object(S.c)({message:Object(S.w)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),h(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(ve,{close:function(){r?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),c.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.w)("$__disableTokenTip_1")),a.a.createElement("p",null,Object(S.w)("$__disableTokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.w)("$__disableTokenTip_3")),a.a.createElement("li",null,Object(S.w)("$__disableTokenTip_4")),a.a.createElement("li",null,Object(S.w)("$__disableTokenTip_5")),a.a.createElement("li",null,Object(S.w)("$__disableTokenTip_6")),a.a.createElement("li",null,Object(S.w)("$__disableTokenTip_7")))),a.a.createElement(_e.a,{label:Object(S.w)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:d,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){h(e.target.value)}},autoComplete:"new-password",value:d,max:6}),a.a.createElement("div",{style:{display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"red",marginTop:"15px",alignItems:"center",justifyContent:"center",borderRadius:"7px"},onClick:function(){v()}},a.a.createElement(Ce.a,{icon:"toggle_on",text:Object(S.w)("$__disableToken","*"),title:Object(S.w)("$__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%"}},c.image&&a.a.createElement("img",{alt:"MACHEN_IMAGE",src:c.image})),a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.w)("$__tokenTip_1")),a.a.createElement("p",null,Object(S.w)("$__tokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.w)("$__tokenTip_3")),a.a.createElement("li",null,Object(S.w)("$__tokenTip_4")),a.a.createElement("li",null,Object(S.w)("$__tokenTip_5")),a.a.createElement("li",null,Object(S.w)("$__tokenTip_6")),a.a.createElement("li",null,Object(S.w)("$__tokenTip_7")))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__token",1)),a.a.createElement(_e.a,{label:Object(S.w)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:d,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){h(e.target.value)}},placeholder:Object(S.w)("$__token","*"),autoComplete:"new-token",value:d,max:6})),!c.status&&d&&6===d.length&&a.a.createElement("div",{style:{padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"7px"},onClick:function(){b()}},a.a.createElement(Ce.a,{icon:"check",text:Object(S.w)("$__activeToken","*"),title:!Object(S.w)("$__activeToken","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")}))))}))),Be=r(98);function ze(){ze=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ye=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(De)((function(e){var t=e.classes,r=l.a.getState(),o=r.sideModule,i=r.db,c=a.a.useState(o.data),s=Object(m.a)(c,2),u=s[0],d=s[1],g=Object(n.useState)(o.data),b=Object(m.a)(g,1)[0],v=a.a.useState(o.data&&o.data.language?o.data.language:"pt-BR"),y=Object(m.a)(v,2),x=y[0],w=y[1],_=JSON.stringify(b)!==JSON.stringify(u),O=function(t){var r=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},t.name,t.value));"language"===t.name&&w(t.value),!t.value&&r[t.name]&&delete r[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:r})),d(r)},j=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},E=function(){var t=Object(f.a)(ze().mark((function t(r){return ze().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.o)(e);case 2:t.sent&&(Object(S.c)({message:Object(S.w)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),u.language!==x&&e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{language:x})),r&&(j(!0),u.language!==x&&setTimeout((function(){window.location.reload()}),1500)));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();console.log(b,u);var k=Object(S.j)(),L=!1;return k&&k.user&&(k.userAdmin||k.userEdit)&&(L=!0),a.a.createElement("div",null,a.a.createElement(ve,{save:_?function(){return E()}:null,saveClose:_?function(){return E(!0)}:null,close:function(){return j(!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.w)("$__language",1)),a.a.createElement(Be.a,{id:"combo-box-demo",options:i.languages,getOptionLabel:function(e){return Object(S.w)(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(_e.a,Object.assign({},e,{label:Object(S.w)("$__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){O({name:"language",value:t.value})}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__sessionDuration",1)),a.a.createElement("div",null,Object(S.w)("$__sessionDurationDescription",1)),a.a.createElement(Be.a,{id:"combo-box-demo",options:i.expiresIn,getOptionLabel:function(e){return Object(S.w)(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(_e.a,Object.assign({},e,{label:Object(S.w)("$__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){O({name:"expiresIn",value:t.value})}})),l.a.getState().session.isResale&&"user"!==u.type?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},l.a.getState().db.users[u._id].independentAccount?a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.w)("$__thisIsAIndependentAccountExplain",1)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!u.independentAccount,onChange:function(e){L&&O({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.w)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null)))}))),Re=r(91),Ge=r.n(Re),He=r(232);function We(){We=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ue=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(De)((function(e){var t=e.classes,r=l.a.getState(),o=r.sideModule,i=r.db,c=Object(n.useState)(o.data),s=Object(m.a)(c,2),u=s[0],d=s[1],g=Object(n.useState)(o.data),b=Object(m.a)(g,2),v=b[0],y=b[1],x=JSON.stringify(u)!==JSON.stringify(v),w=function(t){var r=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},t.name,t.value));e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:Object(p.a)(Object(p.a)({},o.data),{},Object(h.a)({},t.name,t.value))})),!t.value&&r[t.name]&&delete r[t.name],d(r)},_=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},O=function(){var t=Object(f.a)(We().mark((function t(r){return We().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.o)(e);case 2:t.sent&&(Object(S.c)({message:Object(S.w)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),y(u),r&&_(!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(ve,{save:x?function(){return O()}:null,saveClose:x?function(){return O(!0)}:null,close:function(){return _(!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.w)("$__limitNumberOfUsers",1)),a.a.createElement("div",null,Object(S.w)("$__limitAdminUsersExplain",1),a.a.createElement(_e.a,{label:Object(S.w)("$__numberOfUsers"),variant:"outlined",name:"customAdmins",type:"number",min:0,max:99999,InputLabelProps:{shrink:!0},InputProps:{type:"number",onChange:function(e){0===e.target.value?w({name:"customAdmins",value:null}):w({name:"customAdmins",value:e.target.value>0?e.target.value:0})}},value:u.customAdmins||0}))),l.a.getState().session.isResale?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},l.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.w)("$__thisIsAIndependentAccountExplain",1)),a.a.createElement("ul",{style:{color:"gray",fontSize:12,width:"100%",textAlign:"initial"}},u.plan?a.a.createElement("li",null,Object(S.w)("$__signaturePlan",1),": ",Object(S.w)(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.w)("$__expireAccountDate",1),": ",Ge()(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(Te.a,{checked:!!u.independentAccount,onChange:function(e){E&&w({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.w)("$__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(Be.a,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.w)(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(_e.a,Object.assign({},e,{label:Object(S.w)("$__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&&w({name:"plan",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),u.independentAccount&&u.plan&&"p0"!==u.plan&&!v.expireAccountDate?a.a.createElement(He.a,{placeholder:Object(S.w)("$__dueDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){w({name:"expireAccountDate",value:String(Ge()(e).unix("X"))})},maxDate:new Date(1e3*Ge()().add("days",30).unix("X")),startDate:u&&u.expireAccountDate?new Date(1e3*u.expireAccountDate):null}):a.a.createElement(a.a.Fragment,null)))}))),qe=r(1177),Ve=r.n(qe),Je=r(1178),Xe=r.n(Je);var Ke=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(De)((function(e){var t=a.a.useState(!1),r=Object(m.a)(t,1)[0];return a.a.createElement("div",null,a.a.createElement(ve,{close:function(){r?Object(S.c)({message:Object(S.w)("$__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.w)("$__mobileTokenTip_1")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.w)("$__mobileTokenTip_2")),a.a.createElement("li",null,Object(S.w)("$__mobileTokenTip_3")),a.a.createElement("li",null,Object(S.w)("$__mobileTokenTip_4")))),a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Xe.a,style:{width:"52%"}}),a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Ve.a,style:{width:"52%",marginTop:"33px"}})))}))),Ze=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(p.a)(Object(p.a)({},Z.k),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"25%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(p.a)(Object(p.a)({},Z.k),{},{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(p.a)(Object(p.a)({},Z.k),{},{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(p.a)(Object(p.a)({},Z.k),{},{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")}}},Qe=r(359),et=r(24),tt=Object(u.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(T.b)(I,e)}))(Object(le.a)(Ze)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=Object(et.j)(r.id)),a.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},a.a.createElement(Qe.a,{onClick:function(){e.openModule(e.module)}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},a.a.createElement(re.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(re.a,{className:t.MenuButton_arrow,color:r.activeModule===e.module?Object(S.d)("active"):Object(S.d)("colorText"),icon:"play_arrow"})))}))),rt=r(495);function nt(e){var t=Object(Y.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(rt.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(rt.a,{variant:e.variant?e.variant:"contained",color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children)}var at=r(150);function ot(){ot=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var it=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.sideModule,n=t.db,o=t.functions.socket,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],g=a.a.useState(!1),b=Object(m.a)(g,2),v=b[0],y=b[1],x=a.a.useState(null),w=Object(m.a)(x,2),_=w[0],O=w[1],j=a.a.useState({}),E=Object(m.a)(j,2),k=E[0],L=E[1],C=a.a.useState(0),I=Object(m.a)(C,2),T=I[0],D=I[1],F=a.a.useState(""),N=Object(m.a)(F,2),A=N[0],P=N[1],$=r.data||{},M=0;$&&"step"===$.type&&(M=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent===$._id&&!l.a.getState().db.cards[e].deleted})).length);var B=window.location.hash.split("/");B[0]=B[0].replace("#",""),a.a.useEffect((function(){return"user"===$.type?G():y(!1),function(){}}),[]),a.a.useEffect((function(){z()}),[$._id]);var z=function(){var e=Object(f.a)(ot().mark((function e(){var t;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(et.s)($._id);case 2:(t=e.sent)&&L(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){var t=Object(f.a)(ot().mark((function t(){return ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(M>0)){t.next=3;break}return Object(S.c)({message:Object(S.w)("$__beforeRemovingYouneedToMoveAllActivitiesInTheColumn",1),variant:"warning",persist:!1,horizontal:"center"}),t.abrupt("return");case 3:Object(S.c)({message:Object(S.w)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(et.o)(e,{_id:$._id},!1),Object(S.f)(e,{_id:$._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE"),"plan"===$.type&&window.location.pathname.indexOf("sp")>-1&&B.length>0&&B[0]&&36===B[0].length&&c.a.push("sp")}});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Object(f.a)(ot().mark((function t(){return ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(et.o)(e,{_id:$._id},!1,!0),e.reduxFunction("ASYNC","CLEAR_MODULE"),"plan"===$.type&&window.location.pathname.indexOf("sp")>-1&&B.length>0&&B[0]&&36===B[0].length&&c.a.push("sp")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){var e=Object(f.a)(ot().mark((function e(){var t;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!1),e.next=3,Pe.a.post("/Card_Count",{id:$._id,all:!0,rel:"INN"});case 3:(t=e.sent)&&(y(!0),D(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=Object(f.a)(ot().mark((function e(){return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0),o.emit("data",{module:"user",method:"post",action:"migrate"},{from:$._id,fromData:$,to:_,toData:n.users[_]},Object(f.a)(ot().mark((function e(){var t;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),t=Object(p.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[$._id]})).forEach((function(e){t[e]._users&&!t[e]._users[_]&&(t[e]._users=Object(p.a)(Object(p.a)({},t[e]._users||{}),{},Object(h.a)({},_,{access:t[e]._users[$._id].access,_id:_}))),delete t[e]._users[$._id]})),y(!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(ve,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),$._id&&n.cards[$._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.w)("$__deleteOptions",1)),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},"chatGroup"===$.type?Object(S.w)("$__deleteThisChatGroup",1):Object(S.w)("$__deleteThisActivity",1)),a.a.createElement(nt,{onClick:function(){Y()}},Object(S.w)("$__delete",1))),"step"!==$.type&&Object.keys(k).length>0&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__thisActivityHasOtherLinkedsActivities",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},Object(S.w)("$__deleteAllActiviesLinkedAlert",1)),a.a.createElement(nt,{onClick:function(){R()}},Object(S.w)("$__deleteAll",1))))),$._id&&n.users[$._id]&&("client"===n.users[$._id].type||"group"===n.users[$._id].type||"sic"===n.users[$._id].type||"unity"===n.users[$._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===$._id})).length>0?Object(S.w)("$__delete".concat(n.users[$._id].type,"WithUsersDescription"),1):Object(S.w)("$__delete".concat(n.users[$._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__deleteThisDescription",1)),a.a.createElement(nt,{onClick:function(){Y()}},Object(S.w)("$__deleteThis",1))),$._id&&n.users[$._id]&&"client"!==n.users[$._id].type&&"group"!==n.users[$._id].type&&"sic"!==n.users[$._id].type&&"unity"===n.users[$._id].type&&a.a.createElement(a.a.Fragment,null,v?a.a.createElement(a.a.Fragment,null,T>0&&!u?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__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"}},T," ",Object(S.w)("$__items"),a.a.createElement("br",null),Object(S.w)("$__deleteCountCardsExplain"))),_?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){O(null)}},a.a.createElement(at.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(nt,{onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.w)("$__confirm"),text:Object(S.w)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){H()}},{shadow:!0,title:Object(S.w)("$__cancel"),text:Object(S.w)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.w)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.w)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(_e.a,{label:Object(S.w)("$__search","*"),variant:"standard",autoFocus:!0,value:A,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("color")},"search")),onChange:function(e){P(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==$._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!$._parent&&!n.users[e]._parent||$._parent&&n.users[e]._parent===$._parent)&&(!A||A&&n.users[e].name.toLowerCase().indexOf(A.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(at.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.w)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__deactivateWhithoutMigration",1)),a.a.createElement(nt,{onClick:function(){Y()}},Object(S.w)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__deactivateUserDescription",1)),a.a.createElement(nt,{onClick:function(){Y()}},Object(S.w)("$__deactivateThis",1)))):a.a.createElement(a.a.Fragment,null),v?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(be.a,null)):a.a.createElement(a.a.Fragment,null)))})),ct=r(69),lt=r(182);var st=Object(u.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(""),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[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(_e.a,{label:Object(S.w)("$__ApprovalOrRejectReason",1),variant:Object(S.d)("fieldVariant"),name:"reason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){o(e.target.value)}},value:n,placeholder:Object(S.w)("$__ApprovalOrRejectReason",1)})),l?a.a.createElement(ct.a,null):a.a.createElement("div",{style:{display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(k.a,{reverse:!0,title:Object(S.w)("$__indorse"),text:Object(S.w)("$__indorse"),color:"green",textColor:"green",icon:"approval",onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmApproveItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(lt.a)(Object(p.a)(Object(p.a)({},e),{},{reason:n,approval:!0,approved:!0})),s(!0),e.onAction&&e.onAction()}})},size:"25px",style:{padding:12}}),a.a.createElement(k.a,{reverse:!0,title:Object(S.w)("$__reject"),text:Object(S.w)("$__reject"),color:"red",textColor:"red",icon:"backspace",onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmRejectItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(lt.a)(Object(p.a)(Object(p.a)({},e),{},{reason:n,approval:!0})),e.onAction&&e.onAction()}})},size:"25px",style:{padding:12}}))))})),ut=r(50),dt=r(198),pt=r(457),ft=r(61),ht=r(30),mt=r(31),gt=r(136),bt=r(40),vt=r(41),yt=r(884),xt=r.n(yt),wt=["currencySymbol"],_t=function(e){Object(bt.a)(r,e);var t=Object(vt.a)(r);function r(e){var n;return Object(ht.a)(this,r),(n=t.call(this,e)).getValue=n.getValue.bind(Object(gt.a)(n)),n.callEventHandler=n.callEventHandler.bind(Object(gt.a)(n)),n}return Object(mt.a)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.currencySymbol,Object(ft.a)(e,wt));this.autonumeric=new xt.a(this.input,this.props.value,Object(p.a)(Object(p.a)(Object(p.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:"UNSAFE_componentWillUnmount",value:function(){this.autonumeric.remove()}},{key:"UNSAFE_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.currencySymbol,n=t.inputProps,o=t.InputProps,i={};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(H.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(p.a)({startAdornment:a.a.createElement(je.a,{position:"start"},r)},o),inputProps:Object(p.a)({},n)},i))}}]),r}(a.a.Component);_t.defaultProps={type:"text",variant:"standard",currencySymbol:"$",outputFormat:"number",textAlign:"right",maximumValue:"10000000000000",minimumValue:"-10000000000000"};var Ot=_t,jt=(xt.a.getPredefinedOptions(),function(e){var t=l.a.getState().db,r=Object(n.useState)(e.values||{}),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object(n.useState)(null),u=Object(m.a)(s,2),d=u[0],f=u[1],g=Object(n.useState)([]),b=Object(m.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){var r=[];l.a.getState().forms[e.formId].boardColumns&&Object.keys(t.cards).filter((function(r){return t.cards[r]._parent===e.boardId&&"step"===t.cards[r].type&&!t.cards[r].deleted})).sort((function(e,r){var n="A".concat(t.cards[e].step),a="A".concat(t.cards[r].step);return n>a?1:n<a?-1:0})).forEach((function(e,t){0===t&&e&&f(e),r.push(e)})),y(r)}),[e.boardId]),a.a.useEffect((function(){e.onChange&&e.onChange(i,w())}),[i]),a.a.useEffect((function(){e.columnChange&&d&&e.columnChange(d)}),[d]),a.a.useLayoutEffect((function(){e.onChange&&e.onChange(i,w())}),[]);var x=JSON.parse(l.a.getState().forms[e.formId].elements)||[],w=function(e){var t;return x.forEach((function(e){e.required&&(!e.depends&&(!i[e.id]||i[e.id]&&"undefined"===typeof i[e.id])||e.depends&&e.dependsOn&&!i[e.id]&&i[e.dependsOn]&&("object"===typeof e.dependsValue&&e.dependsValue.filter((function(t){return i[e.dependsOn].indexOf(t)>-1})).length>0||"object"!==typeof e.dependsValue&&i[e.dependsOn]===e.dependsValue))&&(t="".concat(Object(S.w)("$_fillAllRequiredAsks")))})),t||null},_=function(e,t){i[e]?i[e].includes(t)?c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e,i[e].filter((function(e){return e!==t}))))):c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e,[].concat(Object(A.a)(i[e]),[t])))):c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e,[t])))};return a.a.createElement("div",{style:Object(p.a)({width:"100%"},e.style?e.style:{})},null===x||void 0===x?void 0:x.map((function(t,r){return!t.depends||t.depends&&(Array.isArray(t.dependsValue)&&JSON.stringify(i[t.dependsOn])===JSON.stringify(t.dependsValue)||!Array.isArray(t.dependsValue)&&i[t.dependsOn]===t.dependsValue)?a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"20px",alignItems:"center",marginBottom:"10px",width:"100%"},key:"item_".concat(t.id,"_").concat(r)},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%"}},a.a.createElement("label",{htmlFor:t.id,style:{marginBottom:"5px"}},t.name,t.required?"*":null,":"),"radio"===t.type||"checkbox"===t.type?null===t||void 0===t?void 0:t.items.map((function(r,n){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"},key:"op_".concat(t.id,"_").concat(r),onClick:function(e){"radio"===t.type&&c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.id,r))),"checkbox"===t.type&&_(t.id,r)}},a.a.createElement("div",{style:{pointerEvents:"none"}},a.a.createElement("input",Object.assign({id:"op_".concat(t.id,"_").concat(r),name:"op_".concat(t.id),type:t.type,required:!!t.required},"radio"===t.type?{checked:!(!i[t.id]||i[t.id]!==r)}:{},"checkbox"===t.type?{checked:!!(i&&i[t.id]&&i[t.id].length>0&&i[t.id].indexOf(r)>-1)}:{},e.disabled?{disabled:!0}:{},{onClick:function(e){"radio"===t.type&&c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.id,r))),"checkbox"===t.type&&_(t.id,r)}})),a.a.createElement("label",{htmlFor:"op_".concat(t.id,"_").concat(r),style:{color:"#aaa"}},r)))})):"textarea"===t.type?a.a.createElement("textarea",Object.assign({rows:4,id:t.id,required:!!t.required,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)"},onChange:function(e){return c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.id,e.target.value)))},value:i[t.id]||""},e.disabled?{disabled:!0}:{})):a.a.createElement("input",Object.assign({type:t.type,id:t.id,required:!!t.required,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)"},value:i[t.id]||"",onChange:function(e){return c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.id,e.target.value)))}},e.disabled?{disabled:!0}:{})))):null})),l.a.getState().forms[e.formId].boardColumns&&v&&d&&v.length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",fontWeight:"bold",marginBottom:5,marginTop:5}},Object(S.w)("$__step","*")),v.map((function(e,r){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",gap:"5px",margin:"3px 0px"},key:"col_".concat(e,"_").concat(r),onClick:function(t){f(e)}},a.a.createElement("div",{style:{pointerEvents:"none"}},a.a.createElement("input",{id:"col_".concat(e,"_").concat(r),name:"column",type:"radio",required:!0,checked:d===e,onClick:function(t){f(e)}}),a.a.createElement("label",{htmlFor:"col_".concat(e,"_").concat(r),style:{color:"#aaa"}},t.cards[e].name)))}))):a.a.createElement(a.a.Fragment,null))}),Et=r(2002),kt=r(1179),St=r.n(kt),Lt=r(568),Ct=r(360),It=r(567),Tt=r(755);function Dt(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useRef(null),c=a.a.useState(0),l=Object(m.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(Et.a,{variant:"text",ref:i,"aria-label":"split button"},a.a.createElement(rt.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(rt.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(St.a,null))),a.a.createElement(It.a,{open:n,anchorEl:i.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Lt.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:p},a.a.createElement(Tt.a,{id:"split-button-menu"},e.options.map((function(t,r){return a.a.createElement(G.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var Ft=r(390),Nt=Object(Y.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)}}})),At={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var Pt=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({recurrence:"0"}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=Nt();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(p.a)(Object(p.a)({},t),{},{recurrenceNextDate:n})}(t)),t.recurrence&&parseInt(t.recurrence)>0&&parseInt(t.recurrence)<31&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(parseInt(t.recurrence),"days").format("YYYY-MM-DD")})),"everyFriday"===t.recurrence&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(5).format("YYYY-MM-DD")})),"everyMonday"===t.recurrence&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(1).format("YYYY-MM-DD")})),"everyFirstMonthDay"===t.recurrence&&(r=Object(p.a)(Object(p.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.w)("$__recurrence"),a.a.createElement(Dt,{options:[{value:"0",label:Object(S.w)("$__nonrecurrence")},{value:"1",label:Object(S.w)("$__everyDay")},{value:"7",label:Object(S.w)("$__weekly")},{value:"15",label:Object(S.w)("$__every15days")},{value:"30",label:Object(S.w)("$__every30days")},{value:"everyFirstMonthDay",label:Object(S.w)("$__everyFirstMonthDay")},{value:"everyMonday",label:Object(S.w)("$__everyMonday")},{value:"everyFriday",label:Object(S.w)("$__everyFriday")},{value:"custom",label:Object(S.w)("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(p.a)(Object(p.a)({},At),{},{recurrence:null,recurrenceRepeatDays:null}):"custom"!==e?{recurrence:"".concat(e),recurrenceRepeatDays:null}:Object(p.a)(Object(p.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.w)("$__preffers",1),n&&"custom"===n.recurrence&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.w)("$__repeatEvery",1),a.a.createElement(_e.a,{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(je.a,{position:"end"},a.a.createElement(re.a,{icon:"replay_10"}),Object(S.w)("$__days").toLowerCase()),onChange:function(e){parseInt(e.target.value)>0&&c(Object(p.a)(Object(p.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.w)("$__limitDate",1),a.a.createElement(_e.a,{style:{width:"200px"},variant:Object(S.d)("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"clear",onClick:function(){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceEndDate:null}))}})):null,autoComplete:"new-password",onBlur:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceEndDate:e.target.value?_()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))},onChange:function(e){c(Object(p.a)(Object(p.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.w)("$__recurrenceDuplicateCard",1),a.a.createElement(Te.a,{checked:!!n.recurrenceDuplicateCard,onChange:function(e){c(Object(p.a)(Object(p.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.w)("$__copyCatenation",1),a.a.createElement(Te.a,{checked:!!n.recurrenceCopyCatenation,onChange:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceCopyCatenation:!n.recurrenceCopyCatenation}))},name:"recurrenceCopyCatenation",inputProps:{"aria-label":"secondary checkbox"}}))))})),$t=r(238),Mt=r(458);function Bt(){Bt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var zt=Object(u.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Mt.a)((function(e){var t=a.a.useState([]),r=Object(m.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.forEach((function(e){l.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),o(t)}}),[e.data]);var c=function(){var t=Object(f.a)(Bt().mark((function t(r){return Bt().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($t.a,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:l.a.getState().db.tag?l.a.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:Object(S.w)("$__tags"),api:"tag/add",add:!0,filterSelectedOptions:!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){c(e)},colorPickerCallBack:function(e){l.a.getState().functions.socket.emit("tag.UPD",e)},groupByParent:!0}))}))),Yt=r(344),Rt=r(65),Gt=r(124),Ht=r.n(Gt);function Wt(){Wt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ut=Object(u.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id],cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t,r,n,o,i,s=e.classes,u=e.sideModule,d=l.a.getState(),g=d.db,b=d.session,v=g.planType,y=a.a.useState({}),x=Object(m.a)(y,2),w=x[0],O=x[1],j=a.a.useState({}),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(!1),T=Object(m.a)(I,2),D=T[0],F=T[1],N=a.a.useState(!1),P=Object(m.a)(N,2),$=P[0],M=P[1],B=a.a.useState(!1),z=Object(m.a)(B,2),Y=z[0],R=z[1],G=a.a.useState(!1),H=Object(m.a)(G,2),W=H[0],U=H[1],q=a.a.useState(null),V=Object(m.a)(q,2),J=V[0],X=V[1],K=a.a.useState(null),Z=Object(m.a)(K,2),Q=Z[0],ee=Z[1],te=a.a.useState(!1),ne=Object(m.a)(te,2),ae=ne[0],oe=ne[1],ie=a.a.useState(0),ce=Object(m.a)(ie,2),le=ce[0],se=ce[1],ue=a.a.useState(!1),de=Object(m.a)(ue,2),pe=de[0],fe=de[1],he=Object(S.j)(),me=Object(et.t)(u.id);a.a.useEffect((function(){w._id!==u.data._id&&(O(u.data),F(!1)),W||(u.data.startDate&&X(u.data&&u.data.startDate?u.data.startDate:null),u.data.endDate&&ee(u.data&&u.data.endDate?u.data.endDate:null),O(u.data),F(!1),"link"!==w.type||w.name||Oe(),U(!0),ge()),u.data.name&&""!==u.data.name.trim()&&"link"===u.data.type&&"new"===u.data._id&&(F(!0),e.reqSave&&e.reqSave(!0))}),[u.data,w]),a.a.useEffect((function(){!w.name||w.name&&""===w.name.trim?F(!1):F(!0)}),[L]),a.a.useEffect((function(){e.cards[w._id]&&(e.cards[w._id]._requireApproval&&!w._requireApproval||!e.cards[w._id]._requireApproval&&w._requireApproval)&&O(Object(p.a)(Object(p.a)({},w),{},{_requireApproval:!e.cards[w._id]._requireApproval}))}),[e.cards]);var ge=function(){var t=Object(f.a)(Wt().mark((function t(){return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[u.data._id],cardLoad:"parents"});case 2:t.sent&&fe(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),be=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!u.data[t.name]&&!w[t.name]||u.data[t.name]&&u.data[t.name]!==t.value||n)&&e.reqSave&&e.reqSave(!0);var a=Object(p.a)(Object(p.a)({},w),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(a=Object(p.a)(Object(p.a)(Object(p.a)({},w),a),{},Object(h.a)({},r.name,r.value))),O(a),C(Object(p.a)(Object(p.a)({},L),{},Object(h.a)({},t.name,t.value),r&&r.name&&r.value?Object(h.a)({},r.name,r.value):{}))},ye=function(t){D&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},xe=function(){var t=Object(f.a)(Wt().mark((function t(){var r,n=arguments;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],$){t.next=19;break}if(F(!1),e.reqSave&&e.reqSave(!1),w.status||(w.status="notStarted"),"new"===u.id&&u.data&&O(Object(p.a)(Object(p.a)({},w),u.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},u),{},{data:w})),w.name&&(!w.name||""!==w.name.trim())){t.next=12;break}M(!1),Object(S.c)({message:Object(S.w)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(et.F)(Object(p.a)(Object(p.a)({},e),{},{store:Object(p.a)(Object(p.a)({},e.store),{},{db:Object(p.a)({},l.a.getState().db)})}),r,w);case 14:t.sent&&(L&&L.status&&(Object(et.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:w._id}}),{status:L.status}),Object(et.e)(e,w._id,L.status)),M(!1),Object(S.c)({message:Object(S.w)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),F(!1),e.reqSave&&e.reqSave(!1),r&&ye(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Oe=function(){var t=Object(f.a)(Wt().mark((function t(){var r;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Fe.a.post("/link/content",{url:w.url});case 2:r=t.sent,O(Object(p.a)(Object(p.a)({},w),{},{content:r.data.article})),F(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ee=u.data&&u.data.type?g.dataType.filter((function(e){return e.name===u.data.type}))[0]:{},ke=null;if(w._parent&&(ke=l.a.getState().db.cards[w._parent]),!w)return null;var Se=l.a.getState().db.cards[w._id]&&l.a.getState().db.cards[w._id]._users&&l.a.getState().db.cards[w._id]._users[b._id]&&l.a.getState().db.cards[w._id]._users[b._id].myDay?l.a.getState().db.cards[w._id]._users[b._id].myDay:null,Le=!!(!Se||Se&&Se&&_()(new Date(1e3*Se)).format("YYYY/MM/DD")!==_()().format("YYYY/MM/DD")),Ie=w.isTemplate?w.isTemplate:Object(et.R)(w._id),De=!!e.permission&&e.permission;!w||!w._planId||g.cards[w._planId]&&Object(et.B)(w._planId)||(De=!1),!De&&parseInt(me)>=4&&(De=!0),!De&&Object(et.B)(w._planId)&&he&&he.admin&&he.plan&&(he.planAdmin||he.planModerate)&&(De=!0),w._requireApproval&&w._parent&&(l.a.getState().db.cards[w._parent]&&l.a.getState().db.cards[w._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[w._id]._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[w._id]._parent]._users[b._id]&&l.a.getState().db.cards[l.a.getState().db.cards[w._id]._parent]._users[b._id].approvalResponsible||w._users&&1===Object.keys(w._users).length&&w._users[b._id])&&(De=!1);var Ne=!1,Ae=a.a.createElement(a.a.Fragment,null);if(w&&w.url&&w.url.indexOf(".youtube.com/watch?")>-1){var Pe=w.url.split("?")[1].split("v=")[1].split("&")[0];Pe&&(Ae=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(Pe),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),Ne=!0)}if(w&&w.url&&w.url.indexOf("//youtu.be/")>-1){var $e=w.url.split(".be/")[1];$e&&(Ae=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($e),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),Ne=!0)}var Me=w.formId?JSON.parse(l.a.getState().forms[w.formId].elements):[],ze={};return Me.forEach((function(e){w[e.id]&&(ze=Object(p.a)(Object(p.a)({},ze),{},Object(h.a)({},e.id,w[e.id])))})),a.a.createElement(a.a.Fragment,null,a.a.createElement(ve,{save:D&&De?function(){M(!0),xe()}:null,saveClose:D&&De?function(){M(!0),xe(!0)}:null,saveLoader:$,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:s.root},w._requireApproval&&w._parent&&(l.a.getState().db.cards[w._parent]&&l.a.getState().db.cards[w._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[w._id]._parent]._users[b._id]&&l.a.getState().db.cards[l.a.getState().db.cards[w._id]._parent]._users[b._id].approvalResponsible||w._users&&1===Object.keys(w._users).length&&w._users[b._id])?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.w)("$__attention",1),": ",a.a.createElement("span",{style:{color:"#FFFFFF"}},Object(S.w)("$__thisActivityRequireApproval",1))),a.a.createElement(st,{nodeId:w._id,onAction:function(){e.onClose()}})):a.a.createElement(a.a.Fragment,null),Ne?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"}},Ae):a.a.createElement(a.a.Fragment,null),De&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("imageUpload"))&&a.a.createElement(we.a,{img:w?w.image:null,onChange:function(e,t){be({name:"image",value:e}),be({name:"file",value:t})},files:w._files?w._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===w.type,aspectRatio:"chatGroup"===w.type?null:16/9,onDelete:function(){be({name:"image",value:null},{name:"file",value:null},!0)}}),!De&&w.image&&a.a.createElement("div",{className:s.image,style:{backgroundImage:"url(".concat(w.image,")")}}),"plan"!==w.type||w._id?a.a.createElement(a.a.Fragment,null):a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(Be.a,{id:"combo-box-demo",options:v,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"planType",disableClearable:!0,value:w&&w.planType?v.filter((function(e){return e.value===w.planType}))[0]:v[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:w&&w.planType?v.filter((function(e){return e.value===w.planType}))[0]:v[0]}))},onChange:function(e,t){be({name:"planType",value:t.value})}}),v.filter((function(e){return!w.planType||w.planType&&e.value===w.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(re.a,{icon:Ht.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.w)(v.filter((function(e){return!w.planType||w.planType&&e.value===w.planType}))[0].description,1))),a.a.createElement("div",{className:s.data},(w._parent||w._planId)&&pe?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.w)("$__loadingdata")),a.a.createElement(ct.a,null)):(w._parent&&g.cards[w._parent]||w._planId&&g.cards[w._planId])&&a.a.createElement(pt.a,{id:w._parent?w._parent:w._planId?w._planId:null,open:function(t){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:t},"step"===l.a.getState().db.cards[t].type?{module:"columnEdit",activeModule:"columnEdit"}:{module:"cardEdit",activeModule:"cardEdit"}),{},{data:l.a.getState().db.cards[t]}))}}),a.a.createElement("div",{style:{position:"relative",alignItems:"center",clear:"both",justifyContent:"space-between",display:"flex"}},w._id&&g.cards[w._id]&&g.cards[w._id]._users&&a.a.createElement(Ft.a,{_id:w._id,noLimit:!0,avatarSize:"33px",permission:De}),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"plan"===w.type&&w._id&&De?a.a.createElement(k.a,{title:Object(S.w)("$__openPlan",1),icon:"launch",color:"lightgray",onClick:function(){c.a.push("sp#".concat(w._id,"/dashboard")),ye(!0)},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.card&&e.card._id&&"plan"===e.card.type?a.a.createElement(k.a,{title:Object(S.w)(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,w._id,!(!e.card||!e.card._isFavorite)),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},w._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[w._id]),{},{_isFavorite:!e.card||!e.card._isFavorite})))}))},size:"25px"}):a.a.createElement(a.a.Fragment,null),w._id&&36===w._id.length&&"chatGroup"!==w.type&&"step"!==w.type&&!w.isTemplate&&!w.archived&&"completed"!==w.status&&a.a.createElement(k.a,{title:Object(S.w)(Se&&_()(new Date(1e3*Se)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:Se&&_()(new Date(1e3*Se)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"red":"lightblue",icon:Se&&_()(new Date(1e3*Se)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Object(et.J)(e,{_id:w._id,userId:b._id,option:Le}),e.myDayClick&&e.myDayClick()},size:"25px"}))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===w.type&&w._id?Object(S.w)("$__plan ".concat(w.planType?v[1].label:v[0].label),1):Object(S.w)("$__data",1)),"plan"!==w.type&&"chatGroup"!==w.type&&w&&w._planId&&g.cards[w._planId]&&g.cards[w._planId].refs?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__references")),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{width:"46%"}},a.a.createElement(_e.a,{label:w&&w._planId&&g.cards[w._planId]&&g.cards[w._planId].ref1Title||Object(S.w)("$__cardRef1",1),variant:Object(S.d)("fieldVariant"),name:"ref1",id:"edit_ref_1",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){be(e.target)}},value:w.ref1||"",placeholder:Object(S.w)((null===Ee||void 0===Ee||null===(t=Ee.fieldsTitle)||void 0===t||null===(r=t.placeholder)||void 0===r?void 0:r.ref1)||"$__cardRef1_placeholder",1),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("ref1")>-1))})),a.a.createElement("div",{style:{width:"8%",textAlign:"center",justifyContent:"center",alignItems:"center",fontSize:"24px",display:"flex",color:Object(S.d)("menu")}},"|"),a.a.createElement("div",{style:{width:"46%"}},a.a.createElement(_e.a,{label:w&&w._planId&&g.cards[w._planId]&&g.cards[w._planId].ref2Title||Object(S.w)("$__cardRef2",1),variant:Object(S.d)("fieldVariant"),name:"ref2",id:"edit_ref_2",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){be(e.target)}},value:w.ref2||"",placeholder:Object(S.w)((null===Ee||void 0===Ee||null===(n=Ee.fieldsTitle)||void 0===n||null===(o=n.placeholder)||void 0===o?void 0:o.ref2)||"$__cardRef2_placeholder",1),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("ref2")>-1))})))):a.a.createElement(a.a.Fragment,null),a.a.createElement(_e.a,{label:Object(S.w)(Ee&&Ee.fieldsTitle&&Ee.fieldsTitle.name?Ee.fieldsTitle.name:"$__titleOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",id:"edit_693",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){be(e.target)}},value:w&&w.name?w.name:"",placeholder:Object(S.w)(Ee&&Ee.fieldsTitle&&Ee.fieldsTitle.placeholder&&Ee.fieldsTitle.placeholder.name?Ee.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("name")>-1))}),me>3||w.description||De?a.a.createElement(a.a.Fragment,null,a.a.createElement(_e.a,{label:Object(S.w)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){be(e.target)}},value:w&&w.description?w.description:"",placeholder:Object(S.w)("$__descriptionOfCard_placeholder",1),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),"task"===w.type||"iniciative"===w.type?a.a.createElement(Ot,{label:Object(S.w)("$__price",1),variant:"standard",currencySymbol:"$",outputFormat:"string",style:{width:"100%",marginBottom:10},value:w&&w.value?w.value:"",onChange:function(e,t){return be({name:"value",value:t})}}):a.a.createElement(a.a.Fragment,null),(me>3||w.url||De)&&"chatGroup"!==w.type?a.a.createElement(_e.a,{label:Object(S.w)("$__URL",1),variant:Object(S.d)("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"http"})),onChange:function(e){be(e.target)}},value:w&&w.url?w.url:"",placeholder:"https://domain.com",disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("name")>-1))}):a.a.createElement(a.a.Fragment,null),w.url?a.a.createElement("div",{style:{width:"100%",textAlign:"right"}},a.a.createElement("a",{href:w.url,target:"_blank",rel:"noopener noreferrer",style:{color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.w)("$__openlink","*"))):a.a.createElement(a.a.Fragment,null)),w.formId&&"47a4ecb1-5244-4fa5-abdd-83f6eaf3cd36"===(null===(i=l.a.getState().session)||void 0===i?void 0:i.account)?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__formAnswers")),a.a.createElement(jt,{formId:w.formId,values:ze,onChange:function(e,t){},disabled:!0})):a.a.createElement(a.a.Fragment,null),(me>3||w.client||De)&&!Ie&&De&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("client"))&&(!w.client||w.client&&g.users[w.client])&&a.a.createElement(Be.a,{id:"combo-box-demo",options:Object.keys(g.users).filter((function(e){return"client"===g.users[e].type||"group"===g.users[e].type||"sic"===g.users[e].type})).sort((function(e,t){return g.users[e].name<g.users[t].name?-1:g.users[e].name>g.users[t].name?1:0})).map((function(e){return{label:g.users[e].name,value:String(g.users[e]._id)}})),getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"client",value:w&&w.client?Object.keys(g.users).filter((function(e){return w.client&&g.users[e]._id===w.client})).map((function(e){return{label:g.users[e].name,value:String(g.users[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__account",1),variant:Object(S.d)("fieldVariant"),value:w&&w.client?Object.keys(g.users).filter((function(e){return w.client&&g.users[e]._id===w.client})).map((function(e){return{label:g.users[e].name,value:String(g.users[e]._id)}}))[0]:null}))},onChange:function(e,t){be({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("client")>-1))}),a.a.createElement("div",null,e.card&&"plan"!==w.type&&"chatGroup"!==w.type&&e.card._id&&e.card._users[b._id]&&"completed"!==w.status&&me>0?a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Yt.a,{data:e.card})):a.a.createElement(a.a.Fragment,null)),((me>2||w.endDate||w.startDate||De)&&!Ie&&"chatGroup"!==w.type||!(!De&&!w.startDate&&!w.endDate)&&!Ie&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("deadline")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__deadline",1)),w.endDate||w.startDate||Y?a.a.createElement(a.a.Fragment,null,a.a.createElement(_e.a,{label:Object(S.w)("$__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()&&X(_()(e.target.value).unix("X"));var t={startDate:_()(e.target.value).unix("X")};X(_()(e.target.value).unix("X")),(!Q||Q<_()(e.target.value).unix("X"))&&(t=Object(p.a)(Object(p.a)({},t),{},{endDate:_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X")}),ee(_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),O(Object(p.a)(Object(p.a)({},w),t)),F(!0)}},value:J?_()(1e3*J).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement(_e.a,{label:Object(S.w)("$__endDate",1),variant:Object(S.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:!Q||J?_()(1e3*J).format("YYYY-MM-DDTHH:mm"):null,autoComplete:"end-date",onChange:function(e){var t={endDate:_()(e.target.value).unix("X")};ee(_()(e.target.value).unix("X")),J||(t=Object(p.a)(Object(p.a)({},t),{},{startDate:_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),X(_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),O(Object(p.a)(Object(p.a)({},w),t)),F(!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(k.a,{color:Object(S.d)("lightgray"),icon:"clear",onClick:function(){X(null),ee(null),O(Object(p.a)(Object(p.a)({},w),{},{startDate:null,endDate:null,recurrence:null})),R(!1),F(!0)},size:"15px",title:Object(S.w)("$__clearDate","*"),text:Object(S.w)("$__clearDate","*")})),a.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},a.a.createElement(Dt,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(Object(S.w)("$__days").toLowerCase())},{value:15,label:"15 ".concat(Object(S.w)("$__days").toLowerCase())},{value:30,label:"30 ".concat(Object(S.w)("$__days").toLowerCase())},{value:60,label:"60 ".concat(Object(S.w)("$__days").toLowerCase())},{value:90,label:"90 ".concat(Object(S.w)("$__days").toLowerCase())},{value:180,label:"180 ".concat(Object(S.w)("$__days").toLowerCase())},{value:365,label:"365 ".concat(Object(S.w)("$__days").toLowerCase())}].concat(Object(A.a)(ke&&ke.startDate&&ke.endDate?[{value:"parent",label:"".concat(Object(S.w)("$__useParentDate")," ").concat(_()(1e3*ke.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(_()(1e3*ke.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:le||"",onChange:function(e){"parent"!==e&&0!==e?(ee(_()(new Date(1e3*J)).tz("America/Sao_Paulo").add(e,"days").unix("X")),be({name:"endDate",value:_()(new Date(1e3*J)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(ke.startDate&&(X(ke.startDate),be({name:"startDate",value:ke.startDate},ke.endDate?{name:"endDate",value:ke.endDate}:null,!0),ke.endDate&&ee(ke.endDate)),!ke.startDate&&ke.endDate&&(ee(ke.endDate),be({name:"endDate",value:ke.endDate},null,!0))),se(e)}})),a.a.createElement("div",{className:s.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.w)("$__freeChildrenDate",1),a.a.createElement(Te.a,{checked:!!w.freeChildrenDate,onChange:function(e){be({name:"freeChildrenDate",value:!w.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("freeChildrenDate")>-1))})),w.startDate&&_()(w.startDate).isValid()&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("recurrence"))&&a.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},w._recurrenceId?a.a.createElement("div",{style:{marginTop:"15px"}},Object(S.w)("$__recurrentActivityFrom"),":",a.a.createElement(ut.a,{db:"cards",cardId:g.cards[w._recurrenceId]._id,Avatar:!0,ignoreList:!0,onlyOption:!0})):a.a.createElement("div",null,a.a.createElement(Pt,{data:w,onChange:function(e){O(Object(p.a)(Object(p.a)(Object(p.a)({},w),e),{},{recurrenceNextDate:_()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),F(!0)}}),w.recurrence&&"0"!==w.recurrence&&w.recurrenceNextDate&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",null,Object(S.w)("$__NextRecurrenceDate")),a.a.createElement(He.a,{placeholder:Object(S.w)("$__NextRecurrenceDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:_()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};O(Object(p.a)(Object(p.a)({},w),t)),F(!0)},startDate:w.recurrenceNextDate&&_()(w.recurrenceNextDate).isValid()?new Date(1e3*_()("".concat(w.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){O(Object(p.a)(Object(p.a)({},w),{},{recurrenceNextDate:null})),F(!0)}}))))):De||(me>2||w.endDate||w.startDate||De)&&!Ie?a.a.createElement(Ce.a,{text:Object(S.w)("$__addDeadline",1),icon:"timer",onClick:function(){R(!0),X(_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),be({name:"startDate",value:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==le?{name:"endDate",value:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add(le,"days").unix("X")}:null),"parent"!==le&&ee(_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add(le,"days").unix("X"))}}):a.a.createElement(a.a.Fragment,null)),("completed"===w.status||!De)&&me<3?a.a.createElement(a.a.Fragment,null,w._tags&&w._tags.length>0?a.a.createElement(dt.a,{options:w._tags,expanded:!0}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("tags"))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__tags",1)),a.a.createElement(zt,{data:{values:w._tags?w._tags:[]},callBack:function(e){De&&be({name:"_tags",value:e})},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.w)("$__selectTheOptions",1)}),w&&w._tags&&w._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{className:s.switch},a.a.createElement(Te.a,{checked:!!w.childrenAutoTag,onChange:function(e){De&&be({name:"childrenAutoTag",value:!w.childrenAutoTag})},name:"childrenAutoTag",inputProps:{"aria-label":"secondary checkbox"},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("childrenAutoTag")>-1))}),Object(S.w)("$__makeLinksAssumeTheSameLabelsOnAdd",1)):a.a.createElement(a.a.Fragment,null))),(!Ee.hideFields||Ee.hideFields&&(-1===Ee.hideFields.indexOf("priority")||-1===Ee.hideFields.indexOf("status")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},!Ie&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.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(Be.a,{id:"combo-box-demo",options:g.priority,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:w&&w.priority&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.priority)}))[0]:g.priority[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__priority",1),variant:Object(S.d)("fieldVariant"),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:w&&w.priority?g.priority.filter((function(e){return String(e.value)===String(w.priority)}))[0].color:g.priority[0].color,borderLeft:"solid 3.33px ".concat(w&&w.priority?g.priority.filter((function(e){return String(e.value)===String(w.priority)}))[0].color:g.priority[0].color)})}),value:w&&w.priority&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.priority)}))[0]:g.priority[0]}))},onChange:function(e,t){De&&be({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.w)(e.label,1))},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Be.a,{id:"combo-box-demo",options:g.priority,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:w&&w.risk&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.risk)}))[0]:g.priority[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__risk",1),variant:Object(S.d)("fieldVariant"),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:w&&w.risk?g.priority.filter((function(e){return String(e.value)===String(w.risk)}))[0].color:g.priority[0].color,borderLeft:"solid 3.33px ".concat(w&&w.risk?g.priority.filter((function(e){return String(e.value)===String(w.risk)}))[0].color:g.priority[0].color)})}),value:w&&w.risk&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.risk)}))[0]:g.priority[0]}))},onChange:function(e,t){De&&be({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.w)(e.label,1))},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Be.a,{id:"combo-box-demo",options:g.priority,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:w&&w.complexity&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.complexity)}))[0]:g.priority[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__complexity",1),variant:Object(S.d)("fieldVariant"),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:w&&w.complexity?g.priority.filter((function(e){return String(e.value)===String(w.complexity)}))[0].color:g.priority[0].color,borderLeft:"solid 3.33px ".concat(w&&w.complexity?g.priority.filter((function(e){return String(e.value)===String(w.complexity)}))[0].color:g.priority[0].color)})}),value:w&&w.complexity&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.complexity)}))[0]:g.priority[0]}))},onChange:function(e,t){De&&be({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.w)(e.label,1))},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Be.a,{id:"combo-box-demo",options:g.priority,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:w&&w.impact&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.impact)}))[0]:g.priority[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__impact",1),variant:Object(S.d)("fieldVariant"),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:w&&w.impact?g.priority.filter((function(e){return String(e.value)===String(w.impact)}))[0].color:g.priority[0].color,borderLeft:"solid 3.33px ".concat(w&&w.impact?g.priority.filter((function(e){return String(e.value)===String(w.impact)}))[0].color:g.priority[0].color)})}),value:w&&w.impact&&g.priority?g.priority.filter((function(e){return String(e.value)===String(w.impact)}))[0]:g.priority[0]}))},onChange:function(e,t){De&&be({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.w)(e.label,1))},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("priority")>-1))}))),!Ie&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("status"))&&a.a.createElement(Be.a,{id:"combo-box-demo",options:g.status,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:w&&w.status&&g.status?g.status.filter((function(e){return String(e.value)===String(w.status)}))[0]:g.status[0],renderInput:function(e){return a.a.createElement("div",null," ",a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__status",1),variant:Object(S.d)("fieldVariant"),value:w&&w.status&&g.status?g.status.filter((function(e){return String(e.value)===String(w.status)}))[0]:g.status[0]})))},onChange:function(e,t){(De||"0"!==String(me))&&be({name:"status",value:t.value})},disabled:!(De&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("status")>-1))&&"0"===String(me)})),(me>4||he&&he.plan&&he.planAdmin)&&"plan"===w.type&&"completed"!==w.status&&a.a.createElement(a.a.Fragment,null,ae||w.miroBoard?ae?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__MiroBoard",1)),a.a.createElement(_e.a,{label:Object(S.w)("$__MiroBoardCode"),variant:Object(S.d)("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"save",color:"green",onClick:function(){return oe(!1)}})),onChange:function(e,t){be({name:"miroBoard",value:e.target.value})}},value:w&&w.miroBoard?w.miroBoard:"",placeholder:Object(S.w)("$__MiroBoardCodePlaceholder",1),disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("miroBoard")>-1))})):w.miroBoard&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__MiroBoard",1)),a.a.createElement(Ce.a,{text:Object(S.w)("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:w.miroBoard})}}),a.a.createElement(Ce.a,{text:Object(S.w)("$__editBoard",1),icon:"insert_link",onClick:function(){oe(!0)}})):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__MiroBoard",1)),a.a.createElement(Ce.a,{text:Object(S.w)("$__addBoard",1),icon:"developer_board",onClick:function(){oe(!0)}}))),(!w._id||w&&w._users&&b&&b._id&&w._users[b._id]&&w._users[b._id].access&&parseInt(w._users[b._id].access)>=3&&(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("private")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:s.switch},a.a.createElement(Te.a,{checked:!!w.private,onChange:function(e){De&&be({name:"private",value:!w.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("private")>-1))}),Object(S.w)("$__private",1))),(!Ee.hideFields||Ee.hideFields&&-1===Ee.hideFields.indexOf("private"))&&w.private&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:s.switch},a.a.createElement(Te.a,{checked:!!w.privateChildrens,onChange:function(e){De&&be({name:"privateChildrens",value:!w.privateChildrens})},name:"privateChildrens",inputProps:{"aria-label":"secondary checkbox"},disabled:!(De&&"completed"!==w.status&&!(Ee&&Ee.disabledFields&&Ee.disabledFields.indexOf("private")>-1))}),Object(S.w)("$__privateChildrens",1))),De&&"chatGroup"===w.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:s.switch},a.a.createElement(Te.a,{checked:!!w.onlyAdminsSendMessages,onChange:function(e){De&&be({name:"onlyAdminsSendMessages",value:!w.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__onlyAdminsCanSendMessage",1))),w.broadcast||l.a.getState().timeline&&(!l.a.getState().timeline[w._id]||l.a.getState().timeline[w._id]&&0===Object.keys(l.a.getState().timeline[w._id]).length)?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:s.switch},a.a.createElement(Te.a,{checked:!!w.broadcast,onChange:function(e){De&&be({name:"broadcast",value:!w.broadcast})},name:"broadcast",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__workAsABroadcastList",1))):a.a.createElement(a.a.Fragment,null)),he&&he.plan&&he.planAdmin&&Ie&&"plan"===w.type&&b._access&&b._access.userAdmin&&b._access.machenAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(Be.a,{id:"combo-box-demo",options:g.plans,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:w&&w.plans&&g.plans?g.plans.filter((function(e){return String(e.value)===String(w.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}},renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:w&&w.plans&&g.plans?g.plans.filter((function(e){return String(e.value)===String(w.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}}}))},onChange:function(e,t){De&&be({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null))))}))),qt=r(1218),Vt=r(565),Jt=r(2018),Xt=r(2039),Kt=r(135),Zt=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 Qt(){Qt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var er=Object(u.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Zt)((function(e){var t=e.classes,r=l.a.getState(),n=r.timeline,o=r.db,i=r.session,c=r.sideModule,s=c.data||{},u=a.a.useState(s.kpi_type?"timeline":"settings"),d=Object(m.a)(u,2),g=d[0],b=d[1],v=a.a.useState(!(!s._id||"new"!==s._id||!s.name)),y=Object(m.a)(v,2),x=y[0],w=y[1];a.a.useEffect((function(){x&&e.reqSave&&e.reqSave()}),[x]);var _=Object(S.j)(),O=Object(et.t)(c.id),j=!1;(parseInt(O)>=4||_.plan&&_.planAdmin)&&(j=!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}))]&&(O=o.cards[s._id]._users[Object.keys(o.cards[s._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]);var E=window.location.hash.split("/");E[0]=E[0].replace("#","");var L=n[s._id]||{};L=Object.keys(L).filter((function(e){return"kpi"===L[e].type})).map((function(e){return L[e]}));var C=null,I=0;s._parent&&l.a.getState().db.cards[s._parent]&&l.a.getState().db.cards[s._parent].kpi_type&&"task"!==l.a.getState().db.cards[s._parent].kpi_type&&(C=l.a.getState().db.cards[s._parent],I=parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?parseInt(C.kpi_ini)-parseInt(C.kpi_fin):parseInt(C.kpi_fin)-parseInt(C.kpi_ini),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent&&l.a.getState().db.cards[e]._parent===C._id&&l.a.getState().db.cards[e].kpi_type===C.kpi_type&&l.a.getState().db.cards[e].kpi_useParent})).forEach((function(e){parseInt(C.kpi_ini)>parseInt(C.kpi_fin&&parseInt(l.a.getState().db.cards[e].kpi_ini))?I-=parseInt(l.a.getState().db.cards[e].kpi_ini):parseInt(l.a.getState().db.cards[e].kpi_fin)&&(I-=parseInt(l.a.getState().db.cards[e].kpi_fin))})));var T=function(t){(t.value&&!c.data[t.name]||c.data[t.name]&&c.data[t.name]!==t.value)&&w(!0);var r=Object(p.a)(Object(p.a)({},c.data),{},Object(h.a)({},t.name,t.value));r.kpi_ini||(r=Object(p.a)(Object(p.a)({},r),{},{kpi_ini:0})),r.kpi_fin||(r=Object(p.a)(Object(p.a)({},r),{},{kpi_fin:0})),!r.kpi_useParent&&"false"!==!String(r.kpi_useParent)&&C&&C.kpi_type===t.value&&(r=Object(p.a)(Object(p.a)({},r),{},{kpi_useParent:!0})),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},c),{},{data:r}))},D=function(){var t=Object(f.a)(Qt().mark((function t(){var r,n=arguments;return Qt().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"!==c.data.kpi_type||!(0===parseInt(c.data.kpi_fin)&&0===parseInt(c.data.kpi_ini)||parseInt(c.data.kpi_fin)>0&&parseInt(c.data.kpi_fin)<parseInt(c.data.kpi_ini))){t.next=6;break}Object(S.c)({message:Object(S.w)("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(et.F)(e,!0,c.data);case 8:t.sent&&Object(S.c)({message:Object(S.w)("$__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)}}(),F=function(){var t=Object(f.a)(Qt().mark((function t(r){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},c),{},{data:Object(p.a)(Object(p.a)({},c.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)}}(),N=function(){var e=Object(f.a)(Qt().mark((function e(t,r){var n;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=String(s["kpi_".concat(r)]?s["kpi_".concat(r)]:0),(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)),T({name:"kpi_".concat(r),value:n});case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),A=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})).forEach((function(e,t){A=parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?A+parseInt(o.cards[e].kpi_ini)-parseInt(o.cards[e].kpi_fin):A+parseInt(o.cards[e].kpi_fin)-parseInt(o.cards[e].kpi_ini)})),a.a.createElement("div",null,a.a.createElement(ve,{save:x&&j?function(){D()}:null,saveClose:x&&j?function(){D(!0)}:null,close:function(){e.onClose&&e.onClose(x)}}),a.a.createElement("div",{style:{posision:"absolute",top:5,left:0,right:0}},j?a.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",flexDirection:"row-reverse"}},a.a.createElement(k.a,{title:Object(S.w)("$__changeKpiType",1),color:Object(S.d)("settings"===g?"menu":"color"),icon:"tune",onClick:function(){return b("settings")},size:"25px",transparent:!0}),a.a.createElement(k.a,{title:Object(S.w)("$__chart",1),color:Object(S.d)("chart"===g?"menu":"color"),icon:"analytics",onClick:function(){return b("chart")},size:"25px",transparent:!0}),a.a.createElement(k.a,{title:Object(S.w)("$__statement",1),color:Object(S.d)("timeline"===g?"menu":"color"),icon:"receipt",onClick:function(){return b("timeline")},size:"25px",transparent:!0})):a.a.createElement("div",null),"chart"===g?a.a.createElement(Vt.a,{data:s,chartShow:!0}):"settings"===g?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",null,Object(S.w)("$__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(Xt.a,{value:s&&s.kpi_type?s.kpi_type:"task",exclusive:!0,onChange:function(e,t){T({name:"kpi_type",value:t})}},a.a.createElement(Jt.a,{value:"decimal"},a.a.createElement(re.a,{title:Object(S.w)("$__decimal",1),color:"color"},"filter_9_plus")),a.a.createElement(Jt.a,{value:"currency"},a.a.createElement(re.a,{title:Object(S.w)("$__currency",1),color:"color"},"attach_money")),a.a.createElement(Jt.a,{value:"percent"},a.a.createElement(Kt.a,{title:Object(S.w)("$__percentage",1)},a.a.createElement("span",{style:{color:"".concat(Object(S.d)("color")),fontSize:"22px"}},"%"))),a.a.createElement(Jt.a,{value:"time"},a.a.createElement(re.a,{title:Object(S.w)("$__time",1),color:"color"},"hourglass_top")),a.a.createElement(Jt.a,{value:"task"},a.a.createElement(re.a,{title:Object(S.w)("$__task",1),color:"color"},"task"))):"decimal"===s.kpi_type?a.a.createElement(re.a,{title:Object(S.w)("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===s.kpi_type?a.a.createElement(re.a,{title:Object(S.w)("$__currency",1),color:"color"},"attach_money"):"percent"===s.kpi_type?a.a.createElement(re.a,{title:Object(S.w)("$__percentage",1),color:"color"},"percent"):a.a.createElement(re.a,{title:Object(S.w)("$__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)),C&&C.kpi_type&&C.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.w)("$__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}},C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?Object(S.w)("$__notAllocatedBudget",1):Object(S.w)("$__notAllocatedGoal",1)),Object(S.h)(I,"time"===C.kpi_type?"number":C.kpi_type,C.kpi_currency?C.kpi_currency:null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!s.kpi_useParent,onChange:function(e){F({name:"kpi_useParent",value:!s.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__useParentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{color:"red"}},Object(S.w)("$__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.w)("$__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})).forEach((function(t){i+=parseFloat(n[e][t].value)})),a.a.createElement("li",{key:"ca-".concat(e)},a.a.createElement(ut.a,{db:"cards",data:l.a.getState().db.cards[e],notGlobalExpanded:!0,ignoreList:!0}),a.a.createElement("div",{style:{width:"100%",height:22}},a.a.createElement(qt.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(Be.a,{id:"combo-box-demo",options:o.currency,getOptionLabel:function(e){return Object(S.w)(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(_e.a,Object.assign({},e,{label:Object(S.w)("$__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){T({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&&C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(_e.a,{label:s.kpi_useParent?Object(S.w)("$__budget"):"time"===s.kpi_type?Object(S.w)("$__minimumMinutes",1):Object(S.w)("$__initialValue",1),variant:"outlined",name:"kpi_ini",placeholder:Object(S.w)("$__value",1),value:Object(S.h)(s.kpi_ini?s.kpi_ini:0,"time"===s.kpi_type?"number":s.kpi_type,s.kpi_currency?s.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){N(e,"ini")}}})):a.a.createElement(a.a.Fragment,null),!s.kpi_useParent||s.kpi_useParent&&C&&parseInt(C.kpi_ini)<parseInt(C.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(_e.a,{label:s.kpi_useParent?Object(S.w)("$__goal"):"time"===s.kpi_type?Object(S.w)("$__maximumMinutes",1):Object(S.w)("$__finalValue",1),variant:"outlined",name:"kpi_fin",value:Object(S.h)(s.kpi_fin?s.kpi_fin:0,"time"===s.kpi_type?"number":s.kpi_type,s.kpi_currency?s.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){N(e,"fin")}}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!s.kpi_reqMessage,onChange:function(e){T({name:"kpi_reqMessage",value:!s.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__reqDescription",1)))):a.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},a.a.createElement(Vt.a,{data:s,chartShow:!1}),a.a.createElement("div",{style:{position:"absolute",top:103,bottom:0,left:0,right:0}},a.a.createElement(xe.a,{noSearch:!0,nodeId:s._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:s.kpi_type})))))})));function tr(){tr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var rr,nr=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.sideModule,i=n.planType,c=o.data||{},s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],g=u[1];a.a.useEffect((function(){"link"===c.type&&"new"===c._id&&g(!0)}),[o.data._id]);var b=function(t,r){(t.value&&!o.data[t.name]||o.data[t.name]&&o.data[t.name]!==t.value)&&g(!0);var n=Object(p.a)(Object(p.a)({},o.data),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},r.name,r.value))),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:Object(p.a)(Object(p.a)({},o.data),n)}))},v=function(t){d&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},y=function(){var t=Object(f.a)(tr().mark((function t(){var r,n=arguments;return tr().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.w)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(et.F)(e,!0,o.data);case 8:t.sent&&Object(S.c)({message:Object(S.w)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&v(!0);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(){var t=Object(f.a)(tr().mark((function t(){return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(f.a)(tr().mark((function t(){return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.L)(e,{cardId:c._id,_planId:c._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)}}(),w=n.dataType.filter((function(e){return e.name===o.data.type}))[0];return a.a.createElement(a.a.Fragment,null,a.a.createElement(ve,{save:d?function(){y()}:null,saveClose:d?function(){y(!0)}:null,close:function(){v(!0)}}),a.a.createElement("div",{className:t.root},"plan"!==c.type?a.a.createElement(a.a.Fragment,null,Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===c._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.w)("$__unLinkCards",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__unLinkCardsDescription",1)),a.a.createElement(nt,{onClick:function(){x()}},Object(S.w)("$__unLinkCards",1))):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!w.hideFields||w.hideFields&&-1===w.hideFields.indexOf("type"))&&a.a.createElement(Be.a,{id:"combo-box-demo",options:n.type,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:c&&c.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(c.type)}))[0]:n.type[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__type",1),variant:Object(S.d)("fieldVariant"),value:c&&c.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(c.type)}))[0]:n.type[0]}))},onChange:function(e,t){b({name:"type",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),"plan"===c.type?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(Be.a,{id:"combo-box-demo",options:i,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:c&&c.planType?i.filter((function(e){return e.value===c.planType}))[0]:i[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:c&&c.planType?i.filter((function(e){return e.value===c.planType}))[0]:i[0]}))},onChange:function(e,t){b({name:"planType",value:t.value})}}),i.filter((function(e){return!c.planType||c.planType&&e.value===c.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(re.a,{icon:Ht.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.w)(i.filter((function(e){return!c.planType||c.planType&&e.value===c.planType}))[0].description,1))),a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement("legend",null,Object(S.w)("$__referencesLabels")),a.a.createElement("div",{style:{width:"100%",alignItems:"center",justifyContent:"space-between"}},Object(S.w)("$__on",1),a.a.createElement(Te.a,{checked:!!c.refs,onChange:function(e){b({name:"refs",value:!c.refs})},name:"refs",inputProps:{"aria-label":"secondary checkbox"}})),c.refs?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{width:"46%"}},a.a.createElement(_e.a,{label:Object(S.w)("$__ref1Title",1),variant:Object(S.d)("fieldVariant"),name:"ref1Title",id:"edit_ref_1",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target)}},value:c.ref1Title||"",placeholder:Object(S.w)("$__ref1Title_placeholder",1)})),a.a.createElement("div",{style:{width:"8%",textAlign:"center",justifyContent:"center",alignItems:"center",fontSize:"24px",display:"flex",color:Object(S.d)("menu")}},"|"),a.a.createElement("div",{style:{width:"46%"}},a.a.createElement(_e.a,{label:Object(S.w)("$__ref2Title",1),variant:Object(S.d)("fieldVariant"),name:"ref2Title",id:"edit_ref_2",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target)}},value:c.ref2Title||"",placeholder:Object(S.w)("$__ref2Title_placeholder",1)}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__defaultCurrency")," "),a.a.createElement(Be.a,{id:"combo-box-demo",options:n.currency,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"currency",disableClearable:!0,value:c&&c.default_currency&&n.currency?n.currency.filter((function(e){return String(e.value)===String(c.default_currency)}))[0]:n.currency[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__currency",1),variant:Object(S.d)("fieldVariant"),value:c&&c.kpi_currency&&n.currency?n.currency.filter((function(e){return String(e.value)===String(c.kpi_currency)}))[0]:n.currency[0]}))},onChange:function(e,t){b({name:"default_currency",value:t.value})}}))):a.a.createElement(a.a.Fragment,null)))}))),ar=r(81);function or(){or=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ir=j.b.div(rr||(rr=Object(d.a)(["\n            background-color:none\n            "]))),cr=Object(u.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(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(e.name?e.name:""),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],v=a.a.useState(!1),y=Object(m.a)(v,2),x=y[0],w=y[1],_=window.location.hash.split("/");_[0]=_[0].replace("#",""),36!==_[0].length&&(_[0]=null),a.a.useEffect((function(){return O(),function(){}}),[]);var O=function(){var t=Object(f.a)(or().mark((function t(){return or().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.a)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),[e.nodeId],!1,null,"childrens");case 2:t.sent&&w(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j={};l.a.getState().db[e.db]&&l.a.getState().db[e.db][e.nodeId]&&(j=l.a.getState().db[e.db][e.nodeId]);var E=Object.keys(l.a.getState().db.cards).filter((function(t){return!(l.a.getState().db.cards[t].deleted||l.a.getState().db.cards[t].checklist||l.a.getState().db.cards[t]._recurrenceId||l.a.getState().db.cards[t]._parent!==e.nodeId||l.a.getState().db.cards[t].private&&!(l.a.getState().db.cards[t].private&&l.a.getState().db.cards[t]._users&&l.a.getState().db.cards[t]._users[n._id]))})).map((function(e){return e})),L=function(){var e=Object(f.a)(or().mark((function e(){var t,r;return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.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(p.a)({_parent:j._id,planId:j._planId?j._planId:null,name:c,type:r,status:"notStarted"},j.childrenAutoTag&&j._tags&&j._tags.length>0?{_tags:j._tags}:{}),function(){var e=Object(f.a)(or().mark((function e(r){return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.emit("card.UPD",{cardId:r.id,cardData:Object(p.a)(Object(p.a)({},r.data),{},{_planId:j._planId?j._planId:null,_parent:j._id,_timeline:Object(h.a)({},r.log._id,Object(p.a)(Object(p.a)({},r.log),{},{_parent:[r.id]})),_users:Object(h.a)({},n._id,{name:l.a.getState().db.users[n._id].name?l.a.getState().db.users[n._id].name:null,displayName:l.a.getState().db.users[n._id].displayName?l.a.getState().db.users[n._id].displayName:null,image:l.a.getState().db.users[n._id].image?l.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(f.a)(or().mark((function t(n){var a,o,i,c,s;return or().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(l.a.getState().db.cards).filter((function(t){return!(!l.a.getState().db.cards[t]||!l.a.getState().db.cards[t].checklist||l.a.getState().db.cards[t]._parent!==e.nodeId)})).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,c=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,c),t.abrupt("return");case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var e=Object(f.a)(or().mark((function e(t){return or().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(f.a)(or().mark((function e(t){return or().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.w)("$__loadingCatenation")),a.a.createElement(ct.a,null));var D=E.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})),F=E.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(ar.a,{onDragEnd:C,onDragStart:I,onDragUpdate:T},a.a.createElement(ar.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(ir,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),D.length>0?D.map((function(e,t){return a.a.createElement(ar.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(ut.a,{provided:t,snapshot:r,cardId:e,db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0}))}))})):a.a.createElement(a.a.Fragment,null),F.length>0?F.map((function(r,n){return a.a.createElement("div",{key:r},a.a.createElement(ut.a,{provided:e,snapshot:t,cardId:r,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(Ce.a,{reverse:!0,text:Object(S.w)("$__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(_e.a,{label:Object(S.w)("$__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&&c&&L(),27===e.keyCode&&(b(!g),s(""))}},autoFocus:!0,value:c,placeholder:Object(S.w)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(k.a,{title:Object(S.w)("$__save",1),color:"green",icon:"save",onClick:function(e){L()},transparent:!0}),a.a.createElement(k.a,{title:Object(S.w)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){b(!g),s("")},transparent:!0})))))})),lr=r(352);function sr(){sr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ur=Object(u.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Mt.a)((function(e){var t=a.a.useState([]),r=Object(m.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.forEach((function(e){l.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),o(t)}}),[e.data]);var c=function(){var t=Object(f.a)(sr().mark((function t(r){return sr().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($t.a,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:l.a.getState().db.tag?l.a.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:Object(S.w)("$__tags"),api:"tag/add",add:!0,filterSelectedOptions:!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){c(e)},colorPickerCallBack:function(e){l.a.getState().functions.socket.emit("tag.UPD",e)}}))})));function dr(){dr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var pr=function(){var e=Object(f.a)(dr().mark((function e(t){var r,n,a,o,i,c;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,n=t.page,a=void 0===n?0:n,o=t.limit,i=void 0===o?20:o,e.next=3,new Promise(function(){var e=Object(f.a)(dr().mark((function e(n,o){var c,l;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.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(!(c=e.sent)){e.next=6;break}return e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fr=function(){var e=Object(f.a)(dr().mark((function e(t){var r;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(f.a)(dr().mark((function e(r,n){var a;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.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)}}(),hr=function(){var e=Object(f.a)(dr().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,p;return dr().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(f.a)(dr().mark((function e(a,i){var l,u;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.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(!(p=e.sent)){e.next=6;break}return e.abrupt("return",p);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function mr(){mr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var gr=Object(u.b)((function(e){return{showPrivate:e.controls.lockPrivate}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState({}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useState(""),b=Object(m.a)(g,2),v=b[0],y=b[1],x=e.idPlan?e.idPlan:null,w=e.ignoreCards?e.ignoreCards:[];a.a.useEffect((function(){return _({id:x}),fr(),function(){d({})}}),[]);var _=function(){var t=Object(f.a)(mr().mark((function t(r,n){var a,o;return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fr({ids:r&&r.id?[r.id]:[],childrens:!1,types:e&&e.types?e.types:null});case 2:(a=t.sent)&&(o=n||u,x&&(o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},x,{name:l.a.getState().db.cards[x].name,parent:l.a.getState().db.cards[x]._parent,private:null,type:"plan",_id:x,open:!0}))),a.filter((function(e){return"chatGroup"!==e.type&&!w.includes(e)})).forEach((function(e){o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},o[e._id]?o[e._id]:{}),e)))})),d(o));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),O=function(){var e=Object(f.a)(mr().mark((function e(t){var r,n,a,o,i,c,l=arguments;return mr().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=u,c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},a,Object(p.a)(Object(p.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(u).filter((function(e){return u[e].parent===a})).length?_({id:a,type:i},c):d(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(r,n){return w.includes(r._id)?a.a.createElement(a.a.Fragment,null):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(t){(!r.private||r.private&&l.a.getState().controls.lockPrivate)&&(O({id:n},!u[n]||!u[n].open),i(n),e&&e.onSelect&&(console.log(u[n]),e.onSelect(u[n]))),t.preventDefault(),t.stopPropagation()}},a.a.createElement(ge.a,{title:"".concat(r.private&&!l.a.getState().controls.lockPrivate?Object(S.w)("$__private"):r.name),tooltipText:"".concat(r.private&&!l.a.getState().controls.lockPrivate?Object(S.w)("$__private"):r.name),icon:(r.private&&!l.a.getState().controls.lockPrivate?"private_connectivity":r.type&&t&&t.dataType&&t.dataType.filter((function(e){return e.name===r.type}))[0].icon)||"$__topic",fontSize:"12px",color:r.private&&!l.a.getState().controls.lockPrivate?"lightgray":o&&o===n?Object(S.d)("color"):Object(S.d)("gray")}),u[n]&&u[n].open?E(n):a.a.createElement(a.a.Fragment,null))},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(u).filter((function(t){return!e||e&&u[t].parent===e})).length>0?Object.keys(u).filter((function(t){return!e||e&&u[t].parent===e})).sort((function(e,t){return u[e].step&&u[t].step&&parseInt(u[e].step)<parseInt(u[t].step)?-1:u[e].step&&u[t].step&&parseInt(u[e].step)>parseInt(u[t].step)?1:u[e].name.toLowerCase().trim()<u[t].name.toLowerCase().trim()?-1:u[e].name.toLowerCase().trim()>u[t].name.toLowerCase().trim()?1:0})).map((function(e){return j(u[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(_e.a,{label:Object(S.w)("$__search","*"),variant:"standard",autoFocus:!0,value:v,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){y(e.target.value)},onKeyDown:function(e){}}})),a.a.createElement("div",{style:Object(p.a)({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},e.styles?e.styles:{})},Object.keys(u).filter((function(e){return"chatGroup"!==u[e].type&&((!x||x&&36!==x.length)&&!u[e].parent||x&&36===x.length&&u[e]._id===x)&&(""===v||v&&u[e].name.toLowerCase().indexOf(v.toLowerCase().trim())>-1)})).sort((function(e,t){return u[e].name.toLowerCase().trim()<u[t].name.toLowerCase().trim()?-1:u[e].name.toLowerCase().trim()>u[t].name.toLowerCase().trim()?1:0})).map((function(e){return j(u[e],e)}))))))})),br=r(335);function vr(){vr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var yr=function(e){var t=l.a.getState().db;return a.a.createElement(Be.a,{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.w)(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(_e.a,Object.assign({},r,{label:Object(S.w)("$__action",1),variant:Object(S.d)("fieldVariant"),inputProps:Object(p.a)(Object(p.a)({},r&&r.inputProps?r.inputProps:{}),{},{style:Object(p.a)(Object(p.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.w)(e.label,1))},onChange:function(t,r){e.onChange(r.value)}})},xr=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t,r=e.classes,n=l.a.getState(),o=n.db,i=n.sideModule,c=o.planType,s=a.a.useState({}),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState({}),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(!1),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useState(!1),L=Object(m.a)(E,2),C=L[0],I=L[1],T=a.a.useState((null===(t=i.data)||void 0===t?void 0:t.onConcludedStepMoveTo)||null),D=Object(m.a)(T,2),F=D[0],N=D[1],A=Object(S.j)(),P=Object(et.t)(i.id);a.a.useEffect((function(){return console.log("MONTANDO"),d._id!==i.data._id&&(g(i.data),j(!1)),g(i.data),j(!1),"link"!==d.type||d.name||Y(),$(),i.data.name&&""!==i.data.name.trim()&&"link"===i.data.type&&"new"===i.data._id&&(j(!0),e.reqSave&&e.reqSave(!0)),function(){console.log("DESMONTADO")}}),[]),a.a.useEffect((function(){!d.name||d.name&&""===d.name.trim?j(!1):j(!0)}),[y]);var $=function(){var t=Object(f.a)(vr().mark((function t(){return vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[i.data._id],cardLoad:"parents"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!i.data[t.name]&&!d[t.name]||i.data[t.name]&&i.data[t.name]!==t.value||n)&&e.reqSave&&e.reqSave(!0);var a=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(a=Object(p.a)(Object(p.a)(Object(p.a)({},d),a),{},Object(h.a)({},r.name,r.value))),g(a),x(Object(p.a)(Object(p.a)({},y),{},Object(h.a)({},t.name,t.value),r&&r.name&&r.value?Object(h.a)({},r.name,r.value):{}))},B=function(t){O&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},z=function(){var t=Object(f.a)(vr().mark((function t(){var r,n=arguments;return vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],C){t.next=19;break}if(j(!1),e.reqSave&&e.reqSave(!1),d.status||(d.status="notStarted"),"new"===i.id&&i.data&&g(Object(p.a)(Object(p.a)({},d),i.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},i),{},{data:d})),d.name&&(!d.name||""!==d.name.trim())){t.next=12;break}I(!1),Object(S.c)({message:Object(S.w)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(et.F)(Object(p.a)(Object(p.a)({},e),{},{store:Object(p.a)(Object(p.a)({},e.store),{},{db:Object(p.a)({},l.a.getState().db)})}),r,d);case 14:t.sent&&(y&&y.status&&(Object(et.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:d._id}}),{status:y.status}),Object(et.e)(e,d._id,y.status)),I(!1),Object(S.c)({message:Object(S.w)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),j(!1),e.reqSave&&e.reqSave(!1),r&&B(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){var t=Object(f.a)(vr().mark((function t(){var r;return vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Fe.a.post("/link/content",{url:d.url});case 2:r=t.sent,g(Object(p.a)(Object(p.a)({},d),{},{content:r.data.article})),j(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=i.data&&i.data.type?o.dataType.filter((function(e){return e.name===i.data.type}))[0]:{};if(!d)return null;var G=!!e.permission&&e.permission;return!d||!d._planId||o.cards[d._planId]&&Object(et.B)(d._planId)||(G=!1),!G&&parseInt(P)>=4&&(G=!0),!G&&Object(et.B)(d._planId)&&A&&A.admin&&A.plan&&(A.planAdmin||A.planModerate)&&(G=!0),a.a.createElement(a.a.Fragment,null,a.a.createElement(ve,{save:O?function(){I(!0),z()}:null,saveClose:O?function(){I(!0),z(!0)}:null,saveLoader:C,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"===d.type&&d._id&&G?a.a.createElement(k.a,{title:Object(S.w)("$__openBoard",1),icon:"launch",color:"lightgray",onClick:function(){},size:"25px"}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===d.type&&d._id?Object(S.w)("$__plan ".concat(d.planType?c[1].label:c[0].label),1):Object(S.w)("$__data",1)),d.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",marginTop:-8,textAlign:"right"}},Object(S.w)("$__createdAt"),": ",Object(S.k)(d.created_at)):a.a.createElement(a.a.Fragment,null),a.a.createElement(_e.a,{label:Object(S.w)(R&&R.fieldsTitle&&R.fieldsTitle.name?R.fieldsTitle.name:"$__titleOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){M(e.target)}},value:d&&d.name?d.name:"",placeholder:Object(S.w)(R&&R.fieldsTitle&&R.fieldsTitle.placeholder&&R.fieldsTitle.placeholder.name?R.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(G&&"completed"!==d.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("name")>-1))}),P>3||d.description||G?a.a.createElement(a.a.Fragment,null,a.a.createElement(_e.a,{label:Object(S.w)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){M(e.target)}},value:d&&d.description?d.description:"",placeholder:Object(S.w)("$__descriptionOfCard_placeholder",1),disabled:!(G&&"completed"!==d.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.showSumValues,onChange:function(e){M({name:"showSumValues",value:!d.showSumValues})},name:"showSumValues",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__showSumValues",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.requireValue,onChange:function(e){M({name:"requireValue",value:!d.requireValue})},name:"requireValue",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__requireValue",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__automation",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__users",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.w)("$__automationUsersExplain",1)),a.a.createElement(yr,Object.assign({value:d.automationUsers||null,onChange:function(e){M({name:"automationUsers",value:e})}},"0"===d.step?{ignoreValues:["remove","removeAll"]}:{})),d._id&&o.cards[d._id]&&o.cards[d._id]._users&&"removeAll"!==d.automationUsers&&a.a.createElement(Ft.a,{_id:d._id,noLimit:!0,avatarSize:"33px",permission:G}),!d.automationUsers||"remove"!==d.automationUsers&&"replace"!==d.automationUsers?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.keepUserWhoCreatedActivity,onChange:function(e){M({name:"keepUserWhoCreatedActivity",value:!d.keepUserWhoCreatedActivity})},name:"keepUserWhoCreatedActivity",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__keepUserWhoCreatedActivity",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__execAsResponsible",1)),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!!d.execAsResponsible,onChange:function(e){M({name:"execAsResponsible",value:!d.execAsResponsible||null})},name:"changeIcon",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__yes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.w)("$__execAsResponsibleExplain",1)))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__dueDate",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__due",1)),a.a.createElement(yr,{value:d.automationDueDateType||null,onChange:function(e){M({name:"automationDueDateType",value:e})},ignoreValues:["replace","removeAll"]}),d.automationDueDateType&&"add"===d.automationDueDateType?a.a.createElement(_e.a,{label:Object(S.w)("$__automationDueDate",1),variant:Object(S.d)("fieldVariant"),name:"automationDueDate",min:1,InputProps:{type:"number",min:1,autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},Object(S.w)("$__days","*")),onChange:function(e){var t=e.target.value||1;parseInt(t)<1&&(t=1),M({name:"automationDueDate",value:t})}},value:d&&d.automationDueDate?d.automationDueDate:1}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__tags",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__tags",1)),a.a.createElement(yr,{value:d.automationTags||null,onChange:function(e){M({name:"automationTags",value:e})},ignoreValues:["removeAll"]}),d.automationTags&&"doNotChange"!==d.automationTags?a.a.createElement(ur,{data:{values:d._tags?d._tags:[]},callBack:function(e){G&&M({name:"_tags",value:e})},disabled:!(G&&"completed"!==d.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.w)("$__selectTheOptions",1)}):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__icon",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__setThisIconWhenAdd",1)),a.a.createElement("div",{className:r.switch,style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!!d.setIcon,onChange:function(e){M({name:"setIcon",value:d.setIcon?null:d.icon?d.icon:"fiber_new"})},name:"changeIcon",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__changeIconWhenReceiveCardTo",1)),d.setIcon?a.a.createElement(br.a,{icon:d.setIcon?d.setIcon:d.icon?d.icon:"fiber_new",color:Object(S.d)("colorText"),onChange:function(e){M({name:"setIcon",value:e})},size:"25px",style:{marginRight:7}}):a.a.createElement(a.a.Fragment,null))))),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent===d._parent&&"step"===l.a.getState().db.cards[e].type&&!l.a.getState().db.cards[e].deleted})).length===parseInt(d.step)+1?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.w)("$__onConcludedStepMoveTo",1)),a.a.createElement("div",{className:r.switch},F&&F===d.onConcludedStepMoveTo?a.a.createElement(k.a,{title:Object(S.w)("$__selectTarget",1),text:Object(S.w)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){N(null)},size:"14px",textSize:"14px"}):a.a.createElement("div",null,a.a.createElement(gr,{onSelect:function(t){l.a.getState().db.cards[t._id]||Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"parents",idRel:t._id}),N(t._id)},ignoreTypes:["chatGroup"],types:["plan","guideline","guidelineC","guidelineD","guidelineE","guidelineR","objective","goal","step"]}),F&&F!==d.onConcludedStepMoveTo?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(k.a,{title:Object(S.w)("$__cancel",1),text:Object(S.w)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){M({name:"onConcludedStepMoveTo",value:(null===d||void 0===d?void 0:d.onConcludedStepMoveTo)||null})}}),a.a.createElement(k.a,{title:Object(S.w)("$__save",1),text:Object(S.w)("$__save",1),color:Object(S.d)("menu"),icon:"check",onClick:function(){M({name:"onConcludedStepMoveTo",value:F})}})):a.a.createElement(a.a.Fragment,null)),d.onConcludedStepMoveTo&&F===d.onConcludedStepMoveTo&&l.a.getState().db.cards[d.onConcludedStepMoveTo]?a.a.createElement(a.a.Fragment,null,a.a.createElement(pt.a,{id:d.onConcludedStepMoveTo,showLegend:!0,legend:Object(S.w)("$__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.w)("$__status",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__changeStatusTo",1)),a.a.createElement(yr,{value:d.automationStatusType||null,onChange:function(e){M({name:"automationStatusType",value:e})},ignoreValues:["add","remove","removeAll"]}),d.automationStatusType&&"doNotChange"!==d.automationStatusType?a.a.createElement(Be.a,{id:"combo-box-demo",options:o.status,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"automationStatus",disableClearable:!0,value:d&&d.automationStatus&&o.status?o.status.filter((function(e){return String(e.value)===String(d.automationStatus)}))[0]:o.status[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__status",1),variant:Object(S.d)("fieldVariant"),value:d&&d.automationStatus&&o.status?o.status.filter((function(e){return String(e.value)===String(d.automationStatus)}))[0]:o.status[0]}))},onChange:function(e,t){(G||"0"!==String(P))&&M({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.w)("$__automationApprovalExplain",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.requireApproval,onChange:function(e){M({name:"requireApproval",value:!d.requireApproval})},name:"requireApproval",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__requireApproval",1)),d.requireApproval?a.a.createElement(Ft.a,{_id:d._id,selected:"",noLimit:!0,avatarSize:"33px",permission:G,customDefine:{name:"approvalResponsible",icon:"gavel"}}):a.a.createElement(a.a.Fragment,null)),"0"===d.step&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.w)("$__showInPanel",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.showInPanel,onChange:function(e){M({name:"showInPanel",value:!d.showInPanel})},name:"showInPanel",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__permitOpenTicketInPanel",1)),d.showInPanel?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(Oe.a,{data:{values:d.showGroups||[],_id:d._id},options:l.a.getState().db.userGroup?l.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){M({name:"showGroups",value:e})}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(Be.a,{id:"combo-box-demo",options:Object.keys(l.a.getState().forms).sort((function(e,t){return l.a.getState().forms[e].name<l.a.getState().forms[t].name?-1:l.a.getState().forms[e].name>l.a.getState().forms[t].name?1:0})).map((function(e){return{label:l.a.getState().forms[e].name,value:String(l.a.getState().forms[e]._id)}})),getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"form",value:d&&d.form?Object.keys(l.a.getState().forms).filter((function(e){return d.form&&l.a.getState().forms[e]._id===d.form})).map((function(e){return{label:l.a.getState().forms[e].name,value:String(l.a.getState().forms[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__form",1),variant:Object(S.d)("fieldVariant"),value:d&&d.form?Object.keys(l.a.getState().forms).filter((function(e){return d.form&&l.a.getState().forms[e]._id===d.form})).map((function(e){return{label:l.a.getState().forms[e].name,value:String(l.a.getState().forms[e]._id)}}))[0]:null}))},onChange:function(e,t){M({name:"form",value:t&&t.value?String(t.value):null})}})),a.a.createElement(_e.a,{label:Object(S.w)("$__shortCutTitle",1),variant:Object(S.d)("fieldVariant"),name:"shortCutTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){M(e.target)}},value:d&&d.shortCutTitle?d.shortCutTitle:"",placeholder:Object(S.w)("$__shortCutTitlePlaceholder")}),a.a.createElement(_e.a,{label:Object(S.w)("$__shortCutDescription",1),variant:Object(S.d)("fieldVariant"),name:"shortCutDescription",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){M(e.target)}},value:d&&d.shortCutDescription?d.shortCutDescription:"",placeholder:Object(S.w)("$__shortCutDescriptionPlaceholder",1)}),a.a.createElement(_e.a,{label:Object(S.w)("$__shortCutButtonToAdd",1),variant:Object(S.d)("fieldVariant"),name:"shortCutButtonToAdd",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){M(e.target)}},value:d&&d.shortCutButtonToAdd?d.shortCutButtonToAdd:"",placeholder:Object(S.w)("$__shortCutButtonToAddPlaceholder")}),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.requireDescription,onChange:function(e){M({name:"requireDescription",value:!d.requireDescription})},name:"requireDescription",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__requireDescription",1))):a.a.createElement(a.a.Fragment,null))))))})));var wr=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=e.classes,r=l.a.getState().sideModule,n=r.data||{},o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1];return a.a.useEffect((function(){"link"===n.type&&"new"===n._id&&s(!0)}),[r.data.id]),a.a.createElement(a.a.Fragment,null,a.a.createElement(ve,{save:c?function(){}:null,saveClose:c?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.w)("$__integration",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__useIdToFeelFlowIdIntegration",1)),a.a.createElement("div",{style:{fontSize:14,fontWeight:"bold",color:"blue"}},n._id))))}))),_r=r(143),Or=r(64),jr=Object(Y.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 Er(e){var t=jr(),r=Object(p.a)({},e);return r.title&&delete r.title,e.title?a.a.createElement(Kt.a,{title:e.title},a.a.createElement(at.a,Object.assign({},r,{className:t[e.size]}),e.children)):a.a.createElement(at.a,Object.assign({},r,{className:t[e.size]}),e.children)}function kr(){kr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Sr=Object(u.b)((function(e){return{history:e.db.history,showPrivate:e.controls.lockPrivate,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,c=l.a.getState().db,s=a.a.useState(e.data),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){0===e.unlockedPrivates&&y(!1)}),[e.unlockedPrivates]);var x=d.name.split("."),w=x[x.length-1];"blob"===d.name&&(d.name="".concat(Object(S.w)("$__coverImage","*"),".jpg"),w="jpg");var _="attachment";l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(w.toLowerCase())>-1})).length>0&&(_=l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(w.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(d.file));var O=function(){var e=Object(f.a)(kr().mark((function e(t){return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{i.emit("data",{module:"node",method:"put",action:"update"},Object(p.a)({_id:d._id},t),Object(f.a)(kr().mark((function e(){return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(Object(p.a)(Object(p.a)({},d),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 c.fileExtensions.filter((function(e){return e.ext.indexOf(w.toLowerCase())>-1})).length>0&&c.fileExtensions.filter((function(e){return e.ext.indexOf(w.toLowerCase())>-1}))[0].viewer&&(j=c.fileExtensions.filter((function(e){return e.ext.indexOf(w.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"}},d.in&&d.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(re.a,{icon:"lock",size:"17px"})):a.a.createElement(a.a.Fragment,null,"string"===typeof _&&-1===_.indexOf("https")&&-1===_.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(re.a,{icon:_,size:"33px"})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",backgroundImage:'url("'.concat(_,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7,cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox(),t.stopPropagation(),t.preventDefault()}})),a.a.createElement("div",{style:{display:"flex",paddingLeft:15,alignItems:"center",maxWidth:"calc(100% - 40px)",width:"100%"}},d.in&&d.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===d.in.db&&d.in._id===o._id?a.a.createElement("div",null,a.a.createElement(Er,{alt:d.createdBy.name,src:d.createdBy.image,style:{width:"21px",height:"21px"}},d.createdBy.name)):a.a.createElement(a.a.Fragment,null),"User"===d.in.db&&d.in._id!==o._id?a.a.createElement("div",null,a.a.createElement(Er,{alt:d.in.name,src:d.in.image,style:{width:"21px",height:"21px"}},d.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(Or.a,{private:!(!d.in||!d.in.private||l.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(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r}))},title:"".concat("User"===d.in.db?"".concat(Object(S.w)("$__chatWithUser","*")," - ").concat(d.in._id!==o._id?"".concat(d.in.name):"".concat(d.createdBy.name)):"chatGroup"===d.in.type?"".concat(Object(S.w)("$__chatGroup","*")," - ").concat(d.in.name):"User"!==d.in.db&&"chatGroup"!==d.in.type?"".concat(d.in.name):""),icon:"User"===d.in.db||"chatGroup"===d.in.type?null:d.in.type&&c&&c.dataType&&c.dataType.filter((function(e){return e.name===d.in.type}))[0]&&c.dataType.filter((function(e){return e.name===d.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(Or.a,{private:!(!d.in||!d.in.private||l.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(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,privateTitle:Object(S.w)("$__privateFile"),title:d.name,value:d.name.replace(".".concat(w),""),searchText:e.searchText?e.searchText:null,color:e.dark?Object(S.d)("lightgray"):Object(S.d)("gray"),editable:!!e.admin,dark:!!e.dark,inputStyle:e.dark?{backgroundColor:"rgba(250,250,250,0.8)",borderRadius:7}:null,textStyle:{fontSize:12,fontWeight:"normal"},searchTextStyle:Object(p.a)({fontSize:12},e.dark?{color:"#FFFFFF"}:{}),style:{minHeight:"21px !important"},onEdit:e.admin?function(e){O({name:"".concat(e,".").concat(w)})}:null}))),"audio"===j&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},a.a.createElement(ie.a,{src:"https://machen.azureedge.net/".concat(d.file),controls:!0})),d.createdBy&&a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"57px",clear:"both"}},d.in&&!d.in.private?a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"lightgray",fontSize:10,marginRight:7}},Object(S.w)("$__sendedBy"),":"),a.a.createElement(Er,{alt:d.createdBy.name,src:d.createdBy.image,style:{width:"15px",height:"15px"}},d.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},d.createdBy.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement("span",{style:{marginLeft:3}},Object(S.k)(d.created_at)))),e.showParent&&(d.timelineId||d.message)&&(c.cards[d.cardId]&&r[d.cardId]&&r[d.cardId][d.timelineId]||d.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(_r.a,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:c.cards[d.cardId]&&r[d.cardId]&&r[d.cardId][d.timelineId]?r[d.cardId][d.timelineId]:d.message,db:"cards",nodeId:d.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&d.cardId&&c.cards[d.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(ut.a,{db:"cards",cardId:d.cardId,showConnectedIn:!0})),a.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})))}));function Lr(){Lr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Cr,Ir=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState([]),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!1),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(""),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useState(0),k=Object(m.a)(E,2),L=k[0],C=k[1],I=[];a.a.useEffect((function(){return x(!0),function(){s([])}}),[e.nodeId]),a.a.useEffect((function(){x(!0)}),[L]),a.a.useEffect((function(){y&&T()}),[y]);var T=function(){var t=Object(f.a)(Lr().mark((function t(){var n,a;return Lr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(h){t.next=5;break}return t.next=3,pr({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users",page:L});case 3:(n=t.sent)&&(n.length<20&&g(!0),a=Array.from(c),n.forEach((function(e){0===a.filter((function(t){return t&&t.data&&e&&e.data&&t.data._id===e.data._id})).length&&a.push(e)})),s(a),x(!1));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:I,file:t})};return a.a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"},id:"sideModule_files"},(!O&&c.length>10||O)&&a.a.createElement("div",{style:{position:"relative",padding:"10px"}},a.a.createElement(_e.a,{label:Object(S.w)("$__fileNameSearch",1),variant:Object(S.d)("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"find_in_page"})),onChange:function(e){j(e.target.value)}},value:Object(S.q)(O).toLowerCase(),placeholder:Object(S.w)("$__fileNameSearch")})),a.a.createElement("div",{style:{position:"absolute",bottom:0,top:c&&c.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(re.a,{color:Object(S.d)("color"),icon:"folder_open",title:Object(S.w)("$__files","*"),size:"20px",style:{marginRight:"15px"}}),Object(S.w)("$__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&&!y&&C(L+1)}()}},c&&c.length>0&&c.filter((function(e){return!O||""===O||O&&e.data.name.toLowerCase().indexOf(O.toLocaleLowerCase())>-1})).sort((function(e,t){return parseInt(e.data.created_at)<parseInt(t.data.created_at)})).map((function(t,o){I.push(t.data);var i=Object(p.a)(Object(p.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){D(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},a.a.createElement(Sr,{data:i,resume:!0,dark:!!e.dark,admin:c,searchText:O,openLightBox:function(){D(t.data._id)}}))})),(c.length>0||y)&&!h?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(ct.a,null),Object(S.w)("$__checkingFiles","*")):0!==c.length||y?a.a.createElement(a.a.Fragment,null):Object(S.w)("$__hasNoFiles","*"))))}));function Tr(){Tr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Dr=j.b.div(Cr||(Cr=Object(d.a)(["\n            background-color:none;\n            "]))),Fr=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=l.a.getState().functions.socket,n=window.location.hash.split("/");n[0]=n[0].replace("#",""),36!==n[0].length&&(n[0]=null);var o=Object.keys(l.a.getState().db.cards).filter((function(t){return!(l.a.getState().db.cards[t].deleted||l.a.getState().db.cards[t].checklist||!l.a.getState().db.cards[t]._recurrenceId||l.a.getState().db.cards[t]._parent!==e.nodeId)})).map((function(e){return e})),i=function(){var n=Object(f.a)(Tr().mark((function n(a){var o,i,c,s,u,d;return Tr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=Object.keys(l.a.getState().db.cards).filter((function(t){return!(!l.a.getState().db.cards[t]||!l.a.getState().db.cards[t].checklist||l.a.getState().db.cards[t]._parent!==e.nodeId)})).sort((function(e,r){return t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)<parseInt(t.cards[r].order.low)?-1:t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)>parseInt(t.cards[r].order.low)?1:0})).map((function(e){return e})),i=a.destination,c=a.source,s=a.draggableId,i){n.next=4;break}return n.abrupt("return",!1);case 4:if(i.droppableId!==c.droppableId||i.id!==c.index){n.next=6;break}return n.abrupt("return",!1);case 6:return(u=o).splice(c.index,1),u.splice(i.index,0,s),r.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),d={},u.map((function(e,r){return d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,t.cards[e])),d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},d[e]),{},{order:{low:"".concat(r+1)}}))),!0})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),d)})),n.abrupt("return");case 14:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ar.a,{onDragEnd:i},a.a.createElement(ar.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,r){return a.a.createElement(Dr,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:r.isDraggingOver}),o.sort((function(e,r){return t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)<parseInt(t.cards[r].order.low)?-1:t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)>parseInt(t.cards[r].order.low)?1:0})).map((function(e,t){return a.a.createElement(ar.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement(ut.a,{provided:t,snapshot:r,cardId:e,db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))})),Nr=r(497),Ar=r(78),Pr=function(e){return{root:{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 $r(){$r=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Mr=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Pr)((function(e){var t=e.classes,r=a.a.useState({name:"plan"}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(null),s=Object(m.a)(c,2),u=s[0],d=s[1],h=l.a.getState(),g=h.db,b=h.session,v=g.cards,y=l.a.getState().sideModule.data;a.a.useEffect((function(){Object(f.a)($r().mark((function t(){return $r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.a)(e,null,!1,null,"plans",!1);case 2:case"end":return t.stop()}}),t)})))()}),[]);var x=a.a.useRef(null),w=[];g.dataType.filter((function(e){return e.sendTo})).forEach((function(e){w.push({name:e.name})}));var _=g.users[Object.keys(g.users).find((function(e){return e.indexOf(b._id)>-1}))]._access,O=0;b._id&&g.cards[y._id]&&g.cards[y._id]._users&&g.cards[y._id]._users[Object.keys(g.cards[y._id]._users).find((function(e){return e.indexOf(b._id)>-1}))]&&(O=g.cards[y._id]._users[Object.keys(g.cards[y._id]._users).find((function(e){return e.indexOf(b._id)>-1}))]);var j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=v;E=Object.keys(E).filter((function(e){return!(E[e].archived||E[e].deleted||!(E[e]._users&&E[e]._id!==y._id&&E[e]._users[b._id]&&parseInt(E[e]._users[b._id].access)>2||_&&(_.owner||_.planAdmin||_.planModerate)||O&&O.access&&parseInt(O.access)>2))})).map((function(e){return E[e]})),o&&(E=Object.keys(E).filter((function(e){return!(!E[e]||!E[e].type||E[e].type!==o.name)})).map((function(e){return E[e]}))),E=Object.keys(E).filter((function(e){return y.type&&E[e].type&&g.dataType.filter((function(e){return e.name===y.type}))&&g.dataType.filter((function(e){return e.name===y.type})).length>0&&g.dataType.filter((function(e){return e.name===y.type}))[0].sharedIn&&(g.dataType.filter((function(e){return e.name===y.type}))[0].sharedIn.copy.indexOf(E[e].type)>-1||g.dataType.filter((function(e){return e.name===y.type}))[0].sharedIn.attach.indexOf(E[e].type)>-1||g.dataType.filter((function(e){return e.name===y.type}))[0].sharedIn.shared.indexOf(E[e].type)>-1)})).map((function(e){return E[e]}));var k=function(){var t=Object(f.a)($r().mark((function t(){var r;return $r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={_id:Object(Nr.a)(),cardId:y._id,idRel:u,_parent:u,type:"comment",message:"",shared:!0},Object(Ar.h)(e,Object(p.a)(Object(p.a)({},r),{},{user:Object(p.a)({},g.users[b._id]),files:{}})),Fe.a.post("timeline/add",r),d(null),i({name:"plan"});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),L=function(){var t=Object(f.a)($r().mark((function t(){return $r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmMoveCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t={cardId:y._id,newRel:u,planId:g.cards[u]._planId?g.cards[u]._planId:"plan"===g.cards[u].type?u:null,oldRel:y._parent};Object(et.d)(e,t)&&(d(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",position:"relative",clear:"both"},ref:x},u&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.w)("$__action")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return k()}},Object(S.w)("$__share","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.w)("$__AttachInCard")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return L()}},Object(S.w)("$__Attach","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){d(null)}},Object(S.w)("$__cancel","*"))))),a.a.createElement("div",{style:{width:"100%",padding:"15px"}},a.a.createElement(gr,{styles:{height:"auto",maxHeight:u?"calc(100vh - 400px)":"none"},onSelect:function(e){d(e._id)},ignoreTypes:["chatGroup"]})))}))),Br=r(120),zr=r(155),Yr=r(659),Rr=r(33),Gr=r(70),Hr=r(74),Wr=r(193),Ur=r(1932),qr=r(1921),Vr=r(1920),Jr=r(756),Xr=r(1922),Kr=r(1241);function Zr(){Zr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Qr=Object(u.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.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(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),d=Object(m.a)(u,2),g=d[0],b=d[1],v=a.a.useState(!1),y=Object(m.a)(v,2),x=y[0],w=y[1],O=a.a.useState({}),j=Object(m.a)(O,2),E=j[0],L=j[1],C=a.a.useState({}),I=Object(m.a)(C,2),T=I[0],D=I[1],F=a.a.useState(!0),N=Object(m.a)(F,2),P=N[0],$=N[1],M=window.location.hash.split("/");M[0]=M[0].replace("#",""),a.a.useEffect((function(){return z(),function(){}}),[]),a.a.useEffect((function(){B()}),[e.cards]);var B=function(){var t=Object(f.a)(Zr().mark((function t(){var r;return Zr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.s)(e.nodeId);case 2:r=t.sent,D(Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e.nodeId,!0)));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();console.log(T);var z=function(){var t=Object(f.a)(Zr().mark((function t(){return Zr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[e.nodeId],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&$(!1),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0),$(!1);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),Y={},R={},G=0,H=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object(S.w)("$__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.w)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object(S.w)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object(S.w)("$__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.w)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object(S.w)("$__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})).forEach((function(e){Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type&&!n[e][t].deleted})).forEach((function(t){n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0?Object.keys(n[e][t]._toUser).forEach((function(r){R=Object(p.a)(Object(p.a)({},R),{},Object(h.a)({},r,Object(p.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))})):R=Object(p.a)(Object(p.a)({},R),{},Object(h.a)({},n[e][t].user._id,Object(p.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(E).length||Object.keys(E).length>0&&Object.keys(E).filter((function(r){return n[e]&&n[e][t]&&n[e][t].type&&"timer"===n[e][t].type&&E[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)})).forEach((function(t){Object.keys(R).forEach((function(r){if(r&&n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&(parseInt(n[e][t].ini)>=_()("".concat(c," 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&&toString(n[e][t].user._id)===toString(r)&&(!n[e][t]._toUser||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[toString(r)])){G+=parseInt(n[e][t].fin)-parseInt(n[e][t].ini);var a=parseInt(n[e][t].fin)-parseInt(n[e][t].ini),o=a=Y&&Y[r]&&Y[r].totalTimer?parseInt(Y[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini)):parseInt(n[e][t].fin)-parseInt(n[e][t].ini),i="",l="";if(a<60)i="".concat(o," ").concat(Object(S.w)("$__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,d=(o-=60*u)>0?o:0;i="".concat(s," ").concat(Object(S.w)("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Object(S.w)("$__minutes",1)," ").concat(d>0?"".concat(d," ").concat(Object(S.w)("$__seconds",1)):""),l="".concat(s,"H ").concat(u,"M ").concat(d," S")}else{var f=Math.trunc(o/60)>0?Math.trunc(o/60):0,m=(o-=60*f)>0?o:0;i="".concat(f," ").concat(Object(S.w)("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(Object(S.w)("$__seconds",1)):""),l="".concat(f,"M ").concat(m," S")}Y=Object(p.a)(Object(p.a)({},Y),{},Object(h.a)({},r,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},Y[r]?Y[r]:{}),R[r]?R[r]:{}),Y&&Y[r]&&Y[r].totalTimer?{totalTimer:parseInt(Y[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:l,_times:Object(p.a)(Object(p.a)({},Y[r]&&Y[r]._times?Y[r]._times:{}),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},n[e][t]),{},{cardId:e})))})))}1}))}))}));var W=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(Kt.a,{title:e.data.name},a.a.createElement(at.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(Gr.a,null,a.a.createElement(ge.a,{title:Object(S.w)("$__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(){w(!x)}}]}),P?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(fe.a,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.w)("$__timeCourse",1)),a.a.createElement(_e.a,{label:Object(S.w)("$__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:c}),a.a.createElement(_e.a,{label:Object(S.w)("$__endDate",1),variant:Object(S.d)("fieldVariant"),name:"endDate",type:"date",min:c||null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target.value)}},value:g})),r.users&&Object.keys(r.users).length>0&&a.a.createElement(Ur.a,{style:{width:"100%"}},a.a.createElement(Vr.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(re.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.w)("$__users"),a.a.createElement(Jr.a,{max:6},Object.keys(E).length>0&&Object.keys(E).map((function(e,t){return a.a.createElement(Kt.a,{title:r.users[e].name,key:t},a.a.createElement(at.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),a.a.createElement(qr.a,{style:{minWidth:"100%"}},a.a.createElement(Kr.a,null,Object.keys(R).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&a.a.createElement(a.a.Fragment,{key:e},a.a.createElement(Xr.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(at.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(zr.a,{checked:!(!E||!E[e]),onChange:function(){!function(e){E[e]&&Object.keys(E).filter((function(e){return E[e]})).length<=1?L({}):L(Object(p.a)(Object(p.a)({},E),{},Object(h.a)({},e,!E[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(Yr.a,{data:Y}),a.a.createElement(k.a,{title:Object(S.w)("$__closeFilter"),text:Object(S.w)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){w(!x)},size:"25px"}))),a.a.createElement(Wr.a,{style:{height:"333px"}},a.a.createElement(Br.a,{data:Object(A.a)(Object.keys(Y).sort((function(e,t){return parseInt(Y[e].totalTimer)>parseInt(Y[t].totalTimer)?-1:parseInt(Y[e].totalTimer)<parseInt(Y[t].totalTimer)?1:0})).map((function(e,t){return{id:Y[e].name,label:Y[e].name,value:Y[e].totalTimer,color:"#929497",textMini:Y[e].timerText}}))),valueFormat:function(e){return H(e,!0),H(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:0,bottom:10,left:0},padAngle:1.3,sortByValue:!0}),a.a.createElement("div",{style:{width:"100px",wordWrap:"break-word",position:"absolute",top:"33%",left:"calc(50% - 50px)",fontWeight:"bold",color:Object(S.d)("menu"),textAlign:"center"}},H(G,!0))),a.a.createElement(Hr.a,null,a.a.createElement(Rr.a,null,Object.keys(Y).sort((function(e,t){return parseInt(Y[e].totalTimer)>parseInt(Y[t].totalTimer)?-1:parseInt(Y[e].totalTimer)<parseInt(Y[t].totalTimer)?1:0})).map((function(e,t){return a.a.createElement(W,{data:Y[e],key:e})})),a.a.createElement(W,{data:{name:Object(S.w)("$__total"),timerText:H(G)}}))),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.w)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object(S.w)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),en=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 tn=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(en)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.sideModule,i=r.session,c=o.data||{},s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],p=u[1],f=a.a.useState(l.a.getState().db.cards[c._id]._users[i._id]?"timeline":"chart"),h=Object(m.a)(f,2),g=h[0],b=h[1],v=window.location.hash.split("/");v[0]=v[0].replace("#","");var y=n.cards[c._id]._timeline||{};return y=Object.keys(y).filter((function(e){return"kpi"===y[e].type})).map((function(e){return y[e]})),a.a.createElement("div",null,!d&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},"chart"!==g&&l.a.getState().db.cards[c._id]._users[i._id]&&a.a.createElement(k.a,{title:Object(S.w)("$__add"),text:Object(S.w)("$__add"),icon:"more_time",size:"25px",onClick:function(){p(!0)}}),"chart"!==g&&a.a.createElement(k.a,{title:Object(S.w)("$__showChart"),text:Object(S.w)("$__showChart"),icon:"analytics",size:"25px",onClick:function(){b("chart")}}),"timeline"!==g&&a.a.createElement(k.a,{title:Object(S.w)("$__showTimeline"),text:Object(S.w)("$__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(Qr,{nodeId:c._id})),(d||"timeline"===g)&&a.a.createElement("div",{style:{position:"absolute",top:35,left:0,right:0,bottom:0}},a.a.createElement(xe.a,{nodeId:c._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(Yt.a,{data:c,manualAdd:!0,callBack:function(){p(!1)}})))})));function rn(){rn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var nn=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.sideModule,n=t.db,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],v=a.a.useState(null),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(0),O=Object(m.a)(_,2),j=O[0],E=O[1],k=a.a.useState(""),L=Object(m.a)(k,2),C=L[0],I=L[1],T=r.data||{};a.a.useEffect((function(){return"user"===T.type?F():b(!1),function(){}}),[]);var D=function(){var t=Object(f.a)(rn().mark((function t(){return rn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(ke.d)(T._id),Object(S.f)(e,{_id:T._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){var e=Object(f.a)(rn().mark((function e(){var t;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,Pe.a.post("/Card_Count",{id:T._id,all:!0,rel:"INN",node:"User"});case 3:(t=e.sent)&&(b(!1),E(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=Object(f.a)(rn().mark((function e(){var t;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,Fe.a.post("/user/migrateActivities",{from:T._id,fromData:T,to:[x],toData:n.users[x]});case 4:e.sent&&(s(!0),t=Object(p.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[T._id]})).forEach((function(e){t[e]._users[x]||(t[e]._users=Object(p.a)(Object(p.a)({},t[e]._users),{},Object(h.a)({},x,{access:t[e]._users[T._id].access,_id:x}))),delete t[e]._users[T._id]})),b(!1)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.log(e.t0),setTimeout((function(){N()}),3e3);case 12: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(ve,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),T._id&&n.users[T._id]&&("client"===n.users[T._id].type||"group"===n.users[T._id].type||"sic"===n.users[T._id].type||"unity"===n.users[T._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===T._id})).length>0?Object(S.w)("$__delete".concat(n.users[T._id].type,"WithUsersDescription"),1):Object(S.w)("$__delete".concat(n.users[T._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__deleteThisDescription",1)),a.a.createElement(nt,{onClick:function(){D()}},Object(S.w)("$__deleteThis",1))),T._id&&n.users[T._id]&&"user"===n.users[T._id].type&&a.a.createElement(a.a.Fragment,null,g?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,j>0&&!c?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__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"}},j," ",Object(S.w)("$__items"),a.a.createElement("br",null),Object(S.w)("$__deleteCountCardsExplain"))),x?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){w(null)}},a.a.createElement(at.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(nt,{onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.w)("$__confirm"),text:Object(S.w)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){N()}},{shadow:!0,title:Object(S.w)("$__cancel"),text:Object(S.w)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.w)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.w)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(_e.a,{label:Object(S.w)("$__search","*"),variant:"standard",autoFocus:!0,value:C,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("color")},"search")),onChange:function(e){I(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==T._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!T._parent&&!n.users[e]._parent||T._parent&&n.users[e]._parent===T._parent)&&(!C||C&&n.users[e].name.toLowerCase().indexOf(C.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(){w(e)},key:e},a.a.createElement(at.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.w)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__deactivateWhithoutMigration",1)),a.a.createElement(nt,{onClick:function(){D()}},Object(S.w)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.w)("$__deactivateUserDescription",1)),a.a.createElement(nt,{onClick:function(){D()}},Object(S.w)("$__deactivateThis",1)))),g?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(be.a,null)):a.a.createElement(a.a.Fragment,null)))})),an=r(21),on=r(2036),cn=Object(Y.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 ln=function(e){var t=cn();return a.a.createElement(on.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:a.a.createElement("span",{className:Object(an.default)(t.icon,t.checkedIcon)}),icon:a.a.createElement("span",{className:t.icon})},e))},sn=r(2019),un=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")}}},dn=r(1181),pn=r.n(dn);function fn(){fn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var hn=Object(u.b)((function(e,t){return{users:e.db.users,cardUsers:e.db.cards[e.sideModule.data._id]}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(un)((function(e){var t,r=e.classes,n=l.a.getState(),o=n.db,i=n.sideModule,c=n.session,s=a.a.useState({id:null}),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),v=b[0],y=b[1],x=a.a.useState("users"),w=Object(m.a)(x,2),_=w[0],O=w[1],j=a.a.useState(""),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(!1),T=Object(m.a)(I,2),D=T[0],F=T[1],N=o.cards[i.data._id],P=(null===N||void 0===N?void 0:N.client)||(null===(t=o.cards[N._planId])||void 0===t?void 0:t.client)||null,$=Object(p.a)({},o.users),M=Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},N&&N._users?Object(p.a)({},N._users):{}),N._parent&&o.cards[N._parent]&&o.cards[N._parent]._users?Object(p.a)({},o.cards[N._parent]._users):{}),N._planId&&o.cards[N._planId]&&o.cards[N._planId]._users?Object(p.a)({},o.cards[N._planId]._users):{}),$),B=Array.from(l.a.getState().db.userGroup),z=window.location.hash.split("/");z[0]=z[0].replace("#","");var Y=Object(S.j)(),R=N&&N._id&&o.cards[N._id]&&o.cards[N._id]._users&&Object.keys(o.cards[N._id]._users).length>0?o.cards[N._id]._users[Object.keys(o.cards[N._id]._users).find((function(e){return e.indexOf(c._id)>-1}))]:0;if(!i||!i.data)return null;var G=function(){var t=Object(f.a)(fn().mark((function t(r,n,a){var c,l;return fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=1,N&&"plan"===N.type&&(c=3),n?c=n:N._planId&&o.cards[N._planId]&&o.cards[N._planId]._users&&o.cards[N._planId]._users[r]&&o.cards[N._planId]._users[r].access&&(c=N._parent&&o.cards[N._parent]&&o.cards[N._parent]._users&&o.cards[N._parent]._users[r]&&o.cards[N._parent]._users[r].access&&parseInt(o.cards[N._parent]._users[r].access)>parseInt(o.cards[N._planId]._users[r].access)?parseInt(o.cards[N._parent]._users[r].access):parseInt(o.cards[N._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,Object(ke.b)(e,r,c,i.data._id,l,a);case 6:if(!t.sent){t.next=11;break}return y(!1),h({_id:null}),t.abrupt("return",!0);case 11:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),H=function(){var t=Object(f.a)(fn().mark((function t(r){return fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.j)(e,r,i.data._id);case 2:if(!t.sent){t.next=7;break}return y(!1),h({_id:null}),t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W=function(){var t=Object(f.a)(fn().mark((function t(r,n){return fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Fe.a.put("cards/removeAccess/",{cardId:i.data._id,userIds:[r]});case 2:t.sent&&(n&&e.reduxFunction("ASYNC","CLEAR_MODULE"),y(!1),h({_id:null}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!N)return null;$=$&&Object.keys($).length>0&&Object.keys($).filter((function(e){return e&&N&&N._users&&N._users[$[e]._id]&&!N._users[$[e]._id].deleted})).sort((function(e,t){return e.name<t.name?-1:0})).map((function(e){return $[e]})),M=Object.keys(M).filter((function(e){return"user"===M[e].type&&!M[e].deleted&&(!P&&(!M[e]._parent||M[e]._parent&&M[e]._parent===c.account)||P&&(M[e]._parent&&(M[e]._parent===P||M[e]._parent===c.account)||!M[e]._parent))})).map((function(e){return M[e]}));var U=function(){var e=Object(f.a)(fn().mark((function e(t){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(""),t.forEach((function(e){G(e._id,null,e)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=Object(f.a)(fn().mark((function e(t){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C("");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=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(k.a,{transparent:!0,title:N._groups&&N._groups[t.value]?Object(S.w)("$__removeTeam"):Object(S.w)("$__addTeam"),icon:N._groups&&N._groups[t.value]?"group_remove":"group_add",size:"20px",onClick:function(){N&&(!N._groups||N._groups&&!N._groups[t.value])?H(t.value):Object(ke.k)(e,t.value,N._id)}})))},X=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=!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])||(l=!1),N&&N._planId&&Object(et.B)(N._planId)&&(l=!0);var u=1;return s&&s._id&&N._users&&N._users[s._id]&&N._users[s._id].access&&(u=String(N._users[s._id].access)),a.a.createElement("div",{className:r.user},a.a.createElement("div",{className:r.name},s.name,N._users[s._id]&&N._users[s._id].isResponsible?a.a.createElement("span",{style:{fontSize:"9px",fontWeight:"normal",color:"#CCCCCC"}},Object(S.w)("$__responsible",1)):"",n&&!d._id?a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.w)("$__add"),icon:"person_add",size:"20px",onClick:function(){G(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(V.a,{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.w)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(ke.l)(e,{cardId:i.data._id,userId:s._id})}})}}].concat(Object(A.a)(l&&(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||Y&&Y.plan&&(Y.planAdmin||Y.planModerate))||s._id===c._id)?[{name:"$__editAccess",icon:"manage_accounts",onClick:function(){h({_id:s._id,access:u})}},{name:"$__removeAccess",icon:"delete_forever",color:"red",onClick:function(){Object(S.c)({message:s._id!==c._id?Object(S.w)("$__confirmRemoveUser",1):Object(S.w)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){W(s._id,s._id===c._id)}})}}]:[]))}))),a.a.createElement("div",{className:r.avatar,style:{backgroundImage:'url("'.concat(s.image?s.image:pn.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:l?function(){(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||Y&&Y.plan&&(Y.planAdmin||Y.planModerate))||s._id===c._id)&&h({_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.w)("$__owner",1):"0"===u?Object(S.w)("$__reader",1):"1"===u?Object(S.w)("$__executioner",1):"2"===u?Object(S.w)("$__collaborator",1):"3"===u?Object(S.w)("$__leadership",1):"4"===u?Object(S.w)("$__supervisor",1):"5"===u?Object(S.w)("$__admin",1):Object(S.w)("$__reader",1),")")))};if(d&&d._id){var K=1;N._users&&N._users[d._id]&&N._users[d._id].access&&(K=String(N._users[d._id].access));var Z=N._users[d._id],Q=!1;return N&&N._planId&&Object(et.B)(N._planId)&&(Q=!0),a.a.createElement(a.a.Fragment,null,X(Z,!0),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"100%",float:"left",justifyContent:"flex-end"}},v&&a.a.createElement(k.a,{transparent:!0,title:Object(S.w)("$__save"),icon:"save",color:Object(S.d)("color"),onClick:function(){G(d._id,d.access,Z)}}),$.length>1&&a.a.createElement(k.a,{transparent:!0,title:d._id!==c._id?Object(S.w)("$__removeAccess",1):Object(S.w)("$__getOut",1),icon:d._id!==c._id?"delete_forever":"logout",color:"red",onClick:function(){Object(S.c)({message:d._id!==c._id?Object(S.w)("$__confirmRemoveUser",1):Object(S.w)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){W(d._id,d._id===c._id)}})}}),a.a.createElement(k.a,{transparent:!0,title:Object(S.w)("$__close","*"),icon:"undo",color:Object(S.d)("medium"),onClick:function(){v?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){h({_id:null}),y(!1)}}):(h({_id:null}),y(!1))}})),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:15,float:"left"}},(d._id!==c._id||Y.plan&&Y.planAdmin)&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement(sn.a,{defaultValue:String(K),"aria-label":"gender",name:"customized-radios",onChange:function(e){h(Object(p.a)(Object(p.a)({},d),{},{access:e.target.value})),y(!0)}},"plan"!==N.type&&(R&&parseInt(R.access)>=0||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Xr.a,{value:"0",control:a.a.createElement(ln,null),label:Object(S.w)("$__reader",1)}),"plan"!==N.type&&(R&&parseInt(R.access)>=1||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Xr.a,{value:"1",control:a.a.createElement(ln,null),label:Object(S.w)("$__executioner",1)}),"plan"!==N.type&&"chatGroup"!==N.type&&(R&&parseInt(R.access)>=2||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Xr.a,{value:"2",control:a.a.createElement(ln,null),label:Object(S.w)("$__collaborator",1)}),(R&&parseInt(R.access)>=3||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Xr.a,{value:"3",control:a.a.createElement(ln,null),label:Object(S.w)("$__leadership",1)}),"chatGroup"!==N.type&&(R&&parseInt(R.access)>=4||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Xr.a,{value:"4",control:a.a.createElement(ln,null),label:Object(S.w)("$__supervisor",1)}),(R&&parseInt(R.access)>=5||Y&&Y.plan&&Q&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Xr.a,{value:"5",control:a.a.createElement(ln,null),label:Object(S.w)("$__admin",1)}))),"chatGroup"!==N.type?a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},"0"===d.access&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.w)("$__readOnlyTodo",1)),a.a.createElement("li",null,Object(S.w)("$__readTimeline",1))),parseInt(d.access)>=1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.w)("$__executioner",1)),a.a.createElement("li",null,Object(S.w)("$__timeSheetRegister",1)),a.a.createElement("li",null,Object(S.w)("$__interactonTheTimeline",1))),parseInt(d.access)>1&&a.a.createElement("li",null,Object(S.w)("$__ExecuteAndCreateSubTasks",1)),parseInt(d.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.w)("$__access",1)," BRIGHT & CONNECTED"),a.a.createElement("li",null,Object(S.w)("$__access",1)," INSIGHTS")),a.a.createElement("li",null,Object(S.w)("$__updateDueDate",1)),a.a.createElement("li",null,Object(S.w)("$__updateTags",1)),a.a.createElement("li",null,Object(S.w)("$__updateIndicators",1)),a.a.createElement("li",null,Object(S.w)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.w)("$__defineResponsible",1))),parseInt(d.access)>3&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.w)("$__updateData",1)),a.a.createElement("li",null,Object(S.w)("$__usersManager",1))),parseInt(d.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.w)("$__access",1)," MATRIX SWOT")),a.a.createElement("li",null,Object(S.w)("$__settings",1))),5===parseInt(d.access)&&a.a.createElement("li",null,Object(S.w)("$__deleteActivity",1))):a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},parseInt(d.access)>1&&a.a.createElement("li",null,Object(S.w)("$__viewAndInteract",1)),parseInt(d.access)>2&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.w)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.w)("$__update",1))),5===parseInt(d.access)&&a.a.createElement("li",null,Object(S.w)("$__deleteGroup",1))),N._users[d._id]&&!N._users[d._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(k.a,{transparent:!0,title:Object(S.w)("$__setAsResponsible"),text:Object(S.w)("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(ke.l)(e,{cardId:i.data._id,userId:d._id})}})}}))))}return a.a.createElement("div",{className:r.root},D&&a.a.createElement("div",{style:{marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},a.a.createElement(_e.a,{id:"quickUser_Search",label:Object(S.w)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end",style:{cursor:"pointer"},onClick:function(){C(""),F(!1)}},a.a.createElement(re.a,{icon:"close"})),onChange:function(e){C(e.target.value)},onBlur:function(e){}},value:L,placeholder:Object(S.w)("$__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.w)("$__permittedUsers",1)),$&&$.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e._id},X(e))}))),N&&N._groups&&Object.keys(N._groups).length>0?a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__permittedTeams",1)),B.filter((function(e){return N._groups[e.value]})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e},J(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"!==_?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:"users"!==_?"gray":"#FFFFFF"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){O("users")}},a.a.createElement(re.a,{icon:"supervised_user_circle",size:"33px",color:"users"!==_?null:"#FFFFFF"}),Object(S.w)("$__showUsers"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:"users"!==_?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:"users"!==_?"#FFFFFF":"gray"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){O("teams")}},a.a.createElement(re.a,{icon:"group_work",size:"33px",color:"users"!==_?"#FFFFFF":null}),Object(S.w)("$__showTeams")))),"users"===_&&M&&M.length>0&&!d._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__avaiableUsers",1)),a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.w)("$__add"),icon:"person_add",text:Object(S.w)("$__addAllUsers"),size:"20px",onClick:function(){U(M)}})),M.filter((function(e){return!L||e.name.toLowerCase().indexOf(L.toLowerCase())>-1})).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},X(e,!0))}))),"users"!==_&&B&&B.length>0&&!d._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.w)("$__avaiableTeams",1)),a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.w)("$__add"),icon:"person_add",text:Object(S.w)("$__addAllTeams"),size:"20px",onClick:function(){q(B)}})),B.filter((function(e){return(!L||L&&e.name.toLowerCase().indexOf(L.toLowerCase())>-1)&&(!N._groups||N._groups&&!N._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},J(e))}))),D?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:0}},a.a.createElement(k.a,{title:Object(S.w)("$__search",1),color:Object(S.d)("menu"),icon:"search",onClick:function(){F(!0)},size:"25px"})))}))),mn=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 gn(){gn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var bn=function(){var e=Object(f.a)(gn().mark((function e(t){var r,n,a;return gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=l.a.getState().sideModule.data).status&&delete r.status,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.prev=4,e.next=7,Fe.a.post("feed/save",Object(p.a)(Object(p.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(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:a.data._id,data:Object(p.a)({},r)})),console.log(a),t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{feeds:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds),{},Object(h.a)({},r._id,Object(p.a)(Object(p.a)(Object(p.a)({},r),l.a.getState().db.feeds&&l.a.getState().db.feeds[r._id]?l.a.getState().db.feeds[r._id]:{}),{},{_parent:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds&&l.a.getState().db.feeds[r._id]&&l.a.getState().db.feeds[r._id]._parent?l.a.getState().db.feeds[r._id]._parent:{}),{},Object(h.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)}}(),vn=function(){var e=Object(f.a)(gn().mark((function e(t){var r,n,a,o=arguments;return gn().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(f.a)(gn().mark((function e(n,a){var o,i;return gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.a.post("/Feed_List_V2",r);case 3:(o=e.sent)&&o.data&&(i={},o.data.forEach((function(e){var t={};e.parents&&e.parents.length>0&&e.parents.forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e._id,Object(p.a)({idRel:e.idRel},e.i)))})),i=Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e.data._id,Object(p.a)(Object(p.a)(Object(p.a)({},e.data),e.hide?{hide:!0}:{}),{},{feed:[Object(p.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(p.a)(Object(p.a)({},l.a.getState().db),{},{feeds:Object(p.a)(Object(p.a)({},l.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 yn(){yn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var xn=Object(Y.a)(mn);var wn=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=xn(),r=l.a.getState(),n=r.sideModule,o=r.session,i=r.db,c=n.data||{},s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState(!1),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useRef(),O=0,j=Object(S.j)(),E=window.location.hash.split("/");E[0]=E[0].replace("#",""),E[0]&&36===E[0].length&&(O=Object(et.t)(E[0]));var L=function(t){""===c.name||"name"===t.name&&""===t.value?g(!1):c._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(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},Object(h.a)({},t.name,t.value))}))},C=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},I=function(){var t=Object(f.a)(yn().mark((function t(r){return yn().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.w)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,bn(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.w)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&C(!0)):(Object(S.c)({message:Object(S.w)("$__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)}}(),T=function(){var t=Object(f.a)(yn().mark((function t(r){var a,o,i,c;return yn().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.w)("$__invalidUrl",1),": ").concat(Object(S.w)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.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,Fe.a.post("/feed/exist",{url:r});case 16:o=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.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),D(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,Fe.a.post("/link/exist",{idRel:i[0],url:a});case 31:c=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:c.data.title,description:c.data.contentSnippet,image:c.data.img,url:c.data.link,content:c.data.article}})),c&&x(!1),c.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.w)("$__invalidFeedUrl",1),": ").concat(Object(S.w)("$__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)}}(),D=function(){var t=Object(f.a)(yn().mark((function t(r){var a;return yn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Fe.a.post("/feed/request/",{url:r});case 3:a=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.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.w)("$__invalidFeedUrl",1),": ").concat(Object(S.w)("$__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)}}(),F=!!e.permission&&e.permission;return!F&&parseInt(O)>=3&&(F=!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"}},F&&d&&a.a.createElement(ve,{save:d?function(){I()}:null,saveClose:d?function(){I(!0)}:null,close:function(){e.onClose&&e.onClose()}}),a.a.createElement(k.a,{title:Object(S.w)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),a.a.createElement("div",{className:t.data},c._lock?a.a.createElement(a.a.Fragment,null,a.a.createElement(_e.a,Object.assign({label:Object(S.w)("$__titleOfFeed",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){L(e.target)}},value:c&&c.name?c.name:"",placeholder:Object(S.w)("$__titleOfFeed_placeholder")},o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account||c&&c.name?{disabled:!0}:{})),a.a.createElement(_e.a,{label:Object(S.w)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"title"})),onChange:function(e){L(e.target)}},value:c&&c.customTitle?c.customTitle:"",placeholder:Object(S.w)("$__customTitle",1)}),o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account?a.a.createElement(a.a.Fragment,null,a.a.createElement(_e.a,{label:Object(S.w)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"copyright"})),onChange:function(e){L(e.target)}},value:c&&c.font?c.font:"",placeholder:Object(S.w)("$__nameOfFontData",1)}),a.a.createElement(_e.a,{label:Object(S.w)("$__descriptionOfRss",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){L(e.target)}},value:c&&c.description?c.description:"",placeholder:Object(S.w)("$__descriptionOfRss",1)})):a.a.createElement(a.a.Fragment,null),a.a.createElement(_e.a,{label:Object(S.w)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){L(e.target)}},value:c&&c.customDescription?c.customDescription:"",placeholder:Object(S.w)("$__customDescription",1)}),a.a.createElement(_e.a,{label:Object(S.w)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:w,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"http"})),onChange:function(e){L(e.target)},onBlur:function(e){T(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),j&&j.feed&&(j.feedAdmin||j.feedModerate)&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__tags",1)),a.a.createElement(ur,{data:{values:c._tags?c._tags:[]},callBack:function(e){L({name:"_tags",value:e})}})),j&&j.feed&&j.feedAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(Be.a,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:c&&c.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(c.plans)}))[0]:i.plans[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:c&&c.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(c.plans)}))[0]:i.plans[0]}))},onChange:function(e,t){F&&L({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!c.private,onChange:function(e){L({name:"private",value:!c.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__private",1))):a.a.createElement(_e.a,{label:Object(S.w)("$__feedUrl","*"),variant:Object(S.d)("fieldVariant"),ref:w,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"rss_feed"})),onChange:function(e){L(e.target)},onBlur:function(e){T(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),!c._lock&&!y&&a.a.createElement(Ce.a,{text:Object(S.w)("link"===n.data.type?"$__validUrl":"$__validFeedUrl",1),icon:"check",onClick:function(){return T(w.current.value)}}),y&&a.a.createElement("div",{className:t.loader},a.a.createElement(be.a,null)),c.feed&&c.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.w)("$__preview",1)),c.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",rel:"noopener noreferrer"},Object(S.w)("$__openLink","*")))))})))))}));function _n(){_n=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var On=Object(Y.a)(mn);var jn=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=On(),r=l.a.getState().sideModule,n=r.data||{},o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],v=a.a.useRef(),y=0,x=window.location.hash.split("/");x[0]=x[0].replace("#",""),x[0]&&36===x[0].length&&(y=Object(et.t)(x[0]));var w=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(p.a)(Object(p.a)({},r),{},{data:Object(p.a)(Object(p.a)({},r.data),{},Object(h.a)({},t.name,t.value))}))},O=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},j=function(){var t=Object(f.a)(_n().mark((function t(n){return _n().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.w)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,bn(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.w)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&O(!0)):(Object(S.c)({message:Object(S.w)("$__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)}}(),E=function(){var t=Object(f.a)(_n().mark((function t(n){var a,o,i;return _n().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.w)("$__invalidUrl",1),": ").concat(Object(S.w)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r),{},{data:Object(p.a)(Object(p.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,Fe.a.post("/link/exist",{idRel:o[0],url:a});case 15:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.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.w)("$__invalidFeedUrl",1),": ").concat(Object(S.w)("$__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.w)("$__invalidUrl",1),": ").concat(Object(S.w)("$__pleaseVerifyTheUrl",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r),{},{data:Object(p.a)(Object(p.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)}}(),L=!!e.permission&&e.permission;return!L&&parseInt(y)>=3&&(L=!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"}},L&&c&&a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),color:Object(S.d)("color"),icon:"save",onClick:function(){j()},size:"25px"}),a.a.createElement(k.a,{title:Object(S.w)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){j(!0)},size:"25px"})),a.a.createElement(k.a,{title:Object(S.w)("$__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(_e.a,{label:Object(S.w)("$__titleOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){w(e.target)}},value:n&&n.name?n.name:"",placeholder:Object(S.w)("$__titleOfUrl_placeholder"),disabled:!0}),a.a.createElement(_e.a,{label:Object(S.w)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"title"})),onChange:function(e){w(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:Object(S.w)("$__customTitle",1)}),a.a.createElement(_e.a,{label:Object(S.w)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"copyright"})),onChange:function(e){w(e.target)}},value:n&&n.font?n.font:"",placeholder:Object(S.w)("$__nameOfFontData",1)}),a.a.createElement(_e.a,{label:Object(S.w)("$__descriptionOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){w(e.target)}},value:n&&n.description?n.description:"",placeholder:Object(S.w)("$__descriptionOfUrl",1)}),a.a.createElement(_e.a,{label:Object(S.w)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){w(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:Object(S.w)("$__customDescription",1)}),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!n.private,onChange:function(e){w({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__private",1))),a.a.createElement(_e.a,{label:Object(S.w)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:v,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"http"})),onChange:function(e){w(e.target)},onBlur:function(e){E(e.target.value)}},value:n&&n.url?n.url:"",placeholder:"http://www.domain.com/",disabled:!!n._lock}),!n._lock&&!g&&a.a.createElement(Ce.a,{text:Object(S.w)("$__validUrl",1),icon:"check",onClick:function(){return E(v.current.value)}}),g&&a.a.createElement("div",{className:t.loader},a.a.createElement(be.a,null)),n.feed&&n.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.w)("$__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",rel:"noopener noreferrer"},Object(S.w)("$__openLink","*")))))})))))}));var En=Object(u.b)((function(e){return{sideModule:e.sideModule}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ye)((function(e){var t,r,n=l.a.getState(),o=n.sideModule,i=n.db,c=n.session,s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],f=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),v=b[0],y=b[1];if(a.a.useEffect((function(){return o.id&&(v||"timeline"!==o.activeModule||(y(!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 x=e.classes,w=o.data,_=window.location.hash.split("/");_[0]=_[0].replace("#","");var O=i.cards[w._id]?"cards":"users",j=Object(S.j)(),E=Object(et.t)(o.id),k=!1;!w||!w._planId||i.cards[w._planId]&&Object(et.B)(w._planId)||(k=!1),!(k=!(!o||!("new"===o.id||("user"===w.type||"client"===w.type)&&j&&j.user&&(j.userAdmin||j.userModerate)||"user"!==w.type&&"client"!==w.type&&"chatGroup"!==w.type&&j&&(j.owner||j.plan&&(j.planAdmin||j.planModerate))||"chatGroup"===w.type&&(!w.client||w.client&&i.users[w.client])&&j&&(j.owner||j.plan&&(j.planAdmin||j.planModerate)))))&&parseInt(E)>=4&&(k=!0),!k&&Object(et.B)(w._planId)&&j&&j.admin&&j.plan&&(j.planAdmin||j.planModerate)&&(k=!0);var L=w.formId&&l.a.getState().forms[w.formId]?JSON.parse(l.a.getState().forms[w.formId].elements):[],C={};L.forEach((function(e){w[e.id]&&(C=Object(p.a)(Object(p.a)({},C),{},Object(h.a)({},e.id,w[e.id])))}));var I=[{name:"cardEdit",icon:"subject",title:"$__edition",reqId:!1,module:Ut,closeOption:!1,permission:0,buttonsCount:3,template:!0}].concat(Object(A.a)(w.formId&&l.a.getState().forms[w.formId]&&Object.keys(l.a.getState().forms[w.formId]).length>0?[{name:"forms",icon:"ballot",title:"$__forms",reqId:!0,module:jt,permission:0,closeOption:!0,template:!0,props:{formId:w.formId,values:C,disabled:!0,style:{padding:15}}}]:[]),[{name:"feedEdit",icon:"rss_feed",title:"$__feedEdit",reqId:!1,module:wn,closeOption:!1,permission:3,template:!0},{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:Le,closeOption:!1,permission:0},{name:"checklist",icon:"checklist",title:"$__list",reqId:!0,module:lr.a,closeOption:!0,permission:1,props:{nodeId:o.data._id,db:o.db?o.db:"cards",permission:k,showProgress:!0},template:!0}],Object(A.a)(w.type.indexOf("guideline")>-1||w.type.indexOf("objective")>-1||w.type.indexOf("goal")>-1?[{name:"catenation",icon:"account_tree",title:"$__catenation",reqId:!0,module:cr,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:Fr,closeOption:!0,permission:3,props:{nodeId:o.data._id,db:o.db?o.db:"cards"},template:!0},{name:"link",icon:"link",title:"$__link",reqId:!1,module:jn,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:xe.a,props:{type:"comment",nodeId:o.id,db:"cards",loadTimeline:!0,disabledSend:"0"===String(E)},closeOption:!0,permission:0,count:"comment"},{name:"access",icon:c._id===w._id?"vpn_key":"security",title:c._id===w._id?"$__changePassword":"$__access",reqId:!0,module:Ae,closeOption:!1,permission:c._id===w._id?0:4},{name:"users",icon:"supervised_user_circle",title:"$__usersAndDepartments",reqId:!0,module:hn,closeOption:!0,permission:3,template:!0}],Object(A.a)(E>=4||E&&E<4&&w.kpi_type&&"task"!==w.kpi_type||j&&j.plan&&j.planAdmin?[{name:"kpi",icon:"analytics",title:"$__kpi",reqId:!0,module:er,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:tn,closeOption:!0,permission:1,count:"timer"},{name:"files",icon:"folder",title:"$__files",reqId:!0,module:Ir,closeOption:!0,permission:3,props:{nodeId:o.id,db:o.db}},{name:"log",icon:"history",title:"$__log",reqId:!0,module:xe.a,props:{type:"log",nodeId:o.id,db:"cards",loadTimeline:!0,noSearch:!0,disabledSend:!0},closeOption:!0,permission:0,count:"log"}],Object(A.a)(c._id===w._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:Me,closeOption:!1,permission:c._id===w._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:Ke,closeOption:!1,permission:c._id===w._id?0:6,ownerLock:!0}]:[]),[{name:"columnEdit",icon:"tune",title:"$__edition",reqId:!1,module:xr,closeOption:!1,permission:0,buttonsCount:3,template:!0}],Object(A.a)("users"===O?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:nn,closeOption:!0}]:[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:it,closeOption:!0,permission:5,template:!0}]),[{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:Mr,closeOption:!0,permission:3,template:!0}],Object(A.a)("client"===w.type||"group"===w.type||"unity"===w.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Ue,closeOption:!1,permission:1,template:!0}]:[]),Object(A.a)("user"===w.type&&c._id===w._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Ye,closeOption:!1,permission:1,template:!0}]:[]),Object(A.a)("step"===w.type&&k?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:wr,closeOption:!1,permission:5,template:!0}]:[]),Object(A.a)("user"!==w.type&&"step"!==w.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:nr,closeOption:!1,permission:5,template:!0}]:[])),T=I.filter((function(e){return e.name===o.activeModule}))[0];if(!T||!T.module)return null;var D=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d||t?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE"),f(!1)}}):(e.reduxFunction("ASYNC","CLEAR_MODULE"),f(!1))},F=Object(et.R)(w._id),P=(o.data.type?i.dataType.filter((function(e){return"forms"===e.name||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(),D()}},a.a.createElement("div",{className:c.sideModuleWindow&&"popup"===c.sideModuleWindow?x.modulePopup:c.sideModuleWindow&&"expanded"===c.sideModuleWindow?x.moduleExpanded:c.sideModuleWindow&&"fullScreen"===c.sideModuleWindow?x.moduleFullScreen:x.module,id:"sideModule",onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{className:x.menu,style:{background:Object(S.d)("menuColor"),borderRight:"solid 3px ".concat(Object(S.d)("color"))},id:"sideModule_menu"},a.a.createElement("div",{className:x.menuButtons_resume}),I.filter((function(e,t){return e&&(!F||o.data&&F&&e.template)&&(!e.reqId||e.reqId&&36===o.id.length)&&(("user"===w.type||"client"===w.type)&&(j&&j.user&&(j.userAdmin||j.userModerate&&e.permission<=4||j.userEdit&&e.permission<=3)||w._id===c._id&&e.permission<=3)||"user"!==w.type&&"client"!==w.type&&"account"!==w.type&&"unity"!==w.type&&k&&j&&j.plan&&(j.planAdmin||j.planModerate&&e.permission<=4)||("user"!==w.type||"client"!==w.type||"account"!==w.type)&&String(E)&&parseInt(E)>=parseInt(e.permission))&&("forms"===e.name&&w.formId||P.indexOf(e.name)>-1)&&("recurrence"!==e.name||"recurrence"===e.name&&Object.keys(l.a.getState().db.cards).filter((function(e){return!(l.a.getState().db.cards[e].deleted||l.a.getState().db.cards[e].checklist||!l.a.getState().db.cards[e]._recurrenceId||l.a.getState().db.cards[e]._recurrenceId!==o.data._id)})).length>0)})).filter((function(e){return!o.data._requireApproval||o.data._requireApproval&&("resume"===e.name||"cardEdit"===e.name||"timeline"===e.name||"kpi"===e.name||"log"===e.name||"timer"===e.name)})).map((function(t,r){return a.a.createElement(tt,{key:r,icon:t.icon,module:t.name,title:Object(S.w)(t.title,1),count:t.count?t.count:null,openModule:function(t){!function(t){d?Object(S.c)({message:Object(S.w)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){f(!1),o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)({},o))}}):(o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)({},o)))}(t)}})})),a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%",height:"50px"},onClick:function(){!function(){var t=!1;t?"popup"===t?t="expanded":"expanded"===t?t="fullScreen":"fullScreen"===t&&(t=null):t="popup",e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{sideModuleWindow:t}))}()}})),a.a.createElement("div",{id:"sideModule_header"},a.a.createElement(ge.a,Object.assign({title:o&&o.data&&o.data.name||"".concat(Object(S.w)("$__create")," ").concat(Object(S.w)("$__".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")},k&&(null===o||void 0===o||null===(r=o.data)||void 0===r?void 0:r._id)?{editable:!0,onChangeIcon:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:o.data._id}}),{icon:t})}}:{})),T.closeOption&&a.a.createElement(ve,{close:function(){return D()}})),a.a.createElement("div",{className:x.content},a.a.createElement(N.a,null,a.a.createElement(T.module,Object.assign({},T.props,{permission:k,onClose:function(e){D(e)},reqSave:function(e){f(e)}})))),a.a.createElement("div",{className:x.subTitle,id:"sideModule_subTitle",style:Object(p.a)(Object(p.a)({},o&&o.data&&o.data.private?{background:"gray"}:{}),{},{display:"flex",justifyContent:"space-between"})},Object(S.w)(T.title.toLowerCase(),1),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",color:Object(S.u)(Object(S.d)("color"),!0)}},a.a.createElement("div",null,w._cardCode?"#".concat(w._cardCode," "):""),w.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:Object(S.u)(Object(S.d)("color"),!0),textAlign:"right",marginLeft:10}},Object(S.w)("$__createdAt"),": ",Object(S.k)(w.created_at)):a.a.createElement(a.a.Fragment,null)),o&&o.data&&o.data.private?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.w)("$__isPrivate","*"),a.a.createElement(re.a,{icon:"lock",color:"#FFFFFF",size:20,style:{marginLeft:7}})):a.a.createElement(a.a.Fragment,null)))):null})));var kn=Object(u.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(Ar.b)();return document.title="".concat(t&&t.total>0?"(".concat(t.total,") "):"","MACHEN"),a.a.createElement(a.a.Fragment,null,a.a.createElement(J.a,{badgeContent:t&&t.total?t.total:0,color:"secondary",overlap:"rectangular"},e.children))})),Sn=r(22),Ln={button:{minHeight:"auto",minWidth:"auto",backgroundColor:Z.p[0],color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.p[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.p[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.p[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:Z.I,backgroundColor:Z.p[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.p[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.p[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:Z.w[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.w[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.w[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.w[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.w[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.w[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.w[0])+", 0.2)"}},info:{backgroundColor:Z.s[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.s[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.s[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.s[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.s[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.s[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.s[0])+", 0.2)"}},success:{backgroundColor:Z.B[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.B[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.B[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.B[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.B[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.B[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.B[0])+", 0.2)"}},warning:{backgroundColor:Z.H[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.H[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.H[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.H[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.H[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.H[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.H[0])+", 0.2)"}},danger:{backgroundColor:Z.i[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.i[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.i[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.i[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.i[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.i[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.i[0])+", 0.2)"}},rose:{backgroundColor:Z.z[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.z[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.z[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.z[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.z[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.z[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.z[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:Z.I,color:Z.p[0]}},twitter:{backgroundColor:Z.F,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.F)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.F)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.F)+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:Z.F,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.F)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.F)+", 0.2)"}},facebook:{backgroundColor:Z.n,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.n)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.n)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.n)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.n,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.n)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.n)+", 0.2)"}},google:{backgroundColor:Z.o,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.o)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.o)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.o)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.o,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.o)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.o)+", 0.2)"}},linkedin:{backgroundColor:Z.t,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.t)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.t)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.t)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.t,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.t)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.t)+", 0.2)"}},pinterest:{backgroundColor:Z.u,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.u)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.u)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.u)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.u,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.u)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.u)+", 0.2)"}},youtube:{backgroundColor:Z.J,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.J)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.J)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.J)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.J,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.J)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.J)+", 0.2)"}},tumblr:{backgroundColor:Z.E,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.E)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.E)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.E)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.E,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.E)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.E)+", 0.2)"}},github:{backgroundColor:Z.p[7],color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.p[6])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.p[6])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.p[6])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.p[7],color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.p[6])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.p[6])+", 0.2)"}},behance:{backgroundColor:Z.a,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.a)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.a)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.a)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.a,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.a)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.a)+", 0.2)"}},dribbble:{backgroundColor:Z.m,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.m)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.m)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.m)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.m,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.m)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.m)+", 0.2)"}},reddit:{backgroundColor:Z.x,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.x)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.x)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.x)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.x,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.x)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.x)+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:Z.I,background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:Z.w[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:Z.s[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:Z.B[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:Z.H[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:Z.z[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:Z.i[0]}},"&$twitter":{"&,&:focus,&:hover,&:visited":{color:Z.F}},"&$facebook":{"&,&:focus,&:hover,&:visited":{color:Z.n}},"&$google":{"&,&:focus,&:hover,&:visited":{color:Z.o}},"&$linkedin":{"&,&:focus,&:hover,&:visited":{color:Z.t}},"&$pinterest":{"&,&:focus,&:hover,&:visited":{color:Z.u}},"&$youtube":{"&,&:focus,&:hover,&:visited":{color:Z.J}},"&$tumblr":{"&,&:focus,&:hover,&:visited":{color:Z.E}},"&$github":{"&,&:focus,&:hover,&:visited":{color:Z.p[7]}},"&$behance":{"&,&:focus,&:hover,&:visited":{color:Z.a}},"&$dribbble":{"&,&:focus,&:hover,&:visited":{color:Z.m}},"&$reddit":{"&,&:focus,&:hover,&:visited":{color:Z.x}}},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:Z.p[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"}}}},Cn=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],In=Object(Y.a)(Ln),Tn=a.a.forwardRef((function(e,t){var r,n=In(),o=e.color,i=e.round,c=e.children,l=e.fullWidth,s=e.disabled,u=e.simple,d=e.size,p=e.block,f=e.link,m=e.justIcon,g=e.className,b=e.muiClasses,v=Object(ft.a)(e,Cn),y=x()((r={},Object(h.a)(r,n.button,!0),Object(h.a)(r,n[d],d),Object(h.a)(r,n[o],o),Object(h.a)(r,n.round,i),Object(h.a)(r,n.fullWidth,l),Object(h.a)(r,n.disabled,s),Object(h.a)(r,n.simple,u),Object(h.a)(r,n.block,p),Object(h.a)(r,n.link,f),Object(h.a)(r,n.justIcon,m),Object(h.a)(r,g,g),r));return a.a.createElement(rt.a,Object.assign({},v,{ref:t,classes:b,className:y}),c)})),Dn={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"+Z.p[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"+Z.p[8]}},Fn=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],Nn=Object(Y.a)(Dn);function An(e){var t,r=Nn(),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,f=Object(ft.a)(e,Fn),m=x()((t={},Object(h.a)(t,r.cardFooter,!0),Object(h.a)(t,r.cardFooterPlain,i),Object(h.a)(t,r.cardFooterProfile,c||s),Object(h.a)(t,r.cardFooterPricing,l),Object(h.a)(t,r.cardFooterTestimonial,s),Object(h.a)(t,r.cardFooterStats,u),Object(h.a)(t,r.cardFooterChart,d||p),Object(h.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:m},f),o)}var Pn=function(e){return{container:Object(p.a)(Object(p.a)({},Z.e),{},Object(h.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(p.a)(Object(p.a)({},Z.d),{},{color:Z.I}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:Z.I},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:Z.p[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};function $n(){$n=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Mn=Object(Y.a)(Pn);var Bn,zn,Yn=r(2022),Rn=r(2040),Gn=r(2023),Hn=r(2033);function Wn(){Wn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Un=j.b.div(Bn||(Bn=Object(d.a)(["\n            background-color:none;\n\n            "]))),qn=j.b.div(zn||(zn=Object(d.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            "]))),Vn=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(null),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(""),g=Object(m.a)(d,2),b=g[0],v=g[1],y=a.a.useState({}),x=Object(m.a)(y,2),w=x[0],_=x[1],O=a.a.useState({open:!1,name:""}),j=Object(m.a)(O,2),E=j[0],k=j[1],L=l.a.getState().db,C=l.a.getState().functions.socket,I=function(){var e=Object(f.a)(Wn().mark((function e(t){var r,n,a,o,i,c;return Wn().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),Fe.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(f.a)(Wn().mark((function e(t){var r,a,i,c;return Wn().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,Fe.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,Fe.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),_(!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)}}(),D=function(){var e=Object(f.a)(Wn().mark((function e(t,r){var n,a;return Wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.a.getState().functions.socket,e.prev=1,e.next=4,Fe.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)}}(),F=function(){var t=Object(f.a)(Wn().mark((function t(){var r;return Wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Fe.a.post("boards/add",{name:E.name});case 3:r=t.sent,e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},{boardModels:Object(p.a)(Object(p.a)({},l.a.getState().db.cards.boardModels),{},{boards:Object(p.a)(Object(p.a)({},l.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(Rr.a,null,L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&Object.keys(L.cards.boardModels.boards).map((function(t){return a.a.createElement(ar.a,{onDragEnd:I,key:t},a.a.createElement(Sn.a,{md:3},a.a.createElement("fieldset",{style:{width:"100%"}},a.a.createElement("legend",null,L.cards.boardModels.boards[t].name),a.a.createElement(ar.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return a.a.createElement(Un,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(ar.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return a.a.createElement(qn,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),L.cards.boardModels.boards[t].columns[e].name&&a.a.createElement(ge.a,{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(){D(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),_(Object(h.a)({},t,{open:!0}))},show:"hover"}]}))}))})),w&&w[t]&&w[t].open?a.a.createElement(a.a.Fragment,null,a.a.createElement(qn,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(br.a,{callBack:function(e){v(e)}})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(_e.a,{label:Object(S.w)("$__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.w)("$__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(Ce.a,{icon:"save",text:Object(S.w)("$__save","*"),onClick:function(){T(t)}}),a.a.createElement(Ce.a,{icon:Object(S.w)("$__cancel","*"),iconColor:"red",text:Object(S.w)("$__cancel","*"),onClick:function(){u(""),_({})}}))):a.a.createElement(Ce.a,{icon:"add_box",text:Object(S.w)("$__addColumn",1),onClick:function(){_(Object(h.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(_e.a,{label:Object(S.w)("$__boardName",1),variant:"outlined",name:"boardName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){k(Object(p.a)(Object(p.a)({},E),{},{name:e.target.value}))},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&F()}},value:E&&E.name,placeholder:Object(S.w)("$__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(Ce.a,{icon:"save",text:Object(S.w)("$__save","*"),onClick:function(){F()}}),a.a.createElement(Ce.a,{icon:"cancel",iconColor:"red",text:Object(S.w)("$__cancel","*"),onClick:function(){u(""),k({open:!1,name:""})}}))):a.a.createElement(Ce.a,{icon:"add_box",text:Object(S.w)("$__addBoard",1),onClick:function(){k(Object(p.a)(Object(p.a)({},E),{},{open:!0}))}})))})),Jn=r(2037),Xn=function(e){return{root:Object(p.a)(Object(p.a)({},Z.k),{},{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 Kn(){Kn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Zn=Object(u.b)((function(e){return{languages:e.languages}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Xn)((function(e){var t=e.classes,r=l.a.getState().languages,n=l.a.getState().functions.socket,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(0),d=Object(m.a)(u,2),p=d[0],h=d[1],g=a.a.useState(25),b=Object(m.a)(g,2),v=b[0],y=b[1],x=a.a.useState(""),w=Object(m.a)(x,2),_=w[0],O=w[1],j=function(){var e=Object(f.a)(Kn().mark((function e(t,r,a,o){return Kn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?n.emit("language.UPD",{alias:r,locale:a,text:o}):n.emit("data",{module:"language",method:"post",action:"addLocale"},{alias:r,locale:a,text:o});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.w)("$__page")," ",p+1," ",Object(S.w)("$__of")," ",Math.ceil(Object.keys(r).length/v),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:Object.keys(r).length,page:p,onChangePage:function(e,t){h(t)},rowsPerPage:v,onChangeRowsPerPage:function(e){y(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__cardsPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(_e.a,{label:Object(S.w)("$__search",1),variant:Object(S.d)("fieldVariant"),value:_,onChange:function(e){O(e.target.value)}}),a.a.createElement(Ce.a,{text:Object(S.w)("$__showOnlyEmpty","*"),icon:c?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){s(!c)}})),a.a.createElement(Ct.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.w)("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,r&&Object.keys(r)&&Object.keys(r).length>0&&Object.keys(r).filter((function(e){return!(!(!_||_&&(e.indexOf(_)>-1||r[e]&&r[e].locales&&Object.keys(r[e].locales).filter((function(t){return r[e].locales[t].name.indexOf(_)>-1})).length>0))||(!c||!r[e]||r[e].locales&&r[e].locales["pt-BR"]&&r[e].locales["pt-BR"].name)&&c)})).sort((function(e,t){return e<T.b?-1:e>t?1:0})).filter((function(e,t){return t<=(p+1)*v&&t>=p*v})).map((function(e,n){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(ge.a,{key:"".concat(e,"_pt-BR"),title:r[e].locales&&r[e].locales["pt-BR"]&&r[e].locales["pt-BR"].name&&r[e].locales["pt-BR"].name,editable:!0,_id:r[e].locales&&r[e].locales["pt-BR"]&&r[e].locales["pt-BR"].id&&r[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(ge.a,{key:"".concat(e,"_en-US"),title:r[e].locales&&r[e].locales["en-US"]&&r[e].locales["en-US"].name&&r[e].locales["en-US"].name,editable:!0,_id:r[e].locales&&r[e].locales["en-US"]&&r[e].locales["en-US"].id&&r[e].locales["en-US"].id,onEdit:function(t,r){j(r,e,"en-US",t)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0}))))}))))))}))),Qn=function(e){Object(bt.a)(r,e);var t=Object(vt.a)(r);function r(e){var n;return Object(ht.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(mt.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 ea=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Xn)((function(e){var t=!!l.a.getState().db.myTasksMenuExpanded;return a.a.createElement("div",{style:t?{width:"calc(100% - 400x)",marginLeft:"388px"}:{width:"calc(100% - 138px)",marginLeft:"138px"}},a.a.createElement(Qn,null))}))),ta=["children","value","index"];function ra(e){var t=e.children,r=e.value,n=e.index,o=Object(ft.a)(e,ta);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(Rn.a,{p:3},t))}function na(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var aa=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=a.a.useState(0),t=Object(m.a)(e,2),r=t[0],n=t[1],o=a.a.useState(""),i=Object(m.a)(o,2),s=i[0],u=i[1];a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),String(e[0])&&n(Math.ceil(e[0]))}),[]);var d=function(e){l.a.getState().functions.socket.emit("global",{fn:e})};return a.a.createElement("div",null,a.a.createElement(Yn.a,{position:"static",color:"default"},a.a.createElement(Hn.a,{value:r,onChange:function(e,t){n(t),c.a.push("#".concat(t))},variant:"scrollable",scrollButtons:"on",indicatorColor:"primary",textColor:"primary","aria-label":""},a.a.createElement(Gn.a,Object.assign({label:"Data",icon:a.a.createElement(re.a,{color:Object(S.d)(0===r?"medium":"color",1)},"Data")},na(0))),a.a.createElement(Gn.a,Object.assign({label:"Languages",icon:a.a.createElement(re.a,{color:Object(S.d)(1===r?"medium":"color",1)},"translate")},na(1))),a.a.createElement(Gn.a,Object.assign({label:"Versions",icon:a.a.createElement(re.a,{color:Object(S.d)(2===r?"medium":"color",1)},"app_registration")},na(2))))),a.a.createElement(ra,{value:r,index:0},a.a.createElement("div",null,a.a.createElement(ea,null))),a.a.createElement(ra,{value:r,index:1},a.a.createElement("div",null,a.a.createElement(Zn,null))),a.a.createElement(ra,{value:r,index:2},a.a.createElement("div",null,a.a.createElement("input",{type:"text",value:s,onChange:function(e){u(e.target.value)}}),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("version")}},Object(S.w)("$__send","*")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("logout")}},Object(S.w)("$__logout","*")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("reload")}},Object(S.w)("$__reload","*")))),a.a.createElement(ra,{value:r,index:3},a.a.createElement("div",null,a.a.createElement(Vn,null))),a.a.createElement(ra,{value:r,index:4},Object(S.w)("$__accounts",1)),a.a.createElement(ra,{value:r,index:5},Object(S.w)("$__users",1)),a.a.createElement(ra,{value:r,index:6},Object(S.w)("$__support",1)),a.a.createElement(ra,{value:r,index:7},Object(S.w)("$__finance",1)))}));var oa=Object(u.b)((function(e){return{loaders:e.sessionLoads.cards.load}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Zt)((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",{id:"loadBar",style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.w)("$__loadingData")),a.a.createElement(ct.a,null)))}))),ia=r(152),ca=r.n(ia),la=r(469),sa=r(310),ua=Object(Y.a)(la.a);var da=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=ua(),r=l.a.getState(),n=r.session,o=r.search,i=r.db,c=[],s=window.location.hash.split("/");s[0]=s[0].replace("#",""),36!==s[0].length&&(s[0]=null);var u=window.location.pathname.split("/"),d="/".concat(u[1]),p=1;if(s[0]){var f=i.cards[s[0]]||{};(p=f&&f._users&&Object.keys(f._users).length>0?f._users[Object.keys(f._users).find((function(e){return e.indexOf(n._id)>-1}))]:0)&&p.access&&(p=p.access)}return s[1]&&Ku.filter((function(e){return e.path===d})).length>0&&Ku.filter((function(e){return e.path===d}))[0].tabs&&Ku.filter((function(e){return e.path===d}))[0].tabs.length>0?(Ku.filter((function(e){return e.path===d}))[0].tabs&&Ku.filter((function(e){return e.path===d}))[0].tabs).forEach((function(e){e.path===s[1]&&(c=e.searchFields)})):Ku.filter((function(e){return e.path===d})).length>0&&Ku.filter((function(e){return e.path===d}))[0].searchFields&&(c=Ku.filter((function(e){return e.path===d}))[0].searchFields),JSON.stringify(sa.a)===JSON.stringify(o)?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",null,a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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(re.a,{size:"18px"},"search"),Object(S.w)("$__appliedFilters"))),a.a.createElement(Sn.a,{xs:12,sm:3,md:3,lg:3,xl:3},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(Ce.a,{reverse:!0,icon:"clear_all",text:Object(S.w)("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),c&&c.indexOf("text")>-1&&o.text&&a.a.createElement(Sn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{className:t.textField,style:{width:"100%"}},Object(S.w)("$__text"),": ",o.text)),c&&c.indexOf("status")>-1&&JSON.stringify(o.cards.status)!==JSON.stringify(sa.a.cards.status)&&a.a.createElement(Sn.a,{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.w)("$__status")),Object.keys(o.cards.status).filter((function(e,t){return o.cards.status[e]&&"all"!==e})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.w)(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"}}))})))),c&&c.indexOf("priority")>-1&&JSON.stringify(o.cards.priority)!==JSON.stringify(sa.a.cards.priority)&&a.a.createElement(Sn.a,{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.w)("$__priority")),Object.keys(o.cards.priority).filter((function(e,t){return o.cards.priority[e]&&"all"!==e})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.w)(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"}}))})))),c&&c.indexOf("users")>-1&&JSON.stringify(o.users)!==JSON.stringify(sa.a.users)&&a.a.createElement(Sn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.w)("$__users"),a.a.createElement(Jr.a,{max:6},Object.keys(l.a.getState().search.users.selected).length>0&&Object.keys(l.a.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&l.a.getState().search.users.selected[e]?a.a.createElement(Kt.a,{title:i.users[e].name,key:t},a.a.createElement(at.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&&l.a.getState().search.users.selected[e]&&a.a.createElement(Kt.a,{title:Object(S.w)("$__unassigned",1),key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:Object(S.w)("$__unassigned",1),src:ca.a},Object(S.w)("$__unassigned",1)))}))))),c&&c.indexOf("units")>-1&&JSON.stringify(o.units)!==JSON.stringify(sa.a.units)&&Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type})).length>0&&c.indexOf("units")>-1&&a.a.createElement(Sn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.w)("$__units"),a.a.createElement(Jr.a,{max:6},Object.keys(l.a.getState().search.units.selected).length>0&&Object.keys(l.a.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&l.a.getState().search.units.selected[e]?a.a.createElement(Kt.a,{title:i.users[e].name,key:t},a.a.createElement(at.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&&l.a.getState().search.units.selected[e]&&a.a.createElement(Kt.a,{title:Object(S.w)("$__unassigned",1),key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:Object(S.w)("$__unassigned",1),src:ca.a},Object(S.w)("$__unassigned",1)))}))))),l.a.getState().search.plans&&l.a.getState().search.plans.selected&&Object.keys(l.a.getState().search.plans.selected).length>0&&Object.keys(i.cards).filter((function(e){return"plan"===i.cards[e].type})).length>0&&c&&c.indexOf("plans")>-1&&a.a.createElement(Sn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.w)("$__plans"),a.a.createElement(Jr.a,{max:6},Object.keys(l.a.getState().search.plans.selected).length>0&&Object.keys(l.a.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&l.a.getState().search.plans.selected[e]?a.a.createElement(Kt.a,{title:i.cards[e].name,key:t},a.a.createElement(at.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&&l.a.getState().search.plans.selected[e]&&a.a.createElement(Kt.a,{title:Object(S.w)("$__unassigned",1),key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:Object(S.w)("$__unassigned",1),src:ca.a},Object(S.w)("$__unassigned",1)))}))))),a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12})))}));function pa(){pa=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var fa=Object(u.b)((function(e){return{cards:e.db.cards,search:e.search,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().search,r=a.a.useState(0),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(21),s=Object(m.a)(c,1)[0],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!1),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useRef(!0);a.a.useEffect((function(){return function(){w.current=!1}}),[]);var _=function(){var t=Object(f.a)(pa().mark((function t(r,n){var a;return pa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w.current){t.next=6;break}return g(!0),t.next=4,Object(Rt.b)(e,{cardLoad:"insights",limit:n,skip:r*n,ignoreLoader:!0});case 4:(a=t.sent)&&w.current&&(g(!1),a.total<n&&x(!0));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();a.a.useEffect((function(){h||y||!w.current||_(o,s)}),[o,s]);var O=window.location.hash.split("/");O[0]=O[0].replace("#","");var j=l.a.getState().db,E=Object.keys(j.cards).filter((function(e){return j.cards[e]&&"insight"===j.cards[e].type&&!j.cards[e].deleted&&Object(ke.a)(e)})).sort((function(e,t){return j.cards[e].created_at>j.cards[t].created_at?-1:j.cards[e].created_at<j.cards[t].created_at?1:0})).map((function(e){return j.cards[e]}));E=E.filter((function(e){return e.description&&e.description.toLowerCase().indexOf(t.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(t.text.toLowerCase())>-1})).map((function(e){return e})),t.tags.length>0&&(E=E.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var r=!1;return t.tags.forEach((function(t){t.value===e.value&&(r=!0)})),r})).length>0})).map((function(e){return e})));var k=function(e){var t=document.getElementById("insightList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&w.current&&i(o+1)};return 0===E.filter((function(t,r){return!e.max||e.max&&r<e.max})).length?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){k()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{justifyContent:"center",textAlign:"center",display:"block",paddingBottom:15}},a.a.createElement("div",{style:{margin:"auto",marginBottom:15,display:"flex",justifyContent:"center"}},a.a.createElement(re.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(S.w)("$__youHaveNoIdeasAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(S.w)("$__visitLinkToHowGetStarted")),a.a.createElement("a",{href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",rel:"noopener noreferrer",style:{fontSize:18,color:"blue",texAlign:"center"}},Object(S.w)("$__getStarted")))))):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){k()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(E).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(Sn.a,{key:E[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:E[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))))})),ha=r(2001),ma=function(){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:{width:"100%",cursor:"auto",textAlign:"right",justifyContent:"space-between",paddingTop:"10px",display:"flex",paddingBottom:"7px"},feedDate:{position:"relative",left:"0px",fontSize:"12px",float:"left"},feedLink:{position:"relative",left:"0px",fontSize:"12px",float:"right",display:"flex"}}};var ga=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ma)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.feed},a.a.createElement(ha.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(ha.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(ha.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(ha.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),a.a.createElement("div",{className:t.linkContent},a.a.createElement(ha.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(ha.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(ha.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(ha.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(ha.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function ba(){ba=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var va=Object(u.b)((function(e,t){return{cards:e.db.cards,search:e.search,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!1),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useRef(!0);a.a.useEffect((function(){return _(c,18),function(){w.current=!1}}),[]),a.a.useEffect((function(){h||y||!w.current||_(c,18)}),[c,18]);var _=function(){var t=Object(f.a)(ba().mark((function t(r,n){var a;return ba().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w.current){t.next=6;break}return g(!0),t.next=4,Object(Rt.b)(e,{cardLoad:"links",limit:n,skip:r*n,ignoreLoader:!0});case 4:(a=t.sent)&&w.current&&(g(!1),a.total<n&&x(!0));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),O=window.location.hash.split("/");O[0]=O[0].replace("#","");var j={};j=(j=Object.keys(r.cards).filter((function(e){return"link"===r.cards[e].type&&r.cards[e]._users&&Object(ke.a)(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&&(j=j.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var E=function(e){var t=document.getElementById("linkList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&w.current&&s(c+1)},k=function(){for(var e=[],t=0;t<18;t++)e.push(a.a.createElement(Sn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(ga,null)));return a.a.createElement(a.a.Fragment,null,e)};return 0===Object.keys(j).filter((function(t,r){return!e.max||e.max&&r<e.max})).length?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){E()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{justifyContent:"center",textAlign:"center",display:"block",paddingBottom:15}},a.a.createElement("div",{style:{margin:"auto",marginBottom:15,display:"flex",justifyContent:"center"}},a.a.createElement(re.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(S.w)("$__youHaveNoRadarAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(S.w)("$__visitLinkToHowGetStarted")),a.a.createElement("a",{href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",rel:"noopener noreferrer",style:{fontSize:18,color:"blue",texAlign:"center"}},Object(S.w)("$__getStarted")))))):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){E()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement("div",null),Object.keys(j).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(Sn.a,{key:j[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:j[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))})),h?a.a.createElement(k,null):a.a.createElement(a.a.Fragment,null)))})),ya=r(553),xa=r.n(ya),wa=r(101),_a=r(902),Oa=r.n(_a),ja=r(903),Ea=r.n(ja),ka=r(121),Sa=r(159),La=r.n(Sa);var Ca=Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ma)((function(e){var t=e.data,r=e.classes,n=a.a.useState(t.img),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState({backgroundSize:"contain"}),u=Object(m.a)(s,2),d=u[0],f=u[1],h=a.a.useRef({});return a.a.useEffect((function(){if(h.current&&e.onResize){var t=new ResizeObserver((function(){var t=h.current.clientHeight;e.onResize(t)}));return t.observe(h.current),function(){return t.disconnect()}}}),[]),a.a.createElement("div",{className:r.feed,ref:h,onClick:e.clickChannel?function(){return e.clickChannel()}:null,style:Object(p.a)(Object(p.a)({},e.clickChannel?{cursor:"pointer"}:{}),{},{position:"relative"})},a.a.createElement("div",{style:{display:"none"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:i,onError:function(){c(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(p.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},i?Object(p.a)({backgroundImage:'url("'.concat(i,'")')},d):{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(re.a,{icon:La.a,size:"39px",color:Object(S.d)("textColor")})),!e.clickChannel&&a.a.createElement("div",{style:{position:"absolute",top:7,right:7}},a.a.createElement(k.a,{title:Object(S.w)("$__sendToRadar","*"),color:Object(S.d)("menu"),icon:"settings_input_antenna",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.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(ka.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.w)("$__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&&Ea()(t.title)?t.title:t.title?Oa()(t.title):""}})),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.contentSnippet&&Ea()(t.contentSnippet)?t.contentSnippet:t.contentSnippet?Oa()(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.w)("$__readMore",1)))))),a.a.createElement("div",{style:{top:-30}},a.a.createElement(dt.a,{options:e._tags})))})));var Ia=Object(le.a)(ma)((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(re.a,{icon:La.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.w)("$__attention")),a.a.createElement("div",{className:r.linkContent},Object(S.w)("$__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 Ta(){Ta=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Da=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ma)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=e.data,i=Object(S.j)(),s=window.location.hash.split("/");if(s[0]=s[0].replace("#",""),!o)return null;var u=function(){var t=Object(f.a)(Ta().mark((function t(a){var i,c;return Ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0: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 l.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel&&(i=o._parent[Object.keys(o._parent)[0]].idRel),Fe.a.put("/rel/update",{_id:i,customTitle:a}),c=l.a.getState().db.feeds,o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return l.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel?c[o._id]=Object(p.a)(Object(p.a)({},c[o._id]),{},{_parent:Object(p.a)(Object(p.a)({},c[o._id]._parent),{},Object(h.a)({},Object.keys(o._parent)[0],Object(p.a)(Object(p.a)({},c[o._id]._parent[Object.keys(o._parent)[0]]),{},{customTitle:a})))}):c[o._id]=Object(p.a)(Object(p.a)({},c[o._id]),{},{_parent:Object(p.a)(Object(p.a)({},c[o._id]._parent),{},Object(h.a)({},s[0],Object(p.a)(Object(p.a)({},c[o._id]._parent[s[0]]),{},{customTitle:a})))}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{feeds:c})),e.onChange&&e.onChange();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var e=Object(f.a)(Ta().mark((function e(t){return Ta().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.w)("$__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(f.a)(Ta().mark((function t(n){var a,i;return Ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=n||s[0],Fe.a.delete("feed/unfollow/".concat(a,"__").concat(o._id)),(i=Object(p.a)({},l.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(p.a)(Object(p.a)({},r),{},{feeds:Object(p.a)({},i)})),e.onChange&&setTimeout((function(){e.onChange()}),400);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=Object(f.a)(Ta().mark((function t(n){var a,i=arguments;return Ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.length>1&&void 0!==i[1]&&i[1],Fe.a.put("feed/visible/",{feedId:o._id,visible:!o||!o.hide}),a=o,a=Object(p.a)(Object(p.a)({},a),{},{hide:!o||!o.hide}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{feeds:Object(p.a)(Object(p.a)({},r.feeds),{},Object(h.a)({},o._id,Object(p.a)(Object(p.a)({},r.feeds[o._id]),a)))}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o._parent&&Object.keys(o._parent).forEach((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(Or.a,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&&i&&i.plan&&(i.planAdmin||i.planModerate)||o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return l.a.getState().db.cards[e]})).length),moreButton:!0},s[0]&&"tab"===s[0]&&i&&i.plan&&(i.planAdmin||i.planModerate)?Object(p.a)({},o._parent&&Object.keys(o._parent).length>0&&{options:[{name:o.hide?Object(S.w)("$__folowRSS"):Object(S.w)("$__hideRSS"),icon:o.hide?"visibility":"visibility_off",onClick:function(){g()}}].concat(Object(A.a)(i&&i.feed&&(i.feedAdmin||i.feedModerate)?[{name:Object(S.w)("$__edit"),icon:"settings_suggest",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"feeds",id:o._id,module:"feedEdit",activeModule:"feedEdit",data:Object(p.a)(Object(p.a)({},o),{},{_lock:!0,_admin:!!e.admin})}))}}]:[]),Object(A.a)(function(){if(e.data._parent){var t=[];return Object.keys(e.data._parent).forEach((function(o){if(l.a.getState().db.cards[o]&&l.a.getState().db.cards[o]._users&&l.a.getState().db.cards[o]._users[n._id]){var i=l.a.getState().db.cards[o];t=[].concat(Object(A.a)(t),[{name:i.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(wa.a,{overlap:"rectangular",icon:i.type&&r&&r.dataType?r.dataType.filter((function(e){return e.name===i.type}))[0].icon:"topic",title:"$__".concat(i.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"}},i.name))),onClick:function(){c.a.push("sp#".concat(o,"/bright-and-connected"))}}])}else 1===Object.keys(e.data._parent).length&&(t=[].concat(Object(A.a)(t),[{name:Object(S.w)("$__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(wa.a,{overlap:"rectangular",icon:"rss_feed",title:Object(S.w)("$__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.w)("$__globalAccount}")),a.a.createElement("div",{style:{width:"16px"}},a.a.createElement(wa.a,{overlap:"rectangular",icon:"delete_forever",title:Object(S.w)("$__delete"),size:"22px",color:"red",onClick:function(){d(o)}})))),onClick:function(){d(o)}}]))})),t}}()))}):i&&i.plan&&(i.planAdmin||i.planModerate)?{options:[{name:Object(S.w)("$__deleteRSS"),icon:"delete_forever",onClick:function(){d()}}]}:{})),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})).filter((function(e,t){return!(!o||0!==t)})).map((function(e){var t=o.feed[e],r=xa.a.MD5(t.link);return a.a.createElement(Ca,{key:r,data:t,_tags:o._tags,clickChannel:function(){c.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})})):a.a.createElement(Ia,{data:o,clickChannel:function(){c.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})))})));function Fa(){Fa=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Na=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.data,r=l.a.getState().db,n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(window.location.hash.split("/")),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState([]),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(!0),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useRef({}),k=a.a.useRef(!0);a.a.useEffect((function(){k.current=!0,E.current={loading:!1};var e=window.location.hash.split("/");return e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(d)&&g(e),j(!0),function(){k.current=!1}}),[]),a.a.useEffect((function(){d.length>0&&k.current&&(L(),d[2]&&36!==d[2].length&&j(!0))}),[d]),a.a.useEffect((function(){k.current&&j(!1)}),[y]);var L=function(){var e=Object(f.a)(Fa().mark((function e(){var t,r;return Fa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i||E.current.loading){e.next=10;break}return E.current={loading:!0},k.current&&j(!0),e.next=5,Pe.a.post("/Feed_Links_V2",{ids:d[2]&&d[2].length?d[2]:null,skip:Object.keys(y).length,limit:21});case 5:t=e.sent,r=Array.from(y),t&&t.data&&(t.data.forEach((function(e){0===r.filter((function(t){return t.link===e.link})).length&&r.push(e)})),k.current&&x(r)),t.data&&0===t.data.length&&k.current&&c(!0),E.current={loading:!1};case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var n=Object(f.a)(Fa().mark((function n(a){var o;return Fa().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:Fe.a.put("/rel/update",{_id:t.idRel,customTitle:a}),(o=r.cards[d[0].replace("#","")]._feeds)[t._id]=Object(p.a)(Object(p.a)({},o[t._id]),{},{customTitle:a}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{cards:Object(p.a)(Object(p.a)({},r.cards),{},Object(h.a)({},d[0].replace("#",""),Object(p.a)(Object(p.a)({},r.cards[d[0].replace("#","")]),{},{_feeds:o})))}));case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),I=function(){var n=Object(f.a)(Fa().mark((function n(a){var o,i;return Fa().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:window.history.back(),o=a.replace("#",""),Fe.a.delete("feed/unfollow/".concat(o,"__").concat(t._id)),delete(i=r.cards[o]._feeds)[t._id],e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{cards:Object(p.a)(Object(p.a)({},r.cards),{},Object(h.a)({},o,Object(p.a)(Object(p.a)({},r.cards[o]),{},{_feeds:i})))}));case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),T=function(){for(var e=[],t=0;t<21;t++)e.push(a.a.createElement(Sn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(ga,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(Ce.a,{icon:"undo",text:Object(S.w)("$__back","*"),onClick:function(){return window.history.back()}}),d[0]&&"bright-and-connected"===d[1]&&d[2]&&a.a.createElement(Ce.a,{icon:"delete_sweep",text:Object(S.w)("$__removeChannel","*"),onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){I(d[0])}})}})),a.a.createElement(ge.a,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return C(e)},editable:!0})),a.a.createElement("div",{style:Object(p.a)(Object(p.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");!O&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&L()}()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},y.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(Sn.a,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Ca,{db:"cards",data:e}))})),!i&&O?a.a.createElement(T,null):a.a.createElement(a.a.Fragment,null))))})),Aa=function(e){return{}};function Pa(){Pa=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var $a=Object(u.b)((function(e){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Aa)((function(e){var t=l.a.getState(),r=t.search,n=t.session,o=a.a.useState(!0),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState({}),d=Object(m.a)(u,2),g=d[0],b=d[1],v=window.location.hash.split("/");v[0]=v[0].replace("#",""),a.a.useEffect((function(){x()}),[e.store.feeds]),a.a.useEffect((function(){y()}),[]);var y=function(){var t=Object(f.a)(Pa().mark((function t(){return Pa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(!0),"hideFeeds"!==v[1]){t.next=8;break}return t.next=4,vn(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 4:t.sent&&x(),t.next=16;break;case 8:if(0!==Object.keys(l.a.getState().db.feeds).filter((function(e){return!l.a.getState().db.feeds[e].hide})).length){t.next=15;break}return t.next=11,vn(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}));case 11:t.sent&&x(),t.next=16;break;case 15:x();case 16:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(){var e={};Object.keys(l.a.getState().db.feeds).length>0&&(e=Object(p.a)(Object(p.a)({},e),l.a.getState().db.feeds));var t={};Object.keys(e).filter((function(t){return e[t]&&e[t].name&&e[t].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||e[t].customTitle&&e[t].customTitle.toLowerCase().indexOf(r.text.toLowerCase())>-1||e[t].customDescription&&e[t].customDescription.toLowerCase().indexOf(r.text.toLowerCase())>-1})).forEach((function(n){(Object.keys(r.plans.selected).length>0&&Object.keys(r.plans.selected).map((function(t){return r.plans.selected[t]&&e[n]._parent[t]})).length>0||0===Object.keys(r.plans.selected).length)&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},n,e[n])))})),b(t),s(!1)};return c?a.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},a.a.createElement(ct.a,null)):v[2]&&36===v[2].length?a.a.createElement("div",null,a.a.createElement(Na,{follow:!0})):a.a.createElement("div",{style:{width:"calc(100% - 20px)",position:"relative",display:"flex"}},a.a.createElement(Rr.a,null,g&&Object.keys(g).length>0&&Object.keys(g).filter((function(t){if(36===v[0].length&&l.a.getState().db.cards[v[0]]&&g[t]._parent&&Object.keys(g[t]._parent).length>0&&g[t]._parent[v[0]])return!0;if("tab"===v[0]){var r=!1;if(g[t].hide&&(r=!0),!e.showHidden&&!r)return!0;if(e.showHidden&&r)return!0}return!1})).sort((function(e,t){var r=g[e].customTitle?g[e].customTitle.toLowerCase().trim():g[e].name.toLowerCase().trim(),a=g[t].customTitle?g[t].customTitle.toLowerCase().trim():g[t].name.toLowerCase().trim();return v[0]&&36!==v[0].length&&(n&&n.account&&g[e]._parent&&g[e]._parent[n.account]&&g[e]._parent[n.account].customTitle&&(r=g[e]._parent[n.account].customTitle.toLowerCase().trim()),n&&n.account&&g[t]._parent&&g[t]._parent[n.account]&&g[t]._parent[n.account].customTitle&&(a=g[t]._parent[n.account].customTitle.toLowerCase().trim())),r<a?-1:r>a?1:0})).map((function(e,t){var r=g[e];return a.a.createElement(Sn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},a.a.createElement(Da,{data:r,follow:!0,onChange:function(){x()}}))}))))})));function Ma(){Ma=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ba=Object(Y.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),za=function(e){var t=l.a.getState(),r=t.session,n=t.functions.socket,o=a.a.useState(e.data),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Ba();a.a.useEffect((function(){s(e.data)}),[e.data]);var d=function(){var t=Object(f.a)(Ma().mark((function t(a,o){var i,l;return Ma().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=c)&&i._reactions&&Object.keys(i._reactions).length>0&&Object.keys(i._reactions).filter((function(e){return e!==a})).forEach((function(e){i._reactions[e][r._id]&&delete i._reactions[e][r._id]})),o&&c&&c._reactions&&c._reactions[a]&&c._reactions[a][r._id]?(delete(l=c)._reactions[a][r._id],s(l)):s(Object(p.a)(Object(p.a)({},c),{},{_reactions:Object(p.a)(Object(p.a)({},c._reactions),{},Object(h.a)({},a,Object(h.a)({},r._id,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.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)}}(),g=function(t){var n=t.react,o=t.color,i=t.primaryIcon,l=t.secondaryIcon;return e.hideDisables&&c&&n&&c._reactions&&(!c._reactions[n]||c._reactions[n]&&0===Object.keys(c._reactions[n]).length)?a.a.createElement(a.a.Fragment,null):a.a.createElement(Ce.a,{icon:c._reactions&&c._reactions[n]&&c._reactions[n][r._id]?i:l||i,iconColor:c._reactions&&c._reactions[n]&&c._reactions[n][r._id]?o||Object(S.d)("menu"):"lightgray",size:"18px",onClick:function(){d(n,!!(c._reactions&&c._reactions[n]&&c._reactions[n][r._id]))},title:c._reactions&&c._reactions[n]&&Object.keys(c._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.w)("$__".concat(n),1)),a.a.createElement("div",{className:u.users},Object.keys(c._reactions[n]).sort((function(e,t){return c._reactions[n][e].reactDate&&String(c._reactions[n][e].reactDate.low)&&c._reactions[n][t].reactDate&&String(c._reactions[n][t].reactDate.low)&&parseInt(c._reactions[n][e].reactDate.low)<parseInt(c._reactions[n][t].reactDate.low)?-1:c._reactions[n][e].reactDate&&String(c._reactions[n][e].reactDate.low)&&c._reactions[n][t].reactDate&&String(c._reactions[n][t].reactDate.low)&&parseInt(c._reactions[n][e].reactDate.low)>parseInt(c._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(at.a,{alt:c._reactions[n][e].name,src:c._reactions[n][e].image||ca.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},c._reactions[n][e].displayName?c._reactions[n][e].displayName:c._reactions[n][e].name,c._reactions[n][e].reactDate&&c._reactions[n][e].reactDate.low&&" (".concat(_()(1e3*c._reactions[n][e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))):Object(S.w)("$__".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)))};var Ya=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ma)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useRef({});return a.a.useEffect((function(){if(c.current&&e.onResize){var t=new ResizeObserver((function(){var t=c.current.clientHeight;e.onResize(t)}));return t.observe(c.current),function(){return t.disconnect()}}return function(){}}),[c]),a.a.useEffect((function(){i(e.data)}),[]),a.a.createElement("div",{ref:c,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",{alt:"MACHEN_IMAGE",src:o.img,style:{width:"100%"},onError:function(){i(Object(p.a)(Object(p.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(za,{data:o},a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(Ce.a,{icon:"settings_input_antenna",title:Object(S.w)("$__sendToRadar",1),iconColor:Object(S.d)("menu"),size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.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 Ra(){Ra=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ga=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ma)((function(e){var t=e.data,r=a.a.useState([]),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState([]),l=Object(m.a)(c,2),s=l[0],u=l[1],d=a.a.useState(!0),g=Object(m.a)(d,2),b=g[0],v=g[1],y=a.a.useRef(!0),x=a.a.useRef({endLinks:!1});a.a.useEffect((function(){return function(){y.current=!1}}),[]);var w=function(){var e=Object(f.a)(Ra().mark((function e(){var t,r,n,a;return Ra().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object.keys(s).length>0?Math.ceil(Object.keys(s).length/7)+1:0,7,x.current.endLinks){e.next=19;break}return v(!0),e.prev=4,e.next=7,Pe.a.post("/Feed_Social_V2",{ids:null,skip:7*t,limit:7});case 7:r=e.sent,n={},a=0,r&&r.data&&r.data.length>0?r.data.forEach((function(e){var t={};e.reactions&&e.reactions.filter((function(e){return e&&e.user&&e.user._id})).length>0&&e.reactions.forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e.react.type,Object(p.a)(Object(p.a)({},t&&t[e.react.type]?t&&t[e.react.type]:{}),{},Object(h.a)({},e.user._id,Object(p.a)(Object(p.a)({},e.user),{},{reactDate:e.react.created_at})))))})),n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.link._id,Object(p.a)(Object(p.a)({},e.link),{},{_reactions:t}))),e.total>a&&(a=e.total)})):r&&r.data&&0===r.data.length&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{endLinks:!0})),u(Object(p.a)(Object(p.a)({},s),n)),v(!1),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(4),console.log(e.t0),v(!1);case 19:return e.abrupt("return",!0);case 20:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(){return e.apply(this,arguments)}}();return a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),i(e),v(!0)}),[]),a.a.useEffect((function(){o.length>0&&y.current&&(w(),o[2]&&36!==o[2].length&&v(!0))}),[o]),a.a.useEffect((function(){y.current&&v(!1)}),[s]),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");!b&&t.scrollHeight-t.scrollTop<2500&&y.current&&w()}()}},a.a.createElement(Rr.a,null,Object.keys(s).sort((function(e,t){return s[e].isoDate&&s[t].isoDate&&s[e].isoDate<s[t].isoDate?1:s[e].isoDate&&s[t].isoDate&&s[e].isoDate>s[t].isoDate?-1:0})).map((function(e){return a.a.createElement(Rr.a,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(Sn.a,{xs:12,sm:10,md:8,lg:6,xl:6},a.a.createElement(Ya,{db:"cards",data:s[e],onClick:function(){window.open(s[e].link,"_blank")}})))}))),b&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(ct.a,null))))})));function Ha(){Ha=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Wa=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.data,r=a.a.useState([]),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState([]),l=Object(m.a)(c,2),s=l[0],u=l[1],d=a.a.useState(!0),h=Object(m.a)(d,2),g=h[0],b=h[1],v=a.a.useRef(!0);a.a.useEffect((function(){return function(){v.current=!1}}),[]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(o)&&i(e),b(!0)}),[]),a.a.useEffect((function(){o.length>0&&v.current&&(y(),o[2]&&36!==o[2].length&&b(!0))}),[o]);var y=function(){var e=Object(f.a)(Ha().mark((function e(t,r){var n,a;return Ha().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v.current&&b(!0),e.prev=2,e.next=5,Pe.a.post("/Feed_Social",{id:o[2]});case 5:n=e.sent,a={},n&&n.data&&n.data.links?(a=Object(p.a)(Object(p.a)({},a),n.data.links),v.current&&u(Object(p.a)(Object(p.a)({},s),a)),v.current&&b(!1)):v.current&&b(!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(Rr.a,null,Object.keys(s).length>0?Object.keys(s).sort((function(e,t){return s[e].isoDate&&s[t].isoDate&&s[e].isoDate<s[t].isoDate?1:s[e].isoDate&&s[t].isoDate&&s[e].isoDate>s[t].isoDate?-1:0})).map((function(e){return a.a.createElement(Rr.a,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(Sn.a,{xs:12,sm:6,md:6,lg:6,xl:6},a.a.createElement(Ya,{db:"cards",data:s[e],onClick:function(){window.open(s[e].link,"_blank")}})))})):a.a.createElement(Rr.a,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(Sn.a,{xs:12,sm:6,md:6,lg:6,xl:6},"A feed solicitado n\xe3o pode ser exibido"))),g&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(ct.a,null))))}));var Ua=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){a.a.useEffect((function(){return console.log("StrategyAndPlans"),function(){}}),[]),window.location.hash.split("/")[0].replace("#","")||c.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(oa,null),t[1]&&"home"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ga,null)),t[1]&&"read"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(da,null),a.a.createElement(Wa,null)),t[1]&&"insight-boards"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(da,null),a.a.createElement(fa,null)),t[1]&&"radar"===t[1]&&a.a.createElement("div",{style:{top:33}},a.a.createElement(va,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&a.a.createElement(a.a.Fragment,null,a.a.createElement(da,null),a.a.createElement($a,null)),t[1]&&"hideFeeds"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(da,null),a.a.createElement($a,{showHidden:!0})),t[1]&&"allNews"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(da,null),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement(Na,null))))})),qa=r(911),Va=r(1189),Ja=r.n(Va),Xa=(r(1749),Object(le.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"}}}))(Kt.a)),Ka=(r(1750),r(1751),r(122));function Za(e){var t=e.options,r=void 0===t?[]:t,n=e.onChange,o=void 0===n?function(){}:n,i=l.a.getState().db;return a.a.createElement(Ka.a,{text:Object(S.w)("$__showActivitiesType"),icon:"collections_bookmark",options:[].concat(Object(A.a)(i.type.filter((function(e){return e.calendar})).map((function(e){return{name:Object(S.w)("".concat(e.label),1),icon:e.icon,iconColor:r.indexOf(e.value)>-1?"lightgray":Object(S.d)("menu"),color:r.indexOf(e.value)>-1?"lightgray":Object(S.d)("menu"),onClick:function(){var t=Array.from(r);-1===t.indexOf(e.value)?t.push(e.value):t.splice(t.indexOf(e.value),1),o(t)}}}))),[{name:r.length===i.type.filter((function(e){return e.calendar})).length?Object(S.w)("$__showAll",1):Object(S.w)("$__hideAll",1),icon:"clear_all",iconColor:r.length!==i.type.filter((function(e){return e.calendar})).length?"lightgray":Object(S.d)("menu"),color:r.length!==i.type.filter((function(e){return e.calendar})).length?"lightgray":Object(S.d)("menu"),onClick:function(){if(r.length===i.type.filter((function(e){return e.calendar})).length)o([]);else{var e=[];i.type.filter((function(e){return e.calendar})).forEach((function(t){e.push(t.value)})),o(e)}}}])})}function Qa(){Qa=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var eo=Ja()(qa.a),to={allDay:Object(S.w)("$__allDay"),previous:"<",next:">",today:Object(S.w)("$__today"),month:Object(S.w)("$__month"),week:Object(S.w)("$__week"),day:Object(S.w)("$__aday"),agenda:Object(S.w)("$__agenda"),date:Object(S.w)("$__date"),time:Object(S.w)("$__hour"),event:Object(S.w)("$__activity"),showMore:function(e){return"+ (".concat(e,") ").concat(Object(S.w)("$__activities"))}};function ro(e){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.w)("$__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.w)("$__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.w)("$__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.w)("$__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.w)("$__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.w)("$__month"))))}var no=Object(u.b)((function(e){return{search:e.search,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.reduxFunction,r=e.search,n=l.a.getState(),o=n.db,i=n.session,c=a.a.useState([]),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState("week"),g=Object(m.a)(h,2),b=g[0],v=g[1],y=a.a.useState(Ge()().toLocaleString()),x=Object(m.a)(y,2),w=x[0],_=x[1],O=a.a.useState(!1),j=Object(m.a)(O,2),E=j[0],k=j[1],L=a.a.useState(!1),C=Object(m.a)(L,2),I=C[0],T=C[1],D=a.a.useState([]),F=Object(m.a)(D,2),N=F[0],P=F[1];Ge.a.locale(i.language?i.language.toLowerCase():"pt-br",{week:{dow:1}});var $=Object(qa.b)(Ge.a);a.a.useEffect((function(){var e=i&&i.calendarPreffers?JSON.parse(i.calendarPreffers):{};e.view&&v(e.view),e.view&&k(e.showAllEvents),e.severalDaysActivities&&T(e.severalDaysActivities),e.disabledTypes&&P(Array.from(e.disabledTypes))}),[]),a.a.useEffect((function(){B()}),[e.cards,r]),a.a.useEffect((function(){B(),M()}),[I,N]);var M=function(){var e=Object(f.a)(Qa().mark((function e(){var t;return Qa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i.calendarPreffers?JSON.parse(i.calendarPreffers):{},t=Object(p.a)(Object(p.a)({},t),{},{disabledTypes:Array.from(N),showAllEvents:E,severalDaysActivities:I,view:b}),l.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)}}(),B=function(){var e=Object(f.a)(Qa().mark((function e(){var t;return Qa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&l.a.getState().db.cards[e]._users&&l.a.getState().db.cards[e]._users[i._id]&&(!l.a.getState().db.cards[e].checklist||l.a.getState().db.cards[e].checklist&&l.a.getState().db.cards[e].showCard)&&Ge()(1e3*l.a.getState().db.cards[e].startDate).isValid()&&Ge()(1e3*l.a.getState().db.cards[e].endDate).isValid()&&(0===N.length||N.length>0&&-1===N.indexOf(l.a.getState().db.cards[e].type))&&"plan"!==l.a.getState().db.cards[e].type&&"chatGroup"!==l.a.getState().db.cards[e].type&&"completed"!==l.a.getState().db.cards[e].status&&!l.a.getState().db.cards[e].deleted&&(I||!I&&Ge()(1e3*l.a.getState().db.cards[e].startDate).format("YYYY-MM-DD")===Ge()(1e3*l.a.getState().db.cards[e].endDate).format("YYYY-MM-DD"))&&(0===r.tags.length||r.tags.length>0&&l.a.getState().db.cards[e]._tags&&l.a.getState().db.cards[e]._tags.length>0&&l.a.getState().db.cards[e]._tags.filter((function(e){var t=!1;return r.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0)&&(""===r.text||""!==r.text&&(l.a.getState().db.cards[e].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||l.a.getState().db.cards[e].description&&l.a.getState().db.cards[e].description.toLowerCase().indexOf(r.text.toLowerCase())>-1))&&r.cards.status[l.a.getState().db.cards[e].status]&&(r.cards.priority.all||l.a.getState().db.cards[e].priority&&r.cards.priority[l.a.getState().db.cards[e].priority])&&(r.cards.risk.all||l.a.getState().db.cards[e].risk&&r.cards.risk[l.a.getState().db.cards[e].risk])&&(r.cards.complexity.all||l.a.getState().db.cards[e].complexity&&r.cards.complexity[l.a.getState().db.cards[e].complexity])&&(r.cards.impact.all||l.a.getState().db.cards[e].impact&&r.cards.impact[l.a.getState().db.cards[e].impact])&&(0===Object.keys(r.users.selected).length||Object.keys(r.users.selected).length>0&&Object.keys(l.a.getState().db.cards[e]._users).filter((function(e){return r.users.selected[e]})).length>0)})).forEach((function(e){var r=!1,n=Ge()(1e3*l.a.getState().db.cards[e].startDate).toDate(),a=Ge()(1e3*l.a.getState().db.cards[e].endDate).toDate(),o=Ge()(1e3*l.a.getState().db.cards[e].endDate).unix("x")-Ge()(1e3*l.a.getState().db.cards[e].startDate).unix("x");("00:00:00"===Ge()(1e3*l.a.getState().db.cards[e].startDate).format("HH:mm:ss")&&"23:59:59"===Ge()(1e3*l.a.getState().db.cards[e].endDate).format("HH:mm:ss")||Math.ceil(o/60/60)>23)&&(r=!0),t.push({title:l.a.getState().db.cards[e].name,allDay:r,startDate:n,endDate:a,_id:e})})),d(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(oa,null),a.a.createElement(Rr.a,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%"}},a.a.createElement(V.a,{text:Object(S.w)("$__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.w)("$__scheduleColor",1),icon:"label",iconColor:"gray",color:"gray",disabled:!0},{name:Object(S.w)("$__late",1),icon:"label",iconColor:"red",disabled:!0}].concat(Object(A.a)(o.status.map((function(e){return{name:Object(S.w)("".concat(e.label),1),icon:"label",iconColor:e.color,disabled:!0}}))),[{name:Object(S.w)("$__scheduleLeftBorderColor",1),icon:"border_left",color:"gray",iconColor:"gray",disabled:!0}],Object(A.a)(o.priority.map((function(e){return{name:Object(S.w)("".concat(e.label),1),icon:"border_left",color:e.color,iconColor:e.color,disabled:!0}}))))}),a.a.createElement(Za,{options:N,onChange:function(e){P(e)}}),a.a.createElement(V.a,{text:Object(S.w)("$__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.w)("$__showAllEvents","*"),icon:E?"check_circle_outline":"radio_button_unchecked",onClick:function(){k((function(e){return!e}))}},{name:Object(S.w)("$__activitiesTInSeveralDays","*"),icon:I?"check_circle_outline":"radio_button_unchecked",onClick:function(){T((function(e){return!e}))}}]})),a.a.createElement(Sn.a,{xs:12,sm:12,md:12},a.a.createElement(Gr.a,null,a.a.createElement(Hr.a,null,a.a.createElement(eo,{selectable:!0,localizer:$,events:u,messages:to,defaultDate:new Date,onSelectSlot:function(e){t("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:"new",module:"cardEdit",activeModule:"cardEdit",data:{type:"task",startDate:Ge()(e.start).unix("x"),endDate:Ge()(e.end).unix("x")}}))},startAccessor:"startDate",endAccessor:"endDate",onView:function(e){v(e)},onSelectEvent:function(e){t("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:e._id,module:"cardEdit",activeModule:"cardEdit",data:l.a.getState().db.cards[e._id]}))},eventPropGetter:function(e,t,r,n){var a=l.a.getState().db.cards[e._id],i=l.a.getState().db.status.filter((function(t){return t.value===l.a.getState().db.cards[e._id].status}))[0].color,c=Ge()(new Date(t)).unix("x"),s=Ge()(new Date(r)).unix("x");Ge()(new Date(r)).unix("x")<Ge()().unix("x")&&(i="#ff0000");var u=(s-c)/60/1440*100;return u>100&&(u=100),{className:"",style:Object(p.a)(Object(p.a)({height:"".concat(u,"%")},"week"===b||"day"===b?{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.m)(i,.3):Object(S.m)(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=l.a.getState().db.cards[t._id],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(Xa,{leaveDelay:800,title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",zIndex:5e3}},a.a.createElement(ut.a,{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(wa.a,{overlap:"rectangular",size:"12px",icon:n,color:"bkack",title:Object(S.w)("$__".concat(r.type))})),t.title))},toolbar:ro,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){w&&Ge()(e).format("YYYY-MM")===Ge()(w).format("YYYY-MM")||_(e),"NEXT"!==r&&"PREV"!==r&&"TODAY"!==r&&"DATE"!==r&&v(r)},view:b,onEventResize:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:t.event._id}}),{startDate:Ge()(t.start).unix("x"),endDate:Ge()(t.end).unix("x")})},onEventDrop:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:t.event._id}}),{startDate:Ge()(t.start).unix("x"),endDate:Ge()(t.end).unix("x")})},showMultiDayTimes:!0,showAllEvents:E,popup:!0,resizable:!0,defaultView:"week"}))),a.a.createElement("div",{style:{height:300,width:"100%"}}))))})),ao=r(2032),oo=r(1190),io={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}};var co=Object(u.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object.keys(r.cards).filter((function(e){var t;return!!(r.cards[e]&&!r.cards[e].deleted&&"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)})).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(Rr.a,{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.w)("$__myChannels"),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Ka.a,{style:{marginRight:7,marginLeft:7},text:Object(S.w)("$__channels"),active:!c,onClick:function(){s(!1)}}),a.a.createElement(Ka.a,{text:Object(S.w)("$__showMyRequests"),active:c,onClick:function(){s(!0)}}))),c?a.a.createElement(Sn.a,{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.w)("$__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.w)("$__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.w)("$__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.w)("$__stepNotStarted"))))),Object.keys(r.cards).filter((function(e){var t,a,o,i;return(null===(t=r.cards[e])||void 0===t||null===(a=t._createdBy)||void 0===a?void 0:a.channel)&&(null===(o=r.cards[e])||void 0===o||null===(i=o._createdBy)||void 0===i?void 0:i._id)===n._id})).sort((function(e,t){return l.a.getState().db.cards[e].created_at>l.a.getState().db.cards[t].created_at?-1:l.a.getState().db.cards[e].created_at<l.a.getState().db.cards[t].created_at?1:0})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:"ch".concat(t,"-").concat(e)},a.a.createElement(oo.a,{db:"cards",data:r.cards[e],noShadow:!0}))}))):a.a.createElement(a.a.Fragment,null),!c&&u.map((function(t){return a.a.createElement(Sn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:t._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:t._id,rows:0}}))}},a.a.createElement("div",{style:{backgroundColor:"#FFFFFF",borderRadius:7,height:152,padding:15,position:"relative",borderBottom:"solid 2px ".concat(Object(S.d)("menu")," ")}},a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),fontWeight:"bold",fontSize:14}},t.shortCutTitle),a.a.createElement(ka.a,{arrow:!0,title:a.a.createElement(a.a.Fragment,null,t.shortCutDescription)},a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),maxWidth:"100%",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",fontSize:12}},t.shortCutDescription)),a.a.createElement("div",{style:{position:"absolute",bottom:15,left:15,right:15,padding:3,color:Object(S.d)("menu"),fontWeight:"bold",fontSize:16,textTransform:"uppercase"}},t.shortCutButtonToAdd)))}))):a.a.createElement(a.a.Fragment,null))}))),lo=r(1191),so=r.n(lo),uo=r(1192),po=r.n(uo);function fo(){fo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ho=Object(u.b)((function(e){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=r.users,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],p=a.a.useState("EndDate"),h=Object(m.a)(p,2),g=h[0],b=h[1],v=a.a.useState(["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal","link","insight"]),y=Object(m.a)(v,2),x=y[0],w=y[1],O=Object(ao.a)(["banner"]),j=Object(m.a)(O,2),E=j[0],L=j[1],C=a.a.useState([]),I=Object(m.a)(C,2),T=I[0],D=I[1];a.a.useEffect((function(){var t=Object.keys(l.a.getState().db.cards).filter((function(t){return l.a.getState().db.cards[t]&&!l.a.getState().db.cards[t].checklist&&!l.a.getState().db.cards[t].deleted&&(!e.hidePrivate||e.hidePrivate&&!l.a.getState().db.cards[t].private)})).map((function(e){return l.a.getState().db.cards[e]}));JSON.stringify(t)!==JSON.stringify(T)&&D(t)}),[e.cards]);var F=function(){var e=Object(f.a)(fo().mark((function e(){var t;return fo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.a.getState().functions.socket,L("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)}}(),A=_()().format("YYYY-MM-DD"),P=window.location.hash.split("/");P[0]=P[0].replace("#","");var $=T.filter((function(e){return 0===x.length||x.length>0&&-1===x.indexOf(e.type)})).filter((function(e){return!!(e&&e._users&&e._users[n._id]&&"completed"!==e.status&&"chatGroup"!==e.type&&"plan"!==e.type&&(e._users[n._id].myDay&&_()(1e3*e._users[n._id].myDay).format("YYYY-MM-DD")!==A||e._users[n._id].isResponsible&&(e.endDate&&_()(1e3*e.endDate).unix("x")<_()().unix("x")||e.startDate&&_()(1e3*e.startDate).unix("x")>_()(new Date(A)).subtract(30,"days").unix("x"))&&(e._users[n._id]&&!e._users[n._id].myDay||e._users[n._id].myDay&&_()(1e3*e._users[n._id].myDay).format("YYYY-MM-DD")!==A)))})).sort((function(e,t){var r=e._users[n._id].myDay||e.endDate||e.startDate||0,a=t._users[n._id].myDay||t.endDate||t.startDate||0;return r>a?-1:r>a?1:0})).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(ut.a,{db:"cards",data:t,noShadow:!0,suggestion:!0}),a.a.createElement(rt.a,{onClick:function(){Object(et.J)(e,{_id:t._id,userId:n._id,option:!0})}},a.a.createElement(re.a,{icon:"add",color:Object(S.d)("menu"),title:Object(S.w)("$__addOnMyDay")})))})),M=T.filter((function(e){return"completed"!==e.status&&e.name&&!e.deleted&&!e.archived&&e._users&&e._users[n._id]&&(!e._users[n._id].myDay||e._users[n._id].myDay&&_()(new Date(1e3*e._users[n._id].myDay)).format("YYYY-MM-DD")!==A)&&(e.endDate&&_()(new Date(1e3*e.endDate)).format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.endDate)).format("YYYY-MM-DD")<=_()(new Date(A)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&_()(new Date(1e3*e.startDate)).format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.startDate)).format("YYYY-MM-DD")<=_()(new Date(A)).add(10,"days").format("YYYY-MM-DD"))})).sort((function(e,t){var r=e.name.toLowerCase().trim(),n=t.name.toLowerCase().trim();return"IniDate"===g&&(r=parseInt(e.startDate),n=parseInt(t.startDate)),"EndDate"===g&&(r=parseInt(e.endDate),n=parseInt(t.endDate)),r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement(ut.a,{db:"cards",key:e._id,data:e,noShadow:!0})})),B=o&&Object.keys(o).length>0?o[Object.keys(o).find((function(e){return n&&n._id&&o[e]&&o[e]._id&&o[e]._id.indexOf(n._id)>-1}))]:{},z=new Date,Y=z.getHours()>=0&&z.getHours()<5?"$__goodNight":z.getHours()>=5&&z.getHours()<12?"$__goodMorning":z.getHours()>=12&&z.getHours()<18?"$__goodAfternoon":"$__goodNight",R=Object.keys(r.cards).filter((function(t){return r.cards[t]&&!r.cards[t].deleted&&!r.cards[t].archived&&"plan"===r.cards[t].type&&r.cards[t]._users&&r.cards[t]._users[n._id]&&"completed"!==r.cards[t].status&&r.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!r.cards[t].private)})),G=Object.keys(r.cards).filter((function(t){return r.cards[t]&&!r.cards[t].deleted&&!r.cards[t].archived&&"plan"!==r.cards[t].type&&r.cards[t]._users&&r.cards[t]._users[n._id]&&"completed"!==r.cards[t].status&&r.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!r.cards[t].private)})),H=G.map((function(e){var t=r.cards[e];return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(ut.a,{db:"cards",data:t,noShadow:!0}))}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Rr.a,null,E.banner||n.hideSupportAndAppBanner?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement(Sn.a,{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.w)(Y,1),", ",B&&B.displayName?B.displayName:B.name?B.name:"","!"),a.a.createElement(Rr.a,{style:{width:"100%"}},a.a.createElement(Sn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:po.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(Sn.a,{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.p)(Object(S.w)("$__supportWelcomeMessage",1))}}),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},a.a.createElement(k.a,{title:Object(S.w)("$__clickToaccessSupportPage","*"),text:Object(S.w)("$__clickToaccessSupportPage"),color:Object(S.d)("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),a.a.createElement(Sn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:so.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(k.a,{title:Object(S.w)("$__hideSupportAndAppBanner","*"),text:Object(S.w)("$__hideSupportAndAppBanner"),color:Object(S.d)("menu"),icon:"close",onClick:function(){F()},size:"12px"})))))),R.length>0?a.a.createElement(Rr.a,{style:{marginTop:"33px",marginBottom:"33px"}},a.a.createElement(Sn.a,{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.w)("$__favoritePlans"),R.length>3?a.a.createElement(k.a,{title:"".concat(Object(S.w)("$__viewAllFavorites","*")," (").concat(R.length,")"),text:"".concat(Object(S.w)("$__viewAllFavorites","*")," (").concat(R.length,")"),color:Object(S.d)("menu"),icon:"favorite",transparent:!0,onClick:function(){c.a.push("sp#tab/home")},size:"25px"}):a.a.createElement(a.a.Fragment,null)),a.a.createElement(Rr.a,{style:{flexDirection:"row",overflowY:"auto",flexWrap:"nowrap",display:"-webkit-inline-box"}},R.sort((function(e,t){var n=r.cards[e].updated_at&&r.cards[e].updated_at.low?r.cards[e].updated_at.low:0,a=r.cards[t].updated_at&&r.cards[t].updated_at.low?r.cards[t].updated_at.low:0;return n>a?-1:n<a?1:0})).filter((function(e,t){return t<6})).map((function(e,t){return a.a.createElement(Sn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:r.cards[e]._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){c.a.push("sp#".concat(r.cards[e]._id,"/dashboard"))}},a.a.createElement(ut.a,{data:r.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(N.a,null,a.a.createElement(co,null)),a.a.createElement(Rr.a,{style:{paddingBottom:33,marginTop:33}},a.a.createElement(Sn.a,{xs:12,sm:12,md:6,lg:G.length>0?4:6,xl:G.length>0?4:6,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_myDay"},a.a.createElement("div",{style:{padding:"0 16px",marginTop:15}},u?a.a.createElement("div",null,a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px",display:"flex",alignItems:"center"}},a.a.createElement(rt.a,{onClick:function(){d(!1)}},a.a.createElement(re.a,{icon:"undo",color:Object(S.d)("menu"),title:Object(S.w)("$__backToMyDay")})),Object(S.w)("$__taskSuggestions")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(Za,{options:x,onChange:function(e){w(e)}}),a.a.createElement("div",{style:{color:Object(S.d)("medium"),fontWeight:"bold",fontSize:"12px"},id:"view_dashboardSuggestionsAddButton"},"Clique no + para adicionar as tarefas ao seu dia.")),a.a.createElement("div",null,$)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(S.w)("$__myDay"),$.length>0&&a.a.createElement("div",{style:{fontSize:"16px",marginTop:"7px",cursor:"pointer",textAlign:"left",padding:"7px",color:"#f50057",display:"flex",alignItems:"center"},onClick:function(){d(!0)},id:"view_dashboard_myDaySuggestionsOptions"},a.a.createElement(re.a,{icon:"info",color:Object(S.d)("medium"),style:{marginRight:"15px"}}),Object(S.w)("$__clickHereToCheckTaskSuggestions"))),a.a.createElement(lr.a,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))),a.a.createElement(Sn.a,{xs:12,sm:12,md:G.length>0?4:6,lg:G.length>0?4:6,xl:G.length>0?4: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",marginTop:15}},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.w)("$__nextTasks")),a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.w)("$__orderBy".concat(g)),color:"lightgray",icon:"IniDate"===g?"today":"EndDate"===g?"event":"text_rotate_vertical",onClick:function(){"IniDate"===g&&b("EndDate"),"EndDate"===g&&b("name"),"name"===g&&b("IniDate")},size:"21px",style:{padding:"0px !important"}}))),a.a.createElement("div",null,M))),G.length>0?a.a.createElement(Sn.a,{xs:12,sm:12,md:4,lg:4,xl:4,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_favoriteCards"},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px",marginTop:15}},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.w)("$__myFavorites"))),a.a.createElement("div",null,H))):a.a.createElement(a.a.Fragment,null)))}))),mo=(r(1117),r(398)),go=r.n(mo);var bo=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(e){var t=l.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(Rr.a,null,t.GlobalData.strategicStatement?a.a.createElement(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(N.a,null,a.a.createElement(ho,null)),a.a.createElement(Rr.a,{style:{paddingBottom:33}},a.a.createElement(Sn.a,{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.w)("$__lastNews","*")),a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),text:Object(S.w)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(Na,{max:6,horizontal:!0})))),a.a.createElement(Sn.a,{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.w)("$__lastAddRadar","*")),a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),text:Object(S.w)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(va,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(Sn.a,{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.w)("$__lastAddInsights","*")),a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),text:Object(S.w)("$__viewAllInsights"),color:"white",icon:go.a,transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(fa,{max:6,horizontal:!0,noPagination:!0}))))))})));var vo=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(e){var t=l.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%"}},a.a.createElement(Rr.a,{style:{paddingBottom:33}},a.a.createElement(Sn.a,{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.w)("$__lastAddInsights","*")),a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),text:Object(S.w)("$__viewAllInsights"),color:"white",icon:go.a,transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(fa,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(Sn.a,{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.w)("$__lastAddRadar","*")),a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),text:Object(S.w)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(va,{max:6,horizontal:!0,noPagination:!0}))))),r?a.a.createElement(Rr.a,null,t.GlobalData.strategicStatement?a.a.createElement(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(Sn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{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(N.a,null,a.a.createElement(ho,null)),a.a.createElement(Rr.a,{style:{paddingBottom:33}},a.a.createElement(Sn.a,{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.w)("$__lastNews","*")),a.a.createElement(k.a,{title:Object(S.w)("$__save","*"),text:Object(S.w)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(Na,{max:6,horizontal:!0}))))))}))),yo=r(749),xo=r.n(yo);var wo=function(e){var t=l.a.getState().session,r=e.data,n=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),o=a.a.useState(null),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]})).map((function(e){return l.a.getState().db.cards[e]})).filter((function(e){return e._users&&!e.checklist&&!e.deleted&&e._users[r._id]&&e._users[r._id].myDay&&(!e.private||e.private&&e._users[t._id])&&_()(new Date(1e3*parseInt(e._users[r._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===n})).sort((function(e,t){return l.a.getState().db.orderByTitle&&"ASC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||l.a.getState().db.orderByTitle&&"DESC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:l.a.getState().db.orderByTitle?0:!l.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(ut.a,{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"}},(r.name,r.name)," (",u.length,")")),!c||r.image&&r.image!==c?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(r.image?r.image:xo.a),onError:function(e){e.target.src="".concat(xo.a)},onLoad:function(e){s("".concat(r.image?r.image:xo.a))},width:"100%",alt:"MACHEN_IMG"}):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(c,'")'),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"}},u)))};function _o(){_o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Oo=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(e){var t=l.a.getState().db.users,r=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=Object(S.j)();if(a.a.useEffect((function(){return i||(l.a.getState().session.cards.adminViewLoader||u(),c(!0)),function(){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminView:!1})}))}}),[e.cards,e.users]),s&&s.plan&&!s.planAdmin&&!s.planModerate)return a.a.createElement(a.a.Fragment,null);var u=function(){var t=Object(f.a)(_o().mark((function t(r){return _o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminView:!l.a.getState().session.cards.adminView})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&l.a.getState().db.cards[e]._users&&Object.keys(l.a.getState().db.cards[e]._users).filter((function(t){return l.a.getState().db.cards[e]._users[t].myDay&&_()(new Date(1e3*parseInt(l.a.getState().db.cards[e]._users[t].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===r})).length>0})).map((function(e){return l.a.getState().db.cards[e]}));console.log("----------------------------------------------",d.length);var h=Object.keys(t).filter((function(e){return!t[e].deleted&&"user"===t[e].type&&(!t[e]._parent||""===t[e]._parent)&&d.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")===r})).length>0})).sort((function(e,r){return t[e].name<t[r].name?-1:t[e].name>t[r].name?1:0})).map((function(e){return t[e]}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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.w)("$__dayTasks",1))),h.map((function(e){return a.a.createElement(Sn.a,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},a.a.createElement(wo,{data:e}))}))))})));var jo=Object(u.b)((function(e,t){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(){var e,t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),"47a4ecb1-5244-4fa5-abdd-83f6eaf3cd36"===(null===(e=l.a.getState().session)||void 0===e?void 0:e.account)?a.a.createElement(N.a,null,a.a.createElement(oa,null),"tab"===t[0]&&"resume"===t[1]&&a.a.createElement(N.a,null,a.a.createElement(vo,null)),"tab"===t[0]&&"dayTasks"===t[1]&&a.a.createElement(N.a,null,a.a.createElement(Oo,null))):a.a.createElement("div",null,a.a.createElement(oa,null),"tab"===t[0]&&"resume"===t[1]&&a.a.createElement(N.a,null,a.a.createElement(bo,null)),"tab"===t[0]&&"dayTasks"===t[1]&&a.a.createElement(N.a,null,a.a.createElement(Oo,null)))}))),Eo=function(){return{contentCenter:{position:"absolute",top:"50%",left:"50%",zIndex:"3",transform:"translate(-50%,-50%)",textAlign:"center",color:Z.I,padding:"0 15px",width:"100%",maxWidth:"880px"},title:Object(p.a)(Object(p.a)({},Z.C),{},{fontSize:"13.7em",color:Z.I,letterSpacing:"14px",fontWeight:"700"}),subTitle:{fontSize:"2.25rem",marginTop:"0",marginBottom:"8px"},description:{fontSize:"1.125rem",marginTop:"0",marginBottom:"8px"}}},ko=Object(Y.a)(Eo);function So(){So=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Lo=Object(u.b)((function(e){return{showPrivate:e.controls.lockPrivate,history:e.db.history,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(null),d=Object(m.a)(u,2),g=d[0],b=d[1],v=a.a.useState(0),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(10),O=Object(m.a)(_,2),j=O[0],E=O[1],L=a.a.useState([]),C=Object(m.a)(L,2),I=C[0],T=C[1],D=a.a.useState(0),F=Object(m.a)(D,2),A=F[0],P=F[1],$=a.a.useState("created_at"),M=Object(m.a)($,2),B=M[0],z=M[1],Y=a.a.useState(!0),R=Object(m.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(""),U=Object(m.a)(W,2),q=U[0],V=U[1],J=a.a.useState(!0),X=Object(m.a)(J,2),K=X[0],Z=X[1],Q=a.a.useState({}),ee=Object(m.a)(Q,2),te=ee[0],ne=ee[1],ae=a.a.useState(""),oe=Object(m.a)(ae,2),ie=oe[0],ce=oe[1],le=window.location.hash.split("/");le[0]=le[0].replace("#","");var se=null;le[0]&&36===le[0].length&&l.a.getState().db.cards[le[0]]&&l.a.getState().db.cards[le[0]]._users&&l.a.getState().db.cards[le[0]]._users[n._id]&&(se=le[0]),a.a.useEffect((function(){return ue({id:se}),fr(),function(){T([]),ne({}),Z(!0)}}),[]),a.a.useEffect((function(){g&&de({id:g})}),[g]),a.a.useEffect((function(){w(0),Z(!0),c||s(!0);var e=setTimeout((function(){I&&de({id:se})}),1e3);return function(){return clearTimeout(e)}}),[q]),a.a.useEffect((function(){de({id:se})}),[x,j,B,G]);var ue=function(){var e=Object(f.a)(So().mark((function e(t,r){var n,a;return So().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fr({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||te,se&&(a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},se,{name:l.a.getState().db.cards[se].name,parent:l.a.getState().db.cards[se]._parent,private:null,type:"plan",_id:se,open:!0}))),n.forEach((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},a[e._id]?a[e._id]:{}),e)))})),ne(a));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),de=function(){var e=Object(f.a)(So().mark((function e(t){var r;return So().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hr({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:j,skip:x*j,asc:!G,orderBy:B||"created_at",search:q});case 2:(r=e.sent)&&(P(r&&r[0]&&r[0].total?parseInt(r[0].total):0),T(r),Z(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pe=[],fe=function(e){var t=B,r=G;B===e?r=!G:t=e,z(t),H(r)},he=function(){var e=Object(f.a)(So().mark((function e(t){var r,n,a,o,i,c,l=arguments;return So().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=te,c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},a,Object(p.a)(Object(p.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(te).filter((function(e){return te[e].parent===a})).length?ue({id:a,type:i},c):ne(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),me=function(t,n){return a.a.createElement("div",{key:n,style:{cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7,color:Object(S.d)("color")},onClick:function(e){(!t.private||t.private&&l.a.getState().controls.lockPrivate)&&(he({id:n},!te[n]||!te[n].open),b(n)),e.preventDefault(),e.stopPropagation()}},a.a.createElement(Or.a,{private:!(!t.private||l.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(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,title:t.name,tooltipText:"".concat(t.private&&!l.a.getState().controls.lockPrivate?Object(S.w)("$__private"):t.name),icon:t.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===t.type}))[0].icon||"$__topic",fontSize:"12px",color:Object(S.d)("color")}),te[n]&&te[n].open?ge(n):a.a.createElement(a.a.Fragment,null))},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(te).filter((function(t){return!e||e&&te[t].parent===e})).length>0?Object.keys(te).filter((function(t){return!e||e&&te[t].parent===e})).sort((function(e,t){return te[e].name.toLowerCase().trim()<te[t].name.toLowerCase().trim()?-1:te[e].name.toLowerCase().trim()>te[t].name.toLowerCase().trim()?1:0})).map((function(e){return me(te[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement(N.a,null,a.a.createElement("div",null,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(_e.a,{label:Object(S.w)("$__search","*"),variant:"standard",autoFocus:!0,value:q,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("color")},"search")),onChange:function(e){V(e.target.value)},onKeyDown:function(e){}}}),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"sideModule_saveButton",title:"created_at"===B&&G?Object(S.w)("$__mostRecent",1):Object(S.w)("$__olderFirst",1),color:"created_at"===B?Object(S.d)("color"):"gray",icon:"calendar_month",onClick:function(){fe("created_at")},size:"25px"}),"created_at"===B&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},G?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(re.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},G?"south":"north"))),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"sideModule_saveButton",title:"name"===B&&G?Object(S.w)("$__nameDesc",1):Object(S.w)("$__nameAsc",1),color:"name"===B?Object(S.d)("color"):"gray",icon:"sort_by_alpha",onClick:function(){fe("name")},size:"25px"}),"name"===B&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},G?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(re.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},G?"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(Or.a,{title:Object(S.w)("$__folders",1),icon:"folder",fontSize:"20px",color:Object(S.d)("menu")}),a.a.createElement(_e.a,{label:Object(S.w)("$__search","*"),variant:"standard",autoFocus:!0,value:ie,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){ce(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(te).filter((function(e){return((!le[0]||le[0]&&36!==le[0].length)&&!te[e].parent||le&&le[0]&&36===le[0].length&&te[e]._id===le[0])&&(""===ie||ie&&te[e].name.toLowerCase().indexOf(ie.toLowerCase().trim())>-1)})).sort((function(e,t){return te[e].name.toLowerCase().trim()<te[t].name.toLowerCase().trim()?-1:te[e].name.toLowerCase().trim()>te[t].name.toLowerCase().trim()?1:0})).map((function(e){return me(te[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(Or.a,{title:Object(S.w)("$__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.w)("$__page")," ",x+1," ",Object(S.w)("$__of")," ",Math.ceil(A/j),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:A,page:x,onPageChange:function(e,t){w(t)},rowsPerPage:j,onRowsPerPageChange:function(e){E(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__filesPerPage")})))),K?a.a.createElement(ct.a,null):I&&I.length>0?I.map((function(t,r){pe.push(t.data);var o=Object(p.a)(Object(p.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(Sr,{data:o,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:pe,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),A>10?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.w)("$__page")," ",x+1," ",Object(S.w)("$__of")," ",Math.ceil(A/j),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:A,page:x,onPageChange:function(e,t){w(t)},rowsPerPage:j,onRowsPerPageChange:function(e){E(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__filesPerPage")}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{style:{clear:"both"}}))))})),Co=r(492),Io=r(904),To=r.n(Io),Do=r(1193),Fo=r.n(Do),No=r(1897),Ao={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:Z.p[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:Z.w[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:Z.i[0]}},underlineSuccess:{"&:after":{borderColor:Z.B[0]}},labelRoot:Object(p.a)(Object(p.a)({},Z.k),{},{color:Z.p[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:Z.i[0]+" !important"},labelRootSuccess:{color:Z.B[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:Z.p[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:Z.I},"&:after":{backgroundColor:Z.I}},input:{color:Z.p[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:Z.p[3]}},whiteInput:{"&,&::placeholder":{color:Z.I,opacity:"1"}}},Po=Object(Y.a)(Ao);function $o(e){var t,r,n,o,i,c=Po(),l=e.formControlProps,s=e.labelText,u=e.id,d=e.labelProps,p=e.inputProps,f=e.error,m=e.white,g=e.inputRootCustomClasses,b=e.success,v=e.helperText,y=x()((t={},Object(h.a)(t," "+c.labelRootError,f),Object(h.a)(t," "+c.labelRootSuccess,b&&!f),t)),w=x()((r={},Object(h.a)(r,c.underlineError,f),Object(h.a)(r,c.underlineSuccess,b&&!f),Object(h.a)(r,c.underline,!0),Object(h.a)(r,c.whiteUnderline,m),r)),_=x()(Object(h.a)({},g,void 0!==g)),O=x()((n={},Object(h.a)(n,c.input,!0),Object(h.a)(n,c.whiteInput,m),n));i=void 0!==l?x()(l.className,c.formControl):c.formControl;var j=x()((o={},Object(h.a)(o,c.labelRootError,f),Object(h.a)(o,c.labelRootSuccess,b&&!f),o));return a.a.createElement(W.a,Object.assign({},l,{className:i}),void 0!==s?a.a.createElement(U.a,Object.assign({className:c.labelRoot+" "+y,htmlFor:u},d),s):null,a.a.createElement(q.a,Object.assign({classes:{input:O,root:_,disabled:c.disabled,underline:w},id:u},p)),void 0!==v?a.a.createElement(No.a,{id:u+"-text",className:j},v):null)}function Mo(){Mo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var Bo="".concat(String("CHEexohmzAHNEotLM0O.WzoOsvjRwlKh/sKKI2AFWaeL7zo4hC")),zo=Object(Y.a)(Pn);var Yo=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({email:null,password:null}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(null),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(!1),_=Object(m.a)(w,2),O=_[0],j=_[1],E=zo(),k=function(){var t=Object(f.a)(Mo().mark((function t(){var r,a,o,i;return Mo().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.w)("$__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.w)("$__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.w)("$__alertLoginEmptyPassword",1))}),t.next=33;break;case 12:return j(!0),t.next=15,To.a.hash(String(n.password),10);case 15:return r=t.sent,t.next=18,To.a.hash(String(n.password),10);case 18:if(a=t.sent,o=Object(Co.encode)("".concat(a,"//").concat(Bo)),!(r&&a&&o)){t.next=32;break}return t.prev=21,t.next=24,Pe.a.post("/Login",Object(Co.encode)(Object(Co.encode)(JSON.stringify({lp:o,login:n.email,password:Object(Co.encode)("".concat(r,"///").concat(Object(Co.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.w)("$__".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.w)("$__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(f.a)(Mo().mark((function t(){var r;return Mo().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.w)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,Pe.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.w)("$__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(f.a)(Mo().mark((function t(r){var n;return Mo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:Object(S.w)("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,Pe.a.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:Object(S.w)("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:Object(S.w)("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:Object(S.w)("$__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(Rr.a,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(Sn.a,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement(Gr.a,{db:"cards",login:!0},a.a.createElement(Wr.a,{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.w)("$__login"))),a.a.createElement(Hr.a,null,h?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__token",1)),a.a.createElement(_e.a,{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(je.a,{position:"end"},a.a.createElement(P.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):a.a.createElement(a.a.Fragment,null,a.a.createElement($o,{labelText:Object(S.w)("$__email"),id:"email",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{email:e.target.value}))},onLoad:function(e){o(Object(p.a)(Object(p.a)({},n),{},{email:e.target.value}))},endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(Fo.a,{className:E.inputAdornmentIcon}))}}),a.a.createElement($o,{labelText:Object(S.w)("$__password"),id:"password",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{password:e.target.value}))},onLoad:function(e){o(Object(p.a)(Object(p.a)({},n),{},{password:e.target.value}))},onKeyDown:function(e){13===e.keyCode&&k()},endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(P.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),a.a.createElement(Ce.a,{icon:"lock",text:Object(S.w)("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){C(n.email)}}))),a.a.createElement(An,{className:E.justifyContentCenter},h?a.a.createElement(Tn,{style:{backgroundColor:O?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return L()}},Object(S.w)("$__validateTokenAndSigin"),O?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(ct.a,null)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(Tn,{style:{backgroundColor:O?"gray":Object(S.d)("menu"),color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return k()}},Object(S.w)("$__sigin"),O?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(ct.a,null)):a.a.createElement(a.a.Fragment,null)))))))})),Ro=Object(Y.a)(Eo);var Go=Object(Y.a)(Eo);var Ho,Wo=r(240),Uo=r(231),qo={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(p.a)(Object(p.a)({},Z.k),{},{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 Vo,Jo=j.b.div(Ho||(Ho=Object(d.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                ")})),Xo=Object(u.b)((function(e){return{searchs:e.searchs,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(T.b)(I,e)}))(Object(le.a)(qo)(Object(n.memo)((function(e){var t=l.a.getState().session,r=a.a.useState({allSelected:!1,show:!1,selectedCards:[]}),o=Object(m.a)(r,2),i=(o[0],o[1],v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),c=e.searchs&&e.searchs[i]?e.searchs[i]:null,s=a.a.createRef(),u=Object(n.useRef)({}),d=Object(n.useRef)({}),f=Object(n.useRef)({}),g=a.a.useRef(!0);a.a.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]),a.a.useEffect((function(){e.groupByColor||(f.current={})}),[e.groupByColor,e.cards]);var b=window.location.hash.split("/");b[0]=b[0].replace("#",""),36!==b[0].length&&(b[0]=null);var y=function e(t){var r,n,a,o=(null===(r=l.a.getState().db.cards[t])||void 0===r||null===(n=r.name)||void 0===n||null===(a=n.trim())||void 0===a?void 0:a.toLowerCase())||"";return l.a.getState().db.cards[t]&&"plan"!==l.a.getState().db.cards[t].type&&l.a.getState().db.cards[t]._parent&&(o="".concat(e(l.a.getState().db.cards[t]._parent),"-").concat(o)),o},x=e.cards.map((function(e){return l.a.getState().db.cards[e]}));c&&(x=Object(et.q)(x,c)),e.showDeleted||l.a.getState().controls.deleted||(x=x.filter((function(e){return!e.deleted})).map((function(e){return e}))),x=x.sort((function(t,r){return function(t,r){var n,a,o,i,c,l,s=(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,u=(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;"name"===e.agileOrderBy&&(s=t.name&&t.name.trim()?"".concat(null===(o=t.name)||void 0===o||null===(i=o.trim())||void 0===i?void 0:i.toLowerCase()):"",u=r.name&&r.name.trim()?"".concat(null===(c=r.name)||void 0===c||null===(l=c.trim())||void 0===l?void 0:l.toLowerCase()):"");if("startDate"===e.agileOrderBy&&(s=t.startDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(t.startDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(t.name),u=r.startDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(r.startDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(r.name)),"endDate"===e.agileOrderBy&&(s=t.endDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(t.endDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(t.name),u=r.endDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(r.endDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(r.name)),b.indexOf("overview")>-1&&(s="".concat(y(t._parent),"-").concat(s),u="".concat(y(r._parent),"-").concat(u)),"DESC"===e.agileOrderDesc){if(s<u)return-1;if(s>u)return 1}if("ASC"===e.agileOrderDesc){if(s>u)return-1;if(s<u)return 1}return 0}(t,r)})).map((function(e){return e}));var w=Object(S.w)(e.column.name,1),_=null,O={};l.a.getState().db.cards[b[0]]&&l.a.getState().db.cards[b[0]].customColumns&&(O=JSON.parse(l.a.getState().db.cards[b[0]].customColumns)),O&&O[e.column.name.replace("$__","")]&&O[e.column.name.replace("$__","")].name&&(w=Object(S.w)(O[e.column.name.replace("$__","")].name,1)),O&&O[e.column.name.replace("$__","")]&&O[e.column.name.replace("$__","")].icon&&(_=Object(S.w)(O[e.column.name.replace("$__","")].icon,1));var j=[];function E(t){var r=t.index,n=t.style,o=x[r],i="",c="";if(e.groupByColor&&b.indexOf("overview")>-1){var s=Object(et.r)(o);-1===j.indexOf(s.parentId)&&l.a.getState().db.cards[s.parentId]&&"plan"!==l.a.getState().db.cards[s.parentId].type&&(i=l.a.getState().db.cards[s.parentId].name,c=s.color,j.push(s.parentId),f.current=Object(p.a)(Object(p.a)({},f.current),{},Object(h.a)({},o._id,{title:l.a.getState().db.cards[s.parentId].name,color:s.color||"#FFFFFF"})))}return a.a.createElement(a.a.Fragment,null,a.a.createElement(ar.b,{draggableId:o._id,index:r,key:o._id,isDragDisable:e.isDragDisable||!1},(function(t,l){var s;return a.a.createElement("div",{style:Object(p.a)({},n)},e.groupByColor&&f.current[o._id]&&b.indexOf("overview")>-1?a.a.createElement("div",{style:{width:"100%",padding:3,color:"gray",marginTop:17,borderBottom:"solid 3px ".concat((null===(s=f.current[o._id])||void 0===s?void 0:s.color)||"")}},f.current[o._id].title):a.a.createElement(a.a.Fragment,null),a.a.createElement(k,{separator:e.groupByColor&&b.indexOf("overview")>-1&&i?{title:i,color:c}:null,provided:t,isDragging:null===l||void 0===l?void 0:l.isDragging,index:r,snapshot:l,clone:"CL"}))})))}function k(t){var r,n=t.provided,o=t.index,i=t.snapshot,c=(t.clone,x[o]);return a.a.createElement("div",Object.assign({},n.draggableProps,n.dragHandleProps,{ref:n.innerRef}),a.a.createElement(ut.a,{cardId:c._id,separator:e.groupByColor&&b.indexOf("overview")>-1&&(null===f||void 0===f||null===(r=f.current[c._id])||void 0===r?void 0:r.title)?null===f||void 0===f?void 0:f.current[c._id]:null,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,showSelectBox:null===e||void 0===e?void 0:e.showCheck,selectedCard:(null===e||void 0===e?void 0:e.selectedCards)&&e.selectedCards.includes(c._id),locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:i.isDragging&&!i.isDropAnimating,snapshot:i,cardColorPicker:!!e.cardColorPicker,manualExpanded:(null===d||void 0===d?void 0:d.current[c._id])||!1,onSelect:function(t){e.setSelectedCards(t)},onResize:function(e){!function(e,t){var r;u.current=Object(p.a)(Object(p.a)({},u.current),{},Object(h.a)({},e,t)),(null===s||void 0===s||null===(r=s.current)||void 0===r?void 0:r.resetAfterIndex)&&s.current.resetAfterIndex(0)}(c._id,e)},onExpand:function(e){g.current&&(!d.current[c._id]&&e||"false"===String(e)&&d.current[c._id])&&function(e,t){var r;(null===s||void 0===s||null===(r=s.current)||void 0===r?void 0:r.resetAfterIndex)&&s.current.resetAfterIndex(0);d.current=Object(p.a)(Object(p.a)({},d.current),{},Object(h.a)({},e,t))}(c._id,e)}}))}function L(e){var t=x[e];return u.current[t._id]+7||67}return a.a.createElement(ar.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){return a.a.createElement(Jo,Object.assign({},!e.isDropDisabled&&r.draggableProps,e,{ref:r.innerRef}),a.a.createElement("div",Object.assign({},r.draggableProps,r.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&r.dragHandleProps,a.a.createElement(ge.a,Object.assign({title:w,icon:_||e.column.icon||"topic",color:Object(S.d)("menu"),style:{padding:"7px"}},b.length>0&&b[1]&&"overview"===b[1]&&l.a.getState().db.cards[b[0]]&&l.a.getState().db.cards[b[0]].planType&&"flow"===l.a.getState().db.cards[b[0]].planType&&l.a.getState().db.cards[b[0]]._users&&l.a.getState().db.cards[b[0]]._users[t._id]&&l.a.getState().db.cards[b[0]]._users[t._id].access&&parseInt(l.a.getState().db.cards[b[0]]._users[t._id].access)>3?{permitIcon:!0,editable:!0,onEdit:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:b[0]}}),{customColumns:JSON.stringify(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[b[0]]&&l.a.getState().db.cards[b[0]].customColumns?JSON.parse(l.a.getState().db.cards[b[0]].customColumns):{}),{},Object(h.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(S.w)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(S.d)("color"),onClick:function(){return console.log("s")},show:"hover"}]})),a.a.createElement("div",{style:{position:"absolute",display:"flex",right:0,top:15,fontWeight:"bold"}},e.columnId&&"completed"===e.columnId?x.sort((function(e,t){var r=e.completed_at&&String(e.completed_at.low)?String(e.completed_at.low):e.completed_at,n=t.completed_at&&String(t.completed_at.low)?String(t.completed_at.low):t.completed_at;return r&&n&&r>n?-1:r&&n&&r<n?1:0})).length:x.length)),a.a.createElement(ar.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(k,{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%",overflowX:"hidden",height:e.inLineAdd?"calc(100% - 60px)":"calc(100% - 10px)"}},a.a.createElement(Uo.a,{style:{width:"100%",height:"100%",overflowX:"hidden"}},(function(r){var n=r.height,o=r.width;return a.a.createElement(Wo.b,{className:"List",height:n,width:o,ref:s,itemCount:x.length,itemSize:L,outerRef:t.innerRef,itemData:e.columnId&&"completed"===e.columnId?x.sort((function(e,t){var r=e.completed_at&&String(e.completed_at.low)?String(e.completed_at.low):e.completed_at,n=t.completed_at&&String(t.completed_at.low)?String(t.completed_at.low):t.completed_at;return r&&n&&r>n?-1:r&&n&&r<n?1:0})):x,style:{height:"100%",overflowX:"hidden"}},E)})))})),a.a.createElement("div",{id:"Agilev2_Column_552",style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ce.a,{text:Object(S.w)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){var t=l.a.getState().db.dataType,r=e.typeAdd||e.columnId;0===t.filter((function(e){return e.name.indexOf(r)>-1})).length&&(r="task"),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:b[0]?b[0]:null,rows:x.length,initialData:Object(p.a)({type:r},e.addInitialData||{})}}))}})))}))}))));function Ko(){Ko=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Zo=j.b.div(Vo||(Vo=Object(d.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                ")})),Qo=Object(u.b)((function(e){return{dbcards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(f.a)(Ko().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,v;return Ko().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l.a.getState().functions.socket,o=n.destination,i=n.source,c=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,d=o.droppableId,f=Array.from(e.cards.filter((function(e){return l.a.getState().db.cards[e].status===u})).sort((function(e,t){var r=l.a.getState().db.cards[e],n=l.a.getState().db.cards[t];return r.order&&n.order&&String(r.order.low)&&String(n.order.low)&&parseInt(r.order.low)<parseInt(n.order.low)?-1:1})).map((function(e){return e}))),u!==d||l.a.getState().db.orderByTitle){r.next=21;break}return(m=Array.from(e.cards.filter((function(e){return l.a.getState().db.cards[e].status===u})).sort((function(e,t){var r=l.a.getState().db.cards[e],n=l.a.getState().db.cards[t];return r.order&&n.order&&String(r.order.low)&&String(n.order.low)&&parseInt(r.order.low)<parseInt(n.order.low)?-1:1})).map((function(e){return e._id})))).splice(i.index,1),m.splice(o.index,0,c),m.forEach((function(e,t){s[e]=Object(p.a)(Object(p.a)({},s[e]),{},{order:{low:t}})})),g=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:f.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return l.a.getState().db.cards[e].status===d})).sort((function(e,t){var r=l.a.getState().db.cards[e],n=l.a.getState().db.cards[t];return r.order&&n.order&&String(r.order.low)&&String(n.order.low)&&parseInt(r.order.low)<parseInt(n.order.low)?-1:1})).map((function(e){return e._id})))).splice(o.index,0,c),f.forEach((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),b.forEach((function(e,r){var n,a,o;(null===(n=t.cards[e])||void 0===n?void 0:n.order)&&(null===(a=t.cards[e])||void 0===a||null===(o=a.order)||void 0===o||o.low),t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),v=Object(p.a)(Object(p.a)({},t),{},{cards:Object(p.a)(Object(p.a)({},t.cards),{},Object(h.a)({},c,Object(p.a)(Object(p.a)({},t.cards[c]),{},{status:d,completed_at:"completed"===d?{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(p.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:f});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(f.a)(Ko().mark((function e(t){return Ko().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(f.a)(Ko().mark((function e(t){return Ko().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(ar.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(Zo,Object.assign({},e,{ref:t.innerRef}),l.a.getState().db.status.map((function(t,r){var n,o={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(Xo,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),isDropDisabled:!0,column:o,cards:null===e||void 0===e||null===(n=e.cards)||void 0===n?void 0:n.filter((function(e){return l.a.getState().db.cards[e].status===t.value||"notStarted"===t.value&&!l.a.getState().db.cards[e].status})).map((function(e){return e})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(p.a)({flex:r,width:"25%"},e.columnStyle?e.columnStyle:{}),viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter),addInitialData:{status:t.value}}))})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))})),ei=r(179);var ti=Object(u.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(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=r.dataType,i=a.a.useState([]),s=Object(m.a)(i,2),u=s[0],d=s[1],f=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),h=window.location.hash.split("/");h[0]=h[0].replace("#","");var g=e.nodeId?e.nodeId:v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();if(window.location.hash.split("/")[0].replace("#","")||c.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&&o.filter((function(r){return r.name===e.cards[t].type&&"swot"!==r.module&&"step"!==r.module})).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=l.a.getState().session.cards.adminView?b.filter((function(e){return!(e.private&&!(e.private&&e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0))})):b.filter((function(e){return e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0&&(e._createdBy&&!e._createdBy.channel||e._createdBy&&e._createdBy.channel&&e._createdBy._id===n._id)})),"tab"===h[0]&&"myDay"!==h[1]&&u&&u.length>0&&(b=b.filter((function(e){return-1===u.indexOf(e.type)}))),"tab"===h[0]&&"unreaded"===h[1]&&(b=b.filter((function(e){return Object(et.j)(e._id).total>0}))),"tab"===h[0]&&"myTasks"===h[1]&&(b=b.filter((function(e){return e._users&&e._users[n._id]&&(e._users[n._id].isResponsible||!e._users[n._id].isResponsible&&1===Object.keys(e._users).length)})).map((function(e){return e}))),"tab"===h[0]&&"myDay"===h[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")===f})).map((function(e){return e}))),"tab"===h[0]&&"ourDay"===h[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")===f})).length>0})).map((function(e){return e}))),"tab"===h[0]&&"private"===h[1]&&(b=b.filter((function(e){return e.private})).map((function(e){return e}))),"tab"===h[0]&&"nextTasks"===h[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(f)).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(f)).add(10,"days").format("YYYY-MM-DD")})).map((function(e){return e}))),"tab"===h[0]&&"lateTasks"===h[1]&&(b=b.filter((function(e){return e.endDate&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(f)).tz("America/Sao_Paulo").format()&&"completed"!==e.status})).map((function(e){return e}))),"tab"===h[0]&&"unlinkedCards"===h[1]&&(b=b.filter((function(e){return!e.parent&&!e._parent})).map((function(e){return e}))),a.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"tab"===h[0]&&"myDay"!==h[1]?a.a.createElement(Za,{options:u,onChange:function(e){d(e)}}):a.a.createElement(a.a.Fragment,null),a.a.createElement(ei.a,{fields:["text","date","users","responsible","tags","tagsByText","priority","complexity","risk","impact"],showFilters:!0,nodeId:g,style:{marginLeft:7},onChange:function(e){console.log(e)}})),a.a.createElement(ge.a,{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(p.a)(Object(p.a)({},l.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(p.a)(Object(p.a)({},l.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(p.a)(Object(p.a)({},l.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(p.a)(Object(p.a)({},l.a.getState().controls),{},{agileOrderDesc:"DESC"===e.agileOrderDesc?"ASC":"DESC"}))}}]})),a.a.createElement("div",null,a.a.createElement(oa,null)),a.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},a.a.createElement(Qo,{cards:b.map((function(e){return e._id})),inLine:r.viewList,showConnectedIn:!0,columnStyle:Object(p.a)({},r.viewList?{width:"100%"}:{maxHeight:"calc(100vh - 190px)",width:"25%"})}),a.a.createElement("div",{style:{clear:"both"}})))}));var ri=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Xn)((function(e){return a.a.createElement("div",{style:{width:"100%"}},"Resume")}))),ni=r(246),ai=r.n(ni);var oi=function(e){var t=ai.a.ExcelFile,r=ai.a.ExcelFile.ExcelSheet,n=ai.a.ExcelFile.ExcelColumn,o=e.data,i=[],c=[];return o.forEach((function(e){e.users.filter((function(e){return!e.deleted})).sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()})).forEach((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()})).forEach((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.w)("$__companies"),"_").concat(Object(S.w)("$__users")),element:a.a.createElement(k.a,{title:Object(S.w)("$__export"),text:Object(S.w)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:o.sort((function(e,t){return e.name<t.name})),name:Object(S.w)("$__accounts")},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__company",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__signaturePlan",1)),value:"plan"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__activeUsersCount",1)),value:"usersCount"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__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.w)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__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.w)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__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.w)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__removed",1)),value:"deleted"}))})))};function ii(){ii=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ci=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Xn)((function(e){var t=a.a.useState([]),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState([]),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(null),h=Object(m.a)(d,2),g=h[0],b=h[1],v=a.a.useState("name"),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(!0),O=Object(m.a)(_,2),j=O[0],E=O[1],L=l.a.getState().db.plans;a.a.useEffect((function(){C()}),[]);var C=function(){var e=Object(f.a)(ii().mark((function e(){var t,r;return ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("Adm_ReqAccounts");case 2:t=e.sent,r=[],t&&(t.data.forEach((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})).forEach((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=Ge()(1e3*e.created_at).format("DD/MM/YYYY HH:mm:ss"),e.lastSession=e.lastSession?Ge()(1e3*e.lastSession).format("DD/MM/YYYY HH:mm:ss"):""})),r.push(Object(p.a)(Object(p.a)({id:e.id},e.account),{},{created_at:Ge()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.w)(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(p.a)(Object(p.a)({id:e.id},e.account),{},{created_at:Ge()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.w)(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?E((function(e){return!e})):w(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(p.a)(Object(p.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)))},D=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})).forEach((function(e){i+=parseInt(e.filesSize)})),i>0&&(i=Object(S.i)(i)),a.a.createElement("div",{style:Object(p.a)({position:"relative",width:"100%",padding:7,marginBottom:3},t.account.deleted?Object(p.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(p.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.w)("".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(k.a,{transparent:!0,title:Object(S.w)("$__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.w)("$__users"),a.a.createElement(k.a,{transparent:!0,title:Object(S.w)("$__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.w)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("name")}},Object(S.w)("$__name")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"},onClick:function(){I("email")}},Object(S.w)("$__email")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("createdAt")}},Object(S.w)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("lastSession")}},Object(S.w)("$__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(oi,{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.w)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},Object(S.w)("$__company")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.w)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.w)("$__plan")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.w)("$__users")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.w)("$__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(D,{index:t,data:e,key:e.account._id})}))))})));function li(){li=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var si=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Xn)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=l.a.getState().functions.socket,s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],p=u[1],h=a.a.useState(0),g=Object(m.a)(h,2),b=g[0],v=g[1],y=a.a.useState(25),x=Object(m.a)(y,2),w=x[0],_=x[1],O=a.a.useState(""),j=Object(m.a)(O,2),E=j[0],k=j[1];a.a.useEffect((function(){i(l.a.getState().languages)}),[JSON.stringify(l.a.getState().languages)]);var L=function(){var e=Object(f.a)(li().mark((function e(t,r,n,a){return li().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?c.emit("language.UPD",{alias:r,locale:n,text:a}):c.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.w)("$__page")," ",b+1," ",Object(S.w)("$__of")," ",Math.ceil(Object.keys(o).length/w),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:Object.keys(o).length,page:b,onChangePage:function(e,t){v(t)},rowsPerPage:w,onChangeRowsPerPage:function(e){_(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__aliasPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(_e.a,{label:Object(S.w)("$__search",1),variant:Object(S.d)("fieldVariant"),value:E,onChange:function(e){k(e.target.value)}}),a.a.createElement(Ce.a,{text:d?Object(S.w)("$__all","*"):Object(S.w)("$__onlyEmpty","*"),icon:d?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){p(!d)}})),a.a.createElement(Ct.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.w)("$__alias",1)),a.a.createElement("div",{className:t.column},Object(S.w)("$__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){return!(!(!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)})).sort((function(e,t){return e<t?-1:e>t?1:0})).filter((function(e,t){return t<=(b+1)*w&&t>=b*w})).map((function(e,r){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(ge.a,{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(ge.a,{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(ge.a,{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 ui=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(io)((function(){var e=l.a.getState().session,t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(null),s=Object(m.a)(c,2),u=s[0],d=s[1];return e._access.master?(window.location.hash.split("/")[0].replace("#",""),a.a.createElement("div",null,!t[0]&&a.a.createElement(ri,null),"tab"===t[0]&&"accounts"===t[1]&&a.a.createElement(ci,null),"tab"===t[0]&&"languages"===t[1]&&a.a.createElement(si,null),"tab"===t[0]&&"tests"===t[1]&&a.a.createElement("div",{style:{width:"300px"}},a.a.createElement(He.a,{type:"datetime",onChangeStartDate:function(e){console.log(_()(e).format("YYYY-MM-DD 23:59:59").unix("X")),i(_()(e).unix("X"))},onChangeEndDate:function(e){d(_()(e).unix("X"))},range:!0,startDate:o?new Date(1e3*o):null,endDate:u?new Date(1e3*u):null,onClear:function(){i(null),d(null)}})))):a.a.createElement("div",null,"ACCESS DENIED")}))),di=r(732),pi=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:Z.I,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:Z.I,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(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.b)+", 0.4)"},info:{backgroundColor:Z.s[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.s[0])+", 0.4)"},success:{backgroundColor:Z.B[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.B[0])+", 0.4)"},danger:{backgroundColor:Z.i[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.i[0])+", 0.4)"},warning:{backgroundColor:Z.H[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.H[0])+", 0.4)"},primary:{backgroundColor:Z.w[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.w[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(Z.q)(Z.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(Z.q)(Z.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(Z.q)(Z.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(Z.q)(Z.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 fi(){fi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var hi=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(pi)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.session,i=r.functions,c=r.timeline,s=i.socket,u=a.a.useState(e.stories||{}),d=Object(m.a)(u,2),g=d[0],b=d[1],v=[];a.a.useEffect((function(){y()}),[e.stories,e.nodeId,JSON.stringify(c)]);var y=function(){var t={};c[o._id]&&Object.keys(c[o._id]).filter((function(t){return c[o._id][t]&&c[o._id][t].user&&c[o._id][t].user._id&&c[o._id][t].user._id===e.nodeId})).forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e,c[o._id][e]))})),c[e.nodeId]&&Object.keys(c[e.nodeId]).forEach((function(r){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},r,c[e.nodeId][r]))})),b(t)},x=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:v,file:t})},w=function(){var t=Object(f.a)(fi().mark((function t(){return fi().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})).forEach((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).forEach((function(e,t){var r=i.files[e];v.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(_r.a,{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).forEach((function(e,t){var r=i.files[e];v.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(_r.a,{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(di.a,{nodeId:e.nodeId,onSending:function(){w()}}))})));function mi(){mi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var gi=Object(Y.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 bi=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.chat,o=t.timeline,i=e.data,c=gi(),s="cards";i.nodeId&&l.a.getState().db.users[i.nodeId]&&(s="users");var u=function(){var t=Object(f.a)(mi().mark((function t(r,a){return mi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.a.getState().db[a][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0,db:a,nodeId:r,loading:!1})):(Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Notifications/Index/openChat()"}),{id:[r],db:a}),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0,db:a,nodeId:r,loading:!0}))),e.openChat(r,a);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if("timeline"===i.module&&(!i.inNode||!i.inNode.type||!l.a.getState().db||!l.a.getState().db[s]))return a.a.createElement(a.a.Fragment,null);if(!i.byUser||i.byUser&&!r.users[i.byUser]||i.inNode&&i.inNode.type&&i.inNode._id&&!l.a.getState().db[s][i.inNode._id])return a.a.createElement(a.a.Fragment,null);var d=function(){var e="";return e=_()().tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*i.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Object(S.w)("$__today",1)," ").concat(_()(1e3*i.created_at).tz("America/Sao_Paulo").format("HH:MM")):_()().tz("America/Sao_Paulo").format("YYYY")===_()(1e3*i.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*i.created_at).tz("America/Sao_Paulo").format("DD/MM HH:MM")):"".concat(_()(1e3*i.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(Er,{alt:r.users[i.byUser].name,src:r.users[i.byUser].image||null,size:"sm"},r.users[i.byUser].name.substr(0,1)),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.w)(i.description)," - ",e,i.readed&&a.a.createElement(re.a,{icon:"done_all",color:Object(S.d)("medium"),title:"$__readed"}))))};return a.a.createElement("div",{className:i.readed?c.Readed:c.unReaded},a.a.createElement("div",{style:{textAlign:"center",width:"100%",padding:"7px",maxWidth:"100%"}}),"timeline"===i.module&&!e.showTimeline&&i.inNode&&i.inNode.type&&i.inNode._id&&l.a.getState().db[s]&&l.a.getState().db[s][i.inNode._id]&&o[i.inNode._id]&&o[i.inNode._id][i.nodeId]&&a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:function(){var t;"User"===i.inNode.type&&(i&&i.inNode&&i.inNode._id&&l.a.getState().db&&l.a.getState().db.users&&l.a.getState().db.users[i.inNode._id]&&o[i.inNode._id]&&Object.keys(o[i.inNode._id]).length>0&&o[i.inNode._id][i.nodeId]&&(t=o[i.inNode._id][i.nodeId].user._id),u(t,"users"));"Card"===i.inNode.type&&("chatGroup"!==l.a.getState().db.cards[i.inNode._id].type?e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideMudule),{},{db:"cards",id:i.inNode._id,module:"cardEdit",activeModule:"timeline",data:l.a.getState().db.cards[i.inNode._id]})):u(i.inNode._id,"cards"))}},a.a.createElement(_r.a,{storie:i&&i.inNode&&i.inNode._id&&l.a.getState().db&&l.a.getState().db[s]&&l.a.getState().db[s][i.inNode._id]&&o[i.inNode._id]&&Object.keys(o[i.inNode._id]).length>0&&o[i.inNode._id][i.nodeId]?o[i.inNode._id][i.nodeId]:{},boxStyle:{width:"calc(100% - 10px) !important"},db:s})),"card"===i.module&&r[s]&&r[s][i.nodeId]&&a.a.createElement("div",{style:"chatGroup"===l.a.getState().db.cards[i.nodeId].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.nodeId].type&&u(i.nodeId,"cards")}},a.a.createElement(d,null),a.a.createElement(ut.a,{db:"cards",data:l.a.getState().db.cards[i.nodeId],expanded:!0,onlyOption:"chatGroup"===l.a.getState().db.cards[i.nodeId].type,onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.nodeId].type&&u(i.nodeId,"cards")}})),e.showTimeline&&r[s]&&r[s][i.inNode._id]&&a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:"chatGroup"===l.a.getState().db.cards[i.inNode._id].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.inNode._id].type&&u(i.inNode._id,"cards")}},a.a.createElement(d,null),a.a.createElement(ut.a,{db:"cards",data:l.a.getState().db.cards[i.inNode._id],expanded:!0,onlyOption:"chatGroup"===l.a.getState().db.cards[i.inNode._id].type,onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.inNode._id].type&&u(i.inNode._id,"cards")}}))),a.a.createElement(Sn.a,{xs:12,sm:12,md:8,lg:8,xl:8},a.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},a.a.createElement(hi,{nodeId:i.inNode._id,stories:i&&i.inNode&&i.inNode._id&&l.a.getState().db.cards[i.inNode._id]&&o[i.inNode._id]?o[i.inNode._id]:{},db:"cards"})))))})),vi=function(e){var t;return{bar:{position:"fixed",top:"0px",left:"0px",width:"147px",height:"calc(100vh - 0px)"},item:{height:"47px",alignItems:"center",width:"100%",display:"flex"},itemButtom:{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",cursor:"pointer"},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:(t={},Object(h.a)(t,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(h.a)(t,e.breakpoints.down("sm"),{left:"0  !important",right:"auto !important"}),t),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 yi(){yi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var xi=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(vi)((function(e){var t=l.a.getState(),r=t.db,n=t.chat,o=t.notifications,i=t.timeline,s=e.classes,u=a.a.useState(null),d=Object(m.a)(u,2),h=d[0],g=d[1],b=window.location.hash.split("/");b[0]=b[0].replace("#","");var v=function(){var t=Object(f.a)(yi().mark((function t(r,a,o){var i,l=arguments;return yi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=l.length>3&&void 0!==l[3]?l[3]:"users",!r||window.location.pathname===r&&a!==h||c.a.push(r),g(a),"chat"!==a||o?"chat"===a&&o?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0,db:i,nodeId:o})):e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!1})):e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0}));case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),y=[],x=[];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})).forEach((function(e,t){-1===x.indexOf(o[e].nodeId)&&(y.push(e),x.push(o[e].nodeId))}));var w=[],_=[];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})).forEach((function(e,t){o[e].inNode&&o[e].inNode._id&&-1===_.indexOf(o[e].inNode._id)&&(w.push(e),_.push(o[e].inNode._id))})),a.a.createElement("div",null,a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{className:s.moduleTitle},Object(S.w)("$__notifications"))),a.a.createElement(Sn.a,{xs:12,sm:6,md:4,lg:4,xl:4},a.a.createElement("div",{className:s.moduleTitle},Object(S.w)("$__cardsUpdated")),y.filter((function(e){return!b[1]||b[1]&&("important"===b[1]||"favorite"===b[1]||"archive"===b[1]||"latest"===b[1])})).map((function(e){return a.a.createElement(bi,{data:o[e],key:e})}))),a.a.createElement(Sn.a,{xs:12,sm:6,md:8,lg:8,xl:8},a.a.createElement("div",{className:s.moduleTitle},Object(S.w)("$__timelineUpdated")),w.filter((function(e){return!b[1]||b[1]&&("important"===b[1]||"favorite"===b[1]||"archive"===b[1]||"latest"===b[1])})).map((function(e){return a.a.createElement(bi,{data:o[e],key:e,openChat:function(e,t){return v(null,"chat",e,t)},showTimeline:!0,timeline:o[e]&&o[e].inNode&&o[e].inNode._id&&r.cards[o[e].inNode._id]&&i[o[e].inNode._id]?i[o[e].inNode._id]:{}})})))))}))),wi=r(1899),_i={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 Oi=Object(le.a)(_i)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.root},a.a.createElement(wi.a,null))})),ji=r(1927),Ei=r(1928),ki={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:Z.w[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},disabledCheckboxAndRadio:{"& $checkedIcon,& $uncheckedIcon,& $radioChecked,& $radioUnchecked":{borderColor:Z.b,opacity:"0.26",color:Z.b}},label:{cursor:"pointer",paddingLeft:"0",color:Z.p[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+Object(Z.q)(Z.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(Z.q)(Z.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:Z.i[0]},radio:{color:Z.w[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+Z.w[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:Z.p[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:Z.p[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:Z.z[0],"& > span:first-child":{borderColor:Z.z[0]}}},iconCheckboxChecked:{color:Z.z[0],"& > span:first-child":{borderColor:Z.z[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:Z.w[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+Object(Z.q)(Z.b)+", 0.4)",color:Z.I+" !important",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)"},switchIconChecked:{borderColor:Z.w[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+Object(Z.q)(Z.p[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+Object(Z.q)(Z.w[0])+", 1) !important"},"& $switchIcon":{borderColor:Z.w[0]}}},Si=Object(p.a)(Object(p.a)({},ki),{},{cardTitle:Object(p.a)(Object(p.a)({},Z.d),{},{textAlign:"center"}),container:Object(p.a)(Object(p.a)({},Z.e),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 6px 30px 5px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.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:Z.p[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+Object(Z.q)(Z.b)+", 0.26)"}});function Li(){Li=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ci=Object(Y.a)(Si);var Ii=r(737);var Ti=Object(u.b)((function(e,t){return{cards:e.db.cards,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition,dataType:e.db.dataType}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.cards,r=e.orderByTitle,n=e.orderByTitlePosition,o=e.dataType,i=l.a.getState().session,c=window.location.hash.split("/");if(c[0]=c[0].replace("#",""),!t)return a.a.createElement("div",null);var s=Object.keys(t).filter((function(r){return!(t[r].checklist||t[r]._planId!==c[0]||t[r]&&t[r].private&&(!t[r]._users||t[r]._users&&!t[r]._users[i._id])||!("actions"===e.type&&t[r]&&t[r].type&&"objective"!==t[r].type&&"goal"!==t[r].type&&"plan"!==t[r].type&&"link"!==t[r].type&&"insight"!==t[r].type&&"chatGroup"!==t[r].type&&-1===t[r].type.indexOf("guideline")&&"swot"!==o.filter((function(e){return e.name===t[r].type}))[0].module||"guidelines"===e.type&&t[r].type.indexOf("guideline")>-1||"objectives"===e.type&&t[r].type.indexOf("objective")>-1||"goals"===e.type&&t[r].type.indexOf("goal")>-1))})).map((function(e){return t[e]}));return a.a.createElement("div",null,a.a.createElement("div",{style:{padding:"0px 10px"}},a.a.createElement(ei.a,{style:{with:"100%"},fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0}),a.a.createElement(ge.a,{title:null,icon:null,color:Object(S.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:r?"$__orderByName":"$__orderByManualOrder",icon:r?"sort":"format_list_numbered",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitle:!r}))}},r&&{title:"ASC"===n?"$__asc":"$__desc",icon:"ASC"===n?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitlePosition:"ASC"===n?"DESC":"ASC"}))}}]})),a.a.createElement(Qo,{cards:s.map((function(e){return e._id})),columnStyle:{maxHeight:"calc(100vh - 220px)",width:"25%"}}))})),Di=r(905),Fi=(r(1759),r(1760),r(203)),Ni=r(83),Ai=function(e){var t=Object(n.useRef)([400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random()]),r=[{id:"Atrasadas",label:"Plano A",value:t.current[0],color:"#f48c7c"},{id:"Concluidas",label:"Plano B",value:t.current[1],color:"#44f474"},{id:"Executando",label:"Plano C",value:t.current[2],color:"#24acdc"},{id:"Atrasadas2",label:"Plano A",value:t.current[3],color:"#f48c7c"},{id:"Concluidas2",label:"Plano B",value:t.current[4],color:"#44f474"}];return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},a.a.createElement(Ni.a,{styles:{},tittle:e.title,icon:e.icon}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{width:"60%"}},a.a.createElement(Br.a,{data:r,colors:["#929497","#011E41","pink","#EBA900","#5A7F71"],margin:{top:37,right:27,bottom:37,left:0},innerRadius:.6,animate:!1,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:!1,arcLabel:!1})),a.a.createElement(re.a,{size:65,style:{alignSelf:"center",marginLeft:"-20px"}},"list_alt"))))},Pi=function(e){var t=Object(n.useRef)([400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random()]),r=[{id:"Atrasadas",label:"Plano A",value:t.current[0],color:"#f48c7c"},{id:"Concluidas",label:"Plano B",value:t.current[1],color:"#44f474"},{id:"Executando",label:"Plano C",value:t.current[2],color:"#24acdc"},{id:"Atrasadas2",label:"Plano A",value:t.current[3],color:"#f48c7c"},{id:"Concluidas2",label:"Plano B",value:t.current[4],color:"#44f474"}];return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},a.a.createElement(Ni.a,{styles:{},tittle:e.title,icon:e.icon}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},a.a.createElement(Br.a,{data:r,margin:{top:30,right:30,bottom:30,left:30},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:0,borderWidth:0,colors:["#929497","#011E41","pink","#EBA900","#5A7F71"],theme:{fontSize:"20px",fontWeight:"bold",legend:!1},animate:!1,arcLinkLabelsStraightLength:0,isInteractive:!1,borderColor:{from:"color",modifiers:[["darker",.8]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:!1,arcLabel:!1}))))},$i=r(196),Mi=function(e){var t=Object(n.useRef)(Math.floor(7*Math.random())+3);return console.log(t),a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(Ni.a,{styles:{},tittle:e.title,icon:e.icon,datafilter:!0}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},a.a.createElement($i.a,{data:[{country:"AD","hot dog":129,"hot dogColor":"hsl(182, 70%, 50%)",burger:161,burgerColor:"hsl(324, 70%, 50%)",sandwich:75,sandwichColor:"hsl(266, 70%, 50%)",kebab:66,kebabColor:"hsl(148, 70%, 50%)",fries:180,friesColor:"hsl(130, 70%, 50%)",donut:180,donutColor:"hsl(253, 70%, 50%)"},{country:"AE","hot dog":115,"hot dogColor":"hsl(121, 70%, 50%)",burger:87,burgerColor:"hsl(30, 70%, 50%)",sandwich:22,sandwichColor:"hsl(170, 70%, 50%)",kebab:164,kebabColor:"hsl(24, 70%, 50%)",fries:5,friesColor:"hsl(103, 70%, 50%)",donut:47,donutColor:"hsl(308, 70%, 50%)"},{country:"AF","hot dog":129,"hot dogColor":"hsl(354, 70%, 50%)",burger:15,burgerColor:"hsl(353, 70%, 50%)",sandwich:28,sandwichColor:"hsl(223, 70%, 50%)",kebab:178,kebabColor:"hsl(134, 70%, 50%)",fries:26,friesColor:"hsl(30, 70%, 50%)",donut:182,donutColor:"hsl(206, 70%, 50%)"},{country:"AG","hot dog":192,"hot dogColor":"hsl(276, 70%, 50%)",burger:179,burgerColor:"hsl(165, 70%, 50%)",sandwich:184,sandwichColor:"hsl(21, 70%, 50%)",kebab:107,kebabColor:"hsl(292, 70%, 50%)",fries:45,friesColor:"hsl(63, 70%, 50%)",donut:193,donutColor:"hsl(97, 70%, 50%)"},{country:"AI","hot dog":117,"hot dogColor":"hsl(84, 70%, 50%)",burger:151,burgerColor:"hsl(183, 70%, 50%)",sandwich:190,sandwichColor:"hsl(11, 70%, 50%)",kebab:46,kebabColor:"hsl(85, 70%, 50%)",fries:133,friesColor:"hsl(65, 70%, 50%)",donut:66,donutColor:"hsl(190, 70%, 50%)"},{country:"AL","hot dog":0,"hot dogColor":"hsl(89, 70%, 50%)",burger:53,burgerColor:"hsl(348, 70%, 50%)",sandwich:3,sandwichColor:"hsl(87, 70%, 50%)",kebab:45,kebabColor:"hsl(193, 70%, 50%)",fries:169,friesColor:"hsl(108, 70%, 50%)",donut:25,donutColor:"hsl(153, 70%, 50%)"},{country:"AM","hot dog":98,"hot dogColor":"hsl(233, 70%, 50%)",burger:193,burgerColor:"hsl(144, 70%, 50%)",sandwich:178,sandwichColor:"hsl(298, 70%, 50%)",kebab:183,kebabColor:"hsl(261, 70%, 50%)",fries:128,friesColor:"hsl(309, 70%, 50%)",donut:72,donutColor:"hsl(326, 70%, 50%)"}].slice(0,t.current),keys:["donut","fries","kebab"],indexBy:"country",margin:{top:20,right:20,bottom:20,left:20},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!0},enableLabel:!1,colors:["#011E41","#EBA900","#5A7F71"],yScale:{max:100},theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fontSize:14}}}},fill:!1,borderColor:{from:"color",modifiers:[["darker",1.6]]},isInteractive:!1,axisTop:null,axisRight:null,axisBottom:null,axisLeft:null,role:"application"}))))},Bi=r(728),zi=function(e){return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(Ni.a,{styles:{},tittle:e.title,icon:e.icon}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",marginBottom:"25px"}},a.a.createElement(Bi.a,{data:[{id:"japan",data:[{x:"",y:89},{x:"seg",y:89},{x:"ter",y:289},{x:"quar",y:145},{x:"quin",y:268},{x:"sexta",y:285},{x:"sab",y:241},{x:"dom",y:86},{x:" ",y:86}]},{id:"france",data:[{x:"",y:89},{x:"seg",y:224},{x:"ter",y:153},{x:"quar",y:200},{x:"quin",y:94},{x:"sexta",y:285},{x:"sab",y:275},{x:"dom",y:287},{x:" ",y:127}]}],responsive:!0,margin:{top:0,right:-25,bottom:0,left:-25},xScale:{type:"point"},yScale:{type:"linear",min:"auto",max:500,stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:null,axisLeft:null,enableGridX:!0,enableGridY:!0,lineWidth:.5,pointSize:1,pointColor:{theme:"background"},pointBorderWidth:0,isInteractive:!1,enableArea:!0,areaBaselineValue:0,pointBorderColor:{from:"serieColor"},pointLabelYOffset:-12,useMesh:!0,curve:"cardinal",colors:["#525252","#24acdc"],theme:{fontSize:"14px",color:"white",background:"#f5f5f5",grid:{line:{stroke:"#e8e6e6",strokeWidth:1}},axis:{ticks:{text:{fontSize:14}}}}}))))},Yi=r(291),Ri=r(729),Gi=function(e){return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(Ni.a,{styles:{},tittle:e.title,icon:e.icon,datafilter:!0}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},a.a.createElement(Ri.a,{data:[{id:"step_sent",value:6,label:"Sent"},{id:"step_viewed",value:5,label:"Viewed"},{id:"step_clicked",value:4,label:"Clicked"},{id:"step_add_to_card",value:3,label:"Add To Card"},{id:"step_purchased",value:2,label:"Purchased"},{id:"step_purchased2",value:1,label:"Purchased"}],direction:"horizontal",margin:{top:0,right:0,bottom:0,left:0},shapeBlending:.46,spacing:3,valueFormat:" > .0s",colors:{scheme:"reds"},borderWidth:0,labelColor:{from:"color",modifiers:[["darker",3]]},beforeSeparatorLength:10,beforeSeparatorOffset:20,afterSeparatorLength:10,afterSeparatorOffset:20,currentPartSizeExtension:10,enableLabel:!1,motionConfig:"wobbly"}))))},Hi=r(473),Wi=r(865),Ui=r(866),qi=r(534),Vi=r(535),Ji=r(536),Xi=r(867),Ki=r(868),Zi=r(537),Qi=r(869),ec=r(538),tc=r(539),rc=r(540),nc=r(870),ac=r(200),oc=r(541),ic=r(871),cc=r(872),lc=r(873),sc=r(875),uc=r(474),dc=r(543),pc=r(544),fc=r(475),hc=r(476),mc=r(545),gc=r(477),bc=r(876),vc=(r(1766),function(e){var t,r,o,i=e.onClose,c=e.filter,s=e.addWidget,u=Object(n.useState)("all"),d=Object(m.a)(u,2),p=d[0],f=d[1],h=window.location.hash.split("/");h[0]=h[0].replace("#","");var g=l.a.getState().db,b=[{name:Object(S.w)("$__all"),type:"all"},{name:Object(S.w)("$__charts"),type:"charts"},{name:Object(S.w)("$__tasks"),type:"tasks"},{name:Object(S.w)("$__others"),type:"others"}],v=[{Component:lc.default,widget:"TaskDoneBar",type:"charts",name:"TaskDoneBar",datagrid:{x:0,y:0,w:4,h:6,minW:2,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:Mi},{Component:sc.default,widget:"TaskDoneDoughTable",type:"charts",name:"TaskDoneDoughTable",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"stacked_bar_chart",Preview:Pi},{Component:fc.default,widget:"TaskDoneByTime",name:"taskDoneInWeek",type:"charts",datagrid:{x:0,y:0,w:5,h:5,minW:3,maxW:12,minH:4},icon:"area_chart",Preview:zi},{Component:uc.default,widget:"TaskByPerson",name:"TaskByPerson",type:"charts",datagrid:{x:0,y:0,w:5,h:5,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:Mi,filter:{index:0,showQuantity:5,number:(null===c||void 0===c?void 0:c.users)?null===c||void 0===c||null===(t=c.users)||void 0===t?void 0:t.length:4,finalIndex:5}},{Component:dc.default,widget:"TaskByCreator",name:"TaskByCreator",type:"charts",datagrid:{x:0,y:0,w:5,h:5,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:Mi,filter:{index:0,showQuantity:5,number:(null===c||void 0===c?void 0:c.users)?null===c||void 0===c||null===(r=c.users)||void 0===r?void 0:r.length:4,finalIndex:5}},{Component:pc.default,widget:"TaskByResponsible",name:"TaskByResponsible",type:"charts",datagrid:{x:0,y:0,w:5,h:5,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:Mi,filter:{index:0,showQuantity:5,number:(null===c||void 0===c?void 0:c.users)?null===c||void 0===c||null===(o=c.users)||void 0===o?void 0:o.length:4,finalIndex:5}},{Component:bc.default,widget:"TaskDoneBarMonth",type:"charts",name:"TaskDoneBarMonth",datagrid:{x:0,y:0,w:6,h:6,minW:2,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:Mi},{Component:hc.default,widget:"TimeLine",name:"TimeLine",type:"others",datagrid:{x:0,y:0,w:4,h:4,minW:6,maxW:12,minH:4},icon:"chat",Preview:Yi.a},{Component:Ui.default,widget:"ActionsDetailed",name:"actions",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"play_arrow",Preview:Ai,plan:"flow"},{Component:Ki.default,widget:"GoalsDetailed",name:"goals",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"flag",Preview:Ai,plan:"flow"},{Component:nc.default,widget:"MatrixDoughDetailed",name:"guidelines",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:Ht.a,Preview:Ai,plan:"flow"},{Component:cc.default,widget:"ObjectiveDetailed",name:"objectives",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"gps_fixed",Preview:Ai,plan:"flow"},{Component:mc.default,widget:"ObjetiveDough",name:"objectives",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"gps_fixed",Preview:Pi,plan:"flow"},{Component:qi.default,widget:"ActionsDough",name:"actions",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"play_arrow",Preview:Pi,plan:"flow"},{Component:rc.default,widget:"MatrixDough",name:"guidelines",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:Ht.a,Preview:Pi,plan:"flow"},{Component:Zi.default,widget:"GoalsDough",name:"goals",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"flag",Preview:Pi,plan:"flow"},{Component:Xi.default,widget:"Goal",name:"goals",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"flag",Preview:ac.default,plan:"flow"},{Component:ic.default,widget:"Objective",name:"objectives",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"gps_fixed",Preview:ac.default,plan:"flow"},{Component:Qi.default,widget:"Guideline",name:"guidelines",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:Ht.a,Preview:ac.default,plan:"flow"},{Component:Wi.default,widget:"Actions",name:"actions",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"play_arrow",Preview:ac.default,plan:"flow"},{Component:ec.default,widget:"LastCompleted",type:"tasks",name:"lastCompletedCards",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:Yi.a},{Component:Vi.default,widget:"DayTasks",type:"tasks",name:"todayTasks",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:Yi.a},{Component:tc.default,widget:"LateTask",type:"tasks",name:"lateActivities",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:Yi.a},{Component:oc.default,widget:"NextTask",type:"tasks",name:"nextActivities",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:Yi.a},{Component:gc.default,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:0,w:6,h:8,minW:3,maxW:12,minH:8},icon:"update",Preview:Yi.a},{Component:Ji.default,widget:"Funnel",type:"charts",name:"Etapas",datagrid:{x:0,y:0,w:6,h:4,minW:4,maxW:12,minH:4},icon:"filter_alt",Preview:Gi},{Component:Hi.default,widget:"AboutPlan",type:"others",name:"planResume",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:4},icon:"info",Preview:Yi.a}],y=function(e){var t=e.name,r=e.prev;return a.a.createElement("div",null,a.a.createElement("p",{style:{marginTop:"2px",height:"80px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",width:"105%",marginLeft:"-2%",fontWeight:"bold",borderBottom:"1px solid #d1d1cf",fontSize:"16px",color:"rgba(0, 0, 0, 0.80)"}},a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"analytics"),t),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",right:"20px",top:"18px",color:"grey"},size:"30px",onClick:i},"close")),r&&a.a.createElement("div",{id:"getElements_58"}," ",a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",left:"20px",top:"18px",color:"grey"},size:"30px"},"arrow_back")))};return a.a.createElement("div",{className:"container"},a.a.createElement("div",{className:"gridContainer"},a.a.createElement(Rr.a,null,a.a.createElement(Fi.a,{className:"grid",xs:12},a.a.createElement(y,{name:Object(S.w)("$__addCharts")})),a.a.createElement(Fi.a,{className:"grid",xs:4},a.a.createElement("div",{className:"list"},b.map((function(e,t){var r=e.name,n=e.type,o=r.charAt(0).toUpperCase()+r.slice(1);return"tasks"===n&&"operational"===g.cards[h[0]].planType?null:a.a.createElement("p",{key:t,onClick:function(){return f(n)},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},className:"filter",style:{paddingLeft:"20px",display:"flex",alignItems:"center",fontSize:"16px"}},o)})))),a.a.createElement(Fi.a,{className:"grid",xs:8},a.a.createElement("div",{className:"filterItemBox"},v&&v.map((function(e,t){var r=e.name,n=(e.image,e.Component),o=e.datagrid,c=e.type,l=e.icon,u=e.widget,d=e.Preview,f=e.filter,m=e.plan;return"tasks"===c&&"operational"===g.cards[h[0]].planType||"Funnel"===u&&"operational"!==g.cards[h[0]].planType||"flow"===m&&"flow"!==g.cards[h[0]].planType?null:c===p||"all"===p?a.a.createElement(Fi.a,{className:"gridBox",xs:6,key:t},a.a.createElement("div",{style:{position:"absolute",zIndex:"10",width:"97%",height:"95%",cursor:"pointer",marginLeft:"-4.5%"},onClick:function(){s(n,r,o,r,r,l,u,f),i()},className:"boxIncrease"}),a.a.createElement("div",{className:"filterItem"},a.a.createElement(d,{tittle:Object(S.w)("$__".concat(r),1),title:Object(S.w)("$__".concat(r),1),preview:!0,data:1,type:c,icon:l}))):null})))))))}),yc=r(96),xc=r(723),wc=[{Component:Hi.default,widget:"AboutPlan",name:"planResume",datagrid:{x:0,y:0,w:6,h:3,minW:2,maxW:12,minH:3},icon:"close"},{Component:hc.default,widget:"TimeLine",name:"TimeLine",datagrid:{x:6,y:0,w:6,h:7,minW:6,maxW:12,minH:4},icon:"close"},{Component:xc.default,widget:"Notes",name:"Notes",datagrid:{x:0,y:4,w:6,h:4,minW:2,maxW:12,minH:4},icon:"close"},{Component:uc.default,widget:"TaskByPerson",name:"taskByPerson",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:dc.default,widget:"TaskByCreator",name:"taskByCreator",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:pc.default,widget:"TaskByResponsible",name:"taskByResponsible",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:fc.default,widget:"TaskDoneByTime",name:"taskDoneInWeek",datagrid:{x:6,y:18,w:6,h:6,minW:4,maxW:12,minH:4},icon:"area_chart"},{Component:mc.default,widget:"ObjetiveDough",name:"objectives",datagrid:{x:0,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"gps_fixed"},{Component:qi.default,widget:"ActionsDough",name:"actions",datagrid:{x:3,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"play_arrow"},{Component:rc.default,widget:"MatrixDough",name:"guidelines",datagrid:{x:6,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"MatrixIcon"},{Component:Zi.default,widget:"GoalsDough",name:"goals",datagrid:{x:9,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"gps_fixed"},{Component:ec.default,widget:"LastCompleted",name:"lastCompletedCards",datagrid:{x:0,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:Vi.default,widget:"DayTasks",name:"todayTasks",datagrid:{x:3,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:tc.default,widget:"LateTask",name:"lateActivities",datagrid:{x:6,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:oc.default,widget:"NextTask",name:"nextActivities",datagrid:{x:9,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:gc.default,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:18,w:4,h:8,minW:3,maxW:12,minH:8},icon:"update"}],_c=[{Component:Hi.default,widget:"AboutPlan",name:"planResume",datagrid:{x:0,y:0,w:6,h:3,minW:2,maxW:12,minH:3},icon:"close"},{Component:hc.default,widget:"TimeLine",name:"TimeLine",datagrid:{x:6,y:0,w:6,h:7,minW:6,maxW:12,minH:4},icon:"close"},{Component:xc.default,widget:"Notes",name:"Notes",datagrid:{x:0,y:4,w:6,h:4,minW:2,maxW:12,minH:4},icon:"close"},{Component:uc.default,widget:"TaskByPerson",name:"taskByPerson",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:fc.default,widget:"TaskDoneByTime",name:"taskDoneInWeek",datagrid:{x:6,y:18,w:6,h:6,minW:4,maxW:12,minH:4},icon:"area_chart"},{Component:Ji.default,widget:"Funnel",type:"charts",name:"Etapas",datagrid:{x:0,y:22,w:12,h:5,minW:4,maxW:12,minH:4},icon:"filter_alt"},{Component:gc.default,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:27,w:4,h:8,minW:3,maxW:12,minH:8},icon:"update"}],Oc=function(e){var t,r=e.handleColorSet,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)("white"),u=Object(m.a)(s,2),d=u[0],p=u[1],f=function(){l(!c)},g=(t={height:"50px",alignContent:"center",justifyContent:"center",display:"flex",marginLeft:"0px",padding:"0px",width:"200px"},Object(h.a)(t,"display","flex"),Object(h.a)(t,"cursor","pointer"),Object(h.a)(t,"backgroundColor","transparent"),Object(h.a)(t,"borderBottom","2px solid #eeeeee"),t),b=[["#3498db","#85c1e9","#2980b9","#aed6f1","#1f618d","#7fb3d5"],["#1b6b99","#1c5681","#0e4063","#0a2e4d","#1f3a4b","#0c2c3a"],["#849AA4","#2E5E90","#9ED3D8","#F07857","#008AC4","#2C2C2C"],["#6AB187","#CED2CC","#23282D","#4CB5F5","#1F3F49","#D32D41"],["#4B49AC","#98BDFF","#23282D","#4CB5F5","#1F3F49","#D32D41"],["#01a0a8","#de572f","#fdbd3f","#642201","#eb7f58","#e9d5a8"]];return a.a.createElement("div",{onMouseEnter:function(){return p("rgba(0, 0, 0, 0.12)")},onMouseLeave:function(){return p("rgba(0, 0, 0, 0)")},style:{position:"relative",backgroundColor:d}},a.a.createElement(Ka.a,{text:Object(S.w)("$__colorPalette"),icon:"palette",onClick:f,onBlur:f}),c&&a.a.createElement("ul",{style:{position:"absolute",zIndex:"999999999",padding:"0px",top:"25px",backgroundColor:"white",border:"2px solid #eeeeee"}},b.map((function(e){var t=e.map((function(e,t){var r="";switch(t){case 0:r="completed";break;case 1:r="awaitAction";break;case 2:r="inProgress";break;case 3:r="paused";break;case 4:r="notStarted";break;case 5:r="late";break;default:r=""}return{color:e,label:r}}));return a.a.createElement("li",{style:g,onClick:function(){return r(t)},onMouseEnter:function(e){"white"===e.target.style.backgroundColor&&(e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)")},onMouseLeave:function(e){console.log(e.target.style.backgroundColor),"rgba(0, 0, 0, 0.12)"===e.target.style.backgroundColor&&(e.target.style.backgroundColor="white")}},e.map((function(e){return a.a.createElement("span",{style:{width:"15px",height:"15px",backgroundColor:e,alignSelf:"center"}})})))}))))},jc=r(739),Ec=r(144),kc=function(e){var t=e.options,r=e.handleDateChange;return a.a.createElement("div",{style:{display:"flex"}},(null===t||void 0===t?void 0:t.users)&&a.a.createElement("div",{style:{marginTop:5}},a.a.createElement(Ec.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:(null===t||void 0===t?void 0:t.users)||null,noLimit:!0,multiple:!0,selected:(null===t||void 0===t?void 0:t.users)||[],transparent:!0})),(null===t||void 0===t?void 0:t.startDate)&&a.a.createElement("div",{style:{marginTop:5,marginLeft:"10px"}},a.a.createElement(He.a,{type:"datetime",onChangeStartDate:function(e){var t={startDate:_()(e).unix("x")};console.log(t),r(t)},onChangeEndDate:function(e){var t={endDate:_()(e).unix("x")};console.log(t),r(t)},range:!0,horizontal:!0,startDate:(null===t||void 0===t?void 0:t.startDate)?new Date(1e3*t.startDate):null,endDate:(null===t||void 0===t?void 0:t.endDate)?new Date(1e3*t.endDate):null,onClear:function(){r({startDate:!1,endDate:!1})}})),(null===t||void 0===t?void 0:t.tags)&&a.a.createElement("div",{style:{display:"flex",fontSize:11}},t.tags.map((function(e,t){return a.a.createElement("div",{key:e.value,className:"tag",style:{backgroundColor:e.color||"lightgray",color:e.color?Object(S.u)(e.color,!0):"#FFFFFF",display:"flex",alignItems:"center",padding:"3px 7px",borderRadius:"7px",marginLeft:5,whiteSpace:"nowrap",height:"fit-content"}},e.parent&&l.a.getState().db.tag.filter((function(t){return t.value===e.parent})).length>0?a.a.createElement("div",{style:{fontSize:8,marginRight:3}},l.a.getState().db.tag.filter((function(t){return t.value===e.parent}))[0].label," / "):a.a.createElement(a.a.Fragment,null),e.label)}))),(null===t||void 0===t?void 0:t.status)&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.w)("$__status"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(t.status).filter((function(e,r){return t.status[e]})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.w)(l.a.getState().db.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:l.a.getState().db.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))))};r(156);function Sc(){Sc=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Lc,Cc=Object(Di.WidthProvider)(Di.Responsive),Ic=Object(u.b)((function(e){return{cards:e.db.cards,loaders:e.sessionLoads.cards.load}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,o=Object(n.useState)([]),c=Object(m.a)(o,2),s=c[0],u=c[1],d=Object(n.useState)(!1),g=Object(m.a)(d,2),b=g[0],v=g[1],y=Object(n.useState)({}),x=Object(m.a)(y,2),w=x[0],_=x[1],O=Object(n.useState)(!1),j=Object(m.a)(O,2),E=j[0],k=j[1],L=Object(n.useState)(0),C=Object(m.a)(L,2),I=C[0],T=C[1],D=Object(n.useState)([]),F=Object(m.a)(D,2),P=F[0],$=F[1],M=Object(n.useState)(!0),B=Object(m.a)(M,2),z=B[0],Y=B[1],R=l.a.getState().db,G=Object(n.useState)({filter:{}}),H=Object(m.a)(G,2),W=H[0],U=H[1],q=Object(n.useRef)([{}]),V=Object(n.useRef)(!1),J=Object(n.useRef)({}),X=window.location.hash.split("/");X[0]=X[0].replace("#","");var K=Object(S.j)(),Z=Object(et.t)(X[0]),Q={backgroundColor:"white",color:"rgba(0, 0, 0, 0.80)"},ee=Object(n.useRef)(null);Object(n.useEffect)((function(){e.loaders&&Object.keys(e.loaders).length>0&&Object.keys(e.loaders).filter((function(t){return"loading"===e.loaders[t]})).length>0?!1!==z&&Y(!0):Y(!1)}),[e.loaders]),Object(n.useEffect)((function(){var e=[];!E&&Object.keys(w).length>0&&function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var n=l.a.getState().db.cards[t[0]].customDashboard?Object.values(JSON.parse(l.a.getState().db.cards[t[0]].customDashboard)):null;if(n){n.sort((function(e,t){return e.datagrid.y===t.datagrid.y?e.datagrid.x-t.datagrid.x:e.datagrid.y-t.datagrid.y}));var a=[];n.map(function(){var e=Object(f.a)(Sc().mark((function e(t,o){var i,c,l,s,d,f,h;return Sc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.widget,c="".concat(i.substr(0,1).toUpperCase()).concat(i.substr(1,i.length)),e.next=4,r(1767)("./".concat(c,".jsx"));case 4:l=e.sent,s=l.default,d={component:s,name:t.name,type:t.name,datagrid:t.datagrid,chart:t.name,icon:t.icon,widget:t.widget,key:Object(Nr.a)(),filter:!!t.filter&&t.filter},a=[].concat(Object(A.a)(a),[d]),o===n.length-1&&(u(a),(null===d||void 0===d||null===(f=d.filter)||void 0===f?void 0:f.colorsArr)&&U(Object(p.a)(Object(p.a)({},W),{},{colorsArr:null===d||void 0===d||null===(h=d.filter)||void 0===h?void 0:h.colorsArr})));case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}else{e="operational"!==R.cards[t[0]].planType?wc:_c;var o=[];e.forEach((function(t,r){var n={component:t.Component,name:t.name,type:t.name,datagrid:t.datagrid,chart:t.name,icon:t.icon,widget:t.widget,key:Object(Nr.a)(),filter:!1};o=[].concat(Object(A.a)(o),[n]),r===e.length-1&&u(o)}))}}()}),[w,E]),Object(n.useEffect)((function(){if(!E){if(0===s.length){var e=l.a.getState().db.cards[X[0]].customDashboard?Object.values(JSON.parse(l.a.getState().db.cards[X[0]].customDashboard)):null;if(e)u(e);else{var t=[];t="operational"!==R.cards[X[0]].planType?wc:_c,u(t)}}(function(){var e=Object(f.a)(Sc().mark((function e(){var t;return Sc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,100)}));case 2:return e.next=4,Object(et.s)(X[0]);case 4:t=e.sent,JSON.stringify(w)!==JSON.stringify(t)&&_(t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}}),[e.cards]);var te=function(){V.current?i.a.render(a.a.createElement(vc,{category:"plan",filter:b,onClose:function(){return i.a.unmountComponentAtNode(document.getElementById("render-container"))},addWidget:function(e,t,r,n,a,o,i,c){return function(e,t,r,n,a,o,i,c,l){var s={component:e,name:t,type:n,datagrid:r,chart:a,icon:o,widget:i,key:Object(Nr.a)(),filter:Object(p.a)(Object(p.a)({},c||{}),W)};void 0!==l?u((function(e){return e.map((function(e,t){return t===l?s:e}))})):E?$((function(e){return[].concat(Object(A.a)(e),[s])})):u((function(e){return[].concat(Object(A.a)(e),[s])}))}(e,t,r,n,a,o,i,c)}}),document.getElementById("render-container")):i.a.unmountComponentAtNode(document.getElementById("render-container"))};return a.a.createElement("div",{ref:ee,key:I,style:{width:"100%",marginTop:"8px",marginBottom:"8%",fontSize:"19px",color:"grey",overflowX:"hidden",overflowY:"hidden",paddingBottom:"80px",minHeight:"90vh"}},a.a.createElement("div",{id:"render-container"}),a.a.createElement("div",{style:{display:"flex"}},E&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(Ka.a,{text:Object(S.w)("$__addCharts"),icon:"add",onClick:function(){return V.current=!0,v(!0),void te()}})),a.a.createElement("div",{style:{marginLeft:"10px"}},a.a.createElement(Oc,{handleColorSet:function(e){return function(e){var t=P.map((function(t){return Object(p.a)(Object(p.a)({},t),{},{filter:Object(p.a)(Object(p.a)({},t.filter),{},{colorsArr:e})})}));U(Object(p.a)(Object(p.a)({},W),{},{colorsArr:e})),$(t)}(e)}})),a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(Ka.a,{text:Object(S.w)("$__save"),icon:"save",onClick:function(){return function(){var t={};P.forEach((function(e){q.current.forEach((function(r){r.i===e.key&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e.key,Object(p.a)(Object(p.a)({},e),{},{datagrid:r}))))}))})),Object.keys(V).length>0&&P.forEach((function(e){Object.values(J.current).forEach((function(r){r.id===e.key&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e.key,Object(p.a)(Object(p.a)({},t[e.key]),{},{filter:r}))))}))})),Object(et.M)(e,{_id:X[0],customDashboard:JSON.stringify(t)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},X[0],Object(p.a)(Object(p.a)({},l.a.getState().db.cards[X[0]]),{},{customDashboard:JSON.stringify(t)})))})),Object(S.c)({message:"Dados salvos",variant:"info",persist:!1,horizontal:"right",confirm:null}),u(P),k(!1)}()}}))),!E&&a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(Ka.a,{text:"Selecionar periodo",icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(jc.a,{fields:["date"],showFilters:!0,style:{zIndex:"999"},indicators:(null===W||void 0===W?void 0:W.filter)||{},onChange:function(e){U(Object(p.a)(Object(p.a)({},W),{},{filter:Object(p.a)({},e)}))}})),style:{alignSelf:"center",right:"107px"}})),(K.plan&&K.planAdmin||Z>3)&&a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(Ka.a,{text:E?Object(S.w)("$__cancel"):Object(S.w)("$__editMode"),icon:E?"close":"edit",onClick:function(){E?(k((function(e){return!e})),$(s),T((function(e){return e+1}))):($(s),k((function(e){return!e})))},style:{backgroundColor:E&&"white",color:E&&"black "}}))),(null===W||void 0===W||null===(t=W.filter)||void 0===t?void 0:t.startDate)&&a.a.createElement("div",{style:{marginRight:"15px",marginTop:"20px",border:"1px solid #D3D3D3",marginLeft:"10px",paddingTop:"10px",paddingBottom:"10px",width:"370px"}},a.a.createElement(kc,{handleDateChange:function(e){return U(Object(p.a)(Object(p.a)({},W),{},{filter:Object(p.a)(Object(p.a)({},W.filter),e)}))},options:W.filter})),(E?P:s).length>0&&a.a.createElement(Cc,{breakpoints:{lg:1200},cols:{lg:12,ll:4},rowHeight:80,isResizable:E,onLayoutChange:function(e,t){var r;(null===t||void 0===t||null===(r=t.lg)||void 0===r?void 0:r.length)>0&&(q.current=null===t||void 0===t?void 0:t.lg)},style:{zIndex:"0"},draggableHandle:".drag-handle"},(E?P:s).filter((function(e){e.component;var t=e.key,r=e.name,n=e.datagrid,a=e.type,o=e.icon;e.filter;return t&&r&&n&&a&&o})).map((function(e){var t=e.component,r=e.key,n=e.name,o=e.datagrid,i=e.type,c=e.icon,l=e.filter,d=(e.tableKey,e.colorsArr),f=t||!1;return a.a.createElement("div",{key:r,"data-grid":o,className:"box"},a.a.createElement("div",{style:{height:"100%",width:"100%"}},a.a.createElement(yc.a,null,(function(e){var t;return a.a.createElement(N.a,{message:n},Object.keys(w).length>0&&("function"===typeof f||"function"===typeof(null===f||void 0===f?void 0:f.WrappedComponent))&&(e||E)?a.a.createElement(f,{styles:Q,handleRemoveObject:function(e){return function(e){$((function(t){return t.filter((function(t){return t.key!==e}))}))}(e)},edit:E,handleDatagridTable:function(){return function(e){var t=(E?P:s).map((function(t){var r=t;if(t.key===e){var n=Object(Nr.a)();r=Object(p.a)(Object(p.a)({},r),{},{filter:Object(p.a)(Object(p.a)({},t.filter),{},{table:!t.filter.table||!t.filter.table}),key:n})}return Object.keys(V).length>0&&Object.values(J.current).forEach((function(e){e.id===t.key&&(r=Object(p.a)(Object(p.a)({},r),{},{filter:Object(p.a)(Object(p.a)(Object(p.a)({},r.filter),e),{},{table:r.filter.table})}))})),Object.keys(q).length>0&&Object.values(q.current).forEach((function(n){n.i===e&&(r=Object(p.a)(Object(p.a)({},r),{},{datagrid:Object(p.a)(Object(p.a)({},r.datagrid),{},{h:t.filter.table?n.h/2>6?n.h/2:6:2*n.h<8?2*n.h:8,w:n.w})}))})),r}));E?$(Object(A.a)(t)):u(Object(A.a)(t))}(r)},handleSetFilter:function(e){return function(e){J.current=Object(p.a)(Object(p.a)({},J.current),{},Object(h.a)({},e.id,Object(p.a)(Object(p.a)({},J.current[e.id]),e)))}(e)},handleSetTags:function(e){return function(e){var t=(E?P:s).map((function(t){var r=t;return t.key===e.id&&(r=Object(p.a)(Object(p.a)({},r),{},{filter:Object(p.a)(Object(p.a)({},r.filter),{},{tagsColors:null===e||void 0===e?void 0:e.tagsColors,mainColorTags:null===e||void 0===e?void 0:e.mainColor})})),Object.keys(V).length>0&&Object.values(J.current).forEach((function(t){t.id===e.id&&(r=Object(p.a)(Object(p.a)({},r),{},{filter:Object(p.a)(Object(p.a)({},r.filter),{},{tagsColors:null===e||void 0===e?void 0:e.tagsColors})}))})),r}));E?$(Object(A.a)(t)):u(Object(A.a)(t))}(e)},handleDashboardConfig:function(e){return t=e,void U(Object(p.a)(Object(p.a)({},W),t));var t},tittle:n,preview:!1,filterRef:null===(t=J.current)||void 0===t?void 0:t[r],type:i,icon:c,datagrid:o,planCards:w,colorsArr:d,id:r,dashboardConfig:W,filter:l||{}}):a.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:"white"}},a.a.createElement(re.a,{size:24,style:{alignSelf:"center",marginLeft:"17px",color:"rgba(0, 0, 0, 0.67)",marginTop:"1px"}},"blur_on"),a.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"2px",color:"rgba(0, 0, 0, 0.67)",fontSize:"16px"}},Object(S.w)("$__".concat(n),1))),a.a.createElement("div",{style:{flex:"1",display:"flex",justifyContent:"center",backgroundColor:"white"}},a.a.createElement("div",{style:{alignSelf:"center"}},a.a.createElement("div",{className:"loader"})))))}))))}))))})),Tc=function(e){var t=a.a.useState("horizontal"),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState("stacked"),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(N.a,null,a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(k.a,{color:Object(S.d)("lightgray"),icon:"work_history",onClick:function(){s((function(e){return"stacked"===e?"grouped":"stacked"}))},size:"15px",title:"".concat(Object(S.w)("$__changeGroupMode")),text:"".concat(Object(S.w)("$__changeGroupMode"))}),a.a.createElement(k.a,{color:Object(S.d)("lightgray"),icon:"work_history",onClick:function(){o((function(e){return"vertical"===e?"horizontal":"vertical"}))},size:"15px",title:"".concat(Object(S.w)("$__changeLayout")),text:"".concat(Object(S.w)("$__changeLayout"))})),a.a.createElement($i.a,{data:e.data,keys:e.keys,indexBy:"date",groupMode:l,margin:{top:50,right:250,bottom:50,left:80},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!0},colors:{scheme:"nivo"},layout:n,defs:[{id:"dots",type:"patternDots",background:"inherit",color:"#38bcb2",size:4,padding:1,stagger:!0},{id:"lines",type:"patternLines",background:"inherit",color:"#eed312",rotation:-45,lineWidth:6,spacing:10}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:0,legend:"",legendPosition:"middle",legendOffset:32},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:"",legendPosition:"middle",legendOffset:-40},labelSkipWidth:12,labelSkipHeight:12,labelTextColor:{from:"color",modifiers:[["darker",1.6]]},legends:[{dataFrom:"keys",anchor:"bottom-right",direction:"column",justify:!1,translateX:250,translateY:0,itemsSpacing:2,itemWidth:140,itemHeight:10,itemDirection:"right-to-left",itemOpacity:.85,symbolSize:10,effects:[{on:"hover",style:{itemOpacity:1}}]}],role:"application",ariaLabel:"Nivo bar chart demo",barAriaLabel:function(e){return e.id+": "+e.formattedValue+": "+e.indexValue}}))},Dc=r(343),Fc=r(353),Nc=r(735),Ac=r(690),Pc=r(345);function $c(){$c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Mc=Object(Y.a)(Pc.a),Bc=j.b.div(Lc||(Lc=Object(d.a)(["\n            minWidth:200px;\n            background-color:#fff;\n            marginBottom:7px;\n            box-shadow:rgba(0,0,0,0.1) 0px 0px 10px 3px;\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;"):""})),zc=Object(u.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(T.b)(I,e)}))((function e(t){var r,o,i,s,u,d,g,b=Mc(),v=l.a.getState(),y=v.db,x=v.session,w=t.data,O=a.a.useState(!1),j=Object(m.a)(O,2),E=j[0],L=j[1],C=a.a.useState(t.cardsExpanded),I=Object(m.a)(C,2),T=I[0],D=I[1],F=a.a.useState(!1),N=Object(m.a)(F,2),A=N[0],P=N[1],$=a.a.useState(!1),M=Object(m.a)($,2),B=M[0],z=M[1],Y=a.a.useState(t.cardColorPicker?Object(et.r)(w):{}),R=Object(m.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(!1),U=Object(m.a)(W,2),q=U[0],V=U[1],J=Object(n.useRef)({}),X=a.a.useRef(!0);a.a.useEffect((function(){return X.current=!0,function(){X.current=!1}}),[]),Object(n.useEffect)((function(){if(J&&J.current&&t.onResize){var e=J.current.clientHeight;if(t.separator&&(e+=55),t.onResize(e,E),J&&J.current){var r=new MutationObserver((function(){if(X.current){var e=J.current.clientHeight;t.separator&&(e+=55),t.onResize(e,E)}}));return r.observe(J.current,{attributes:!0,childList:!0,subtree:!0}),function(){r.disconnect()}}}}),[E,t.manualExpanded,q]),Object(n.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&V(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&q&&V(!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)&&B&&z(!1),function(){e=!1}}),[t.unlockedPrivates]),a.a.useEffect((function(){var e=!0;return e&&D(t.cardsExpanded),function(){e=!1}}),[t.cardsExpanded]),a.a.useEffect((function(){t.onExpand&&t.onExpand(T)}),[T]);var K=window.location.hash.split("/");if(K[0]=K[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&t.cardColorPicker&&K&&"overview"===K[1]&&(H(Object(et.r)(w)),e=!1),function(){e=!1}}),[t.cards]),w==={}||!w)return a.a.createElement(a.a.Fragment,null);var Z=Object(S.j)(),Q=Object(et.t)(w._id);if(!w||!t.data||!t.data._id)return null;var ee=function(){var e=Object(f.a)($c().mark((function e(){var r,n,a;return $c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(y.cards).filter((function(e){return y.cards[e]&&!y.cards[e].deleted&&(y.cards[e]._planId===K[0]||y.cards[e]._parent===K[0])})).forEach((function(e){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,y.cards[e]))})),n=Object(p.a)({},l.a.getState().db.cards),a=!w._selected,"swot"!==y.dataType.filter((function(e){return e.name===w.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==w._id&&r[e].type&&r[e].type===w.type})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),w.type.indexOf("guideline")>-1?Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):w.type.indexOf("objective")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):w.type.indexOf("goal")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("goal")||-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)(Object(p.a)({},n),r),{},Object(h.a)({},w._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[w._id]),r[w._id]),{},{_selected:a})))})),"swot"===l.a.getState().db.dataType.filter((function(e){return e.name===w.type}))[0].module&&Object(et.G)(t),a&&"matrix"===l.a.getState().db.dataType.filter((function(e){return e.name===w.type}))[0].module&&Object(et.H)(t,w._id);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=Object(f.a)($c().mark((function e(){var r,n=arguments;return $c().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(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:t.db,id:w._id,module:"cardEdit",activeModule:r,data:w}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=Object(f.a)($c().mark((function e(t){return $c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(Q)>2||Z.owner||Z.plan&&(Z.planAdmin||Z.planModerate)?c.a.push("sp#".concat(t,"/dashboard")):te("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=Object(f.a)($c().mark((function e(){return $c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(et.E)(t,{_id:w._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&!0===l.a.getState().db.cards[e]._selected&&l.a.getState().db.cards[e].type&&l.a.getState().db.cards[e].type.indexOf("guideline")>-1})).length>0,oe=!t.noExpanded&&(E||!(t.notGlobalExpanded||!(t.manualExpanded||t.expanded||w._expanded||t.cardsExpanded))),ie=!!(Z&&(Z.owner||Z.plan&&(Z.planAdmin||Z.planModerate))||Q>2);if(w&&w.private&&(!w._users||w._users&&!w._users[x._id]))return a.a.createElement(a.a.Fragment,null);if(A)return a.a.createElement(Ac.a,{cardId:w._id,toTemplate:!w.isTemplate,onComplete:function(){P(!1)}});var ce={title:(null===w||void 0===w?void 0:w.name)||Object(S.w)("$__new",1),icon:(null===w||void 0===w?void 0:w.icon)||w.type&&y&&y.dataType&&y.dataType.filter((function(e){return e.name===w.type}))[0]&&y.dataType.filter((function(e){return e.name===w.type}))[0].icon||"$__topic",iconTitle:"$__".concat(w.type)};if(w._planId&&(null===(o=l.a.getState().db.cards[w._planId])||void 0===o?void 0:o.customColumns)&&(w.type.indexOf("guideline")>-1||w.type.indexOf("objective")||w.type.indexOf("goal"))){var le=JSON.parse(l.a.getState().db.cards[w._planId].customColumns),se=w.type.indexOf("guideline")>-1?"guideline":w.type;le["".concat(se,"s")]&&(ce=Object(p.a)(Object(p.a)(Object(p.a)({},ce),le["".concat(se,"s")].name?{iconTitle:le["".concat(se,"s")].name}:{}),le["".concat(se,"s")].icon?{icon:le["".concat(se,"s")].icon}:{}))}return a.a.createElement(Bc,{ref:J,separator:t.separator||!1,plan:!(!oe||"plan"!==w.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:w.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===w.type||!t.inLine),className:t.noShadow?b.containerNoShadow:b.container,selectable:t.showSelected,selected:w._selected,priority:w.priority&&y.priority.filter((function(e){return String(e.value)===String(w.priority)})).length>0?y.priority.filter((function(e){return String(e.value)===String(w.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onClick:function(e){t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&ae||t.selectable)?ee():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==w.type?t.locked||te():re(w._id):t.onClick(),t.onOpen&&t.onOpen())}},("completed"===w.status||t.cardColorPicker&&G.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&&G.color?G.color:"rgba(0,0,0,1)",opacity:G.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.w)("$__dropHereToLink")),a.a.createElement(Or.a,{private:!(!w.private&&!w.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r})),z(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:ce.title,tooltipText:"".concat(w._parent&&l.a.getState().db.cards[w._parent]?"".concat(l.a.getState().db.cards[w._parent].name," / "):"").concat(ce.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:ce.icon,iconTitle:ce.iconTitle,color:Object(S.d)("medium"),editable:!(w.name||t.onlyOption&&!t.editable),_id:w._id,locked:!("link"!==w.type&&!t.locked),colorPicker:ie&&t.cardColorPicker&&G&&!G.parent?function(e){(!G.color&&e||G.color&&G.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},w._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[w._id]),{},{color:e})))}))}:null,onEdit:"completed"!==w.status&&(Q&&parseInt(Q)>1||Z&&Z.plan&&(Z.owner||Z.planAdmin||Z.planEdit||Z.planModerate))?function(e){t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},w._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[w._id]),{},{name:e})))}))}:null,isExpanded:!t.noExpanded&&oe,noExpanding:t.expanded||l.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!oe),t.expanded||l.a.getState().db.cardsExpanded||L((function(e){return!e}))}}),w&&(w._cardCode||w.value)?a.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},w&&w._cardCode?a.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",w._cardCode):a.a.createElement(a.a.Fragment,null),w&&w.value?a.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",w.value):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),(("insight"===w.type||"link"===w.type)&&w._createdBy&&y.users[w._createdBy._id]||w._createdBy&&w._createdBy.channel&&w._createdBy._id&&w._createdBy._id!==x._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(Kt.a,{title:w._createdBy.name||y.users[w._createdBy._id].name},a.a.createElement(at.a,{alt:w._createdBy.name||y.users[w._createdBy._id].name,src:(null===(i=y.users[w._createdBy._id])||void 0===i?void 0:i.image)||null,size:"12px",style:{width:16,height:16}},(null===(s=w._createdBy)||void 0===s||null===(u=s.name)||void 0===u?void 0:u.substr(0,1))||y.users[w._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.w)("$__createdBy","*")),": ",(null===(d=w._createdBy)||void 0===d||null===(g=d.name)||void 0===g?void 0:g.split(" ")[0])||y.users[w._createdBy._id].name.split(" ")[0]),a.a.createElement("div",null,_()(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"))))),w._kpiTimer&&Object.keys(w._kpiTimer).length>0&&0!==Object.keys(w._kpiTimer).filter((function(e){return w._kpiTimer[e].userId===x._id})).length&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Yt.a,{data:w})),!t.noExpanded&&oe&&(!w.private||w.private&&(B||l.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(Nc.a,Object.assign({},t,{private:!!w.private,expanded:!0,onClick:function(e){},Resume:!0})),a.a.createElement("div",null,t.searchText&&w.description&&a.a.createElement("div",{className:b.description},Object(S.b)(w.description,t.searchText)))):oe?a.a.createElement(a.a.Fragment,null,a.a.createElement(Fc.a,null)):a.a.createElement(a.a.Fragment,null),w.isTemplate?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"}},"completed"!==w.status&&(w.startDate&&_()(w.startDate).isValid()||w.endDate&&_()(w.endDate).isValid())?a.a.createElement("div",{style:Object(p.a)({position:"relative",display:"flex",width:"100%"},oe?{height:"45px"}:{})},a.a.createElement("div",{className:w.endDate&&_()(new Date(1e3*w.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<_()().format("YYYY-MM-DD")&&"completed"!==w.status?b.lateDates:b.dates},w.startDate&&_()(w.startDate).isValid()&&a.a.createElement("div",{className:b.dateInfo},a.a.createElement(wa.a,{overlap:"rectangular",className:b.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*w.startDate)instanceof Date&&!isNaN(new Date(1e3*w.startDate))?_()(new Date(1e3*w.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):_()(w.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),w.endDate&&_()(w.endDate).isValid()?a.a.createElement("div",{className:b.dateInfo},a.a.createElement(wa.a,{overlap:"rectangular",className:b.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*w.endDate)instanceof Date&&!isNaN(new Date(1e3*w.endDate))?_()(new Date(1e3*w.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):_()(w.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null)),w._tags&&w._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{style:t.showTags||oe?{marginBottom:33}:{}},a.a.createElement(dt.a,{options:w._tags,expanded:!!(t.showTags||oe&&"plan"!==w.type&&"link"!==w.type&&"insight"!==w.type)})):a.a.createElement(a.a.Fragment,null),w._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(wa.a,{overlap:"rectangular",className:b.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(S.w)("$__recurrence")).concat(w.recurrenceCreatedDate?": ".concat(_()(w.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(S.w)("$__recurrentActivityFrom"),":",a.a.createElement(e,{db:"cards",data:y.cards[w._recurrenceId],Avatar:!0,ignoreList:!0,onlyOption:!0}))}),w.recurrenceCreatedDate?_()(w.recurrenceCreatedDate).format("DD/MM/YYYY"):""),w._users&&Object.keys(w._users).filter((function(e){return null!==String(e)})).length>0&&(!w._users[x._id]||w._users[x._id]&&Object.keys(w._users).length>1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:oe?37:7}},a.a.createElement("div",{className:b.usersContent},a.a.createElement("div",{className:b.users},a.a.createElement(Dc.a,{_id:w._id,data:w,permission:ie,transparent:!0,myDay:!0,limit:3})))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(a.a.Fragment,null)),w.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(),P(!0)}},a.a.createElement(Ce.a,{text:Object(S.w)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),"completed"===w.status&&a.a.createElement("div",{style:{position:"absolute",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.w)("$__completeDate"),":",Object(S.k)(w.completed_at||w.updated_at))),"plan"!==w.type&&w.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(k.a,{title:Object(S.w)("$__restoreThis",1),text:Object(S.w)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){ne()},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"}}))}));function Yc(e){var t=e.data,r=l.a.getState().db,n=e.statusFilter,o=e.search,i=e.totalTimes,c=a.a.useState({}),s=Object(m.a)(c,2),u=s[0],d=s[1],f=a.a.useState("time"),g=Object(m.a)(f,2),b=g[0],v=g[1];return console.log(o),a.a.createElement(a.a.Fragment,null,a.a.createElement(ge.a,{title:"TOP TAGS ".concat(i?"- (".concat(Object(S.l)(i),")"):""),color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__orderBy".concat(b),icon:"sort",color:"#FFFFFF",onClick:function(){v((function(e){return"time"===e?"count":"time"}))}}]}),a.a.createElement(Hr.a,null,Object.keys(t).filter((function(e){return r.tag.filter((function(t){return t.value===e&&(!o.text||o.text&&t.label.indexOf(o.text)>-1)})).length>0})).sort((function(e,r){if("time"===b){if(t[e].timesInt>t[r].timesInt)return-1;if(t[e].timesInt<t[r].timesInt)return 1}return t[e].TotalCards>t[r].TotalCards?-1:t[e].TotalCards<t[r].TotalCards?1:0})).map((function(e,i){var c,s,f,m,g=r.tag.filter((function(t){return t.value===e}))[0],b=t[e].timesByUser,v=t[e].TotalCards||0;return m=t[e].times||0,a.a.createElement("div",{style:{width:"100%",marginBottom:33},key:"".concat(e,"_").concat(i)},a.a.createElement("div",{style:{border:"solid 1px #d6d6d6",borderLeft:"solid 10px ".concat((null===g||void 0===g?void 0:g.color)||""),borderBottom:"none",borderRadius:5,padding:"3px 5px",width:"100%",alignItems:"center",justifyContent:"space-between",display:"flex"}},a.a.createElement("div",{style:{}},g.label," (",v,")"),a.a.createElement("div",{style:{display:"flex"}},"00:00:00"!==m?a.a.createElement(k.a,{color:u.toptags&&u.toptags[e]&&"timesheet"!==(null===(c=u.toptags[e])||void 0===c?void 0:c.view)?Object(S.d)("lightgray"):Object(S.d)("menu"),icon:"work_history",onClick:function(){d(Object(p.a)(Object(p.a)({},u),{},{toptags:Object(p.a)(Object(p.a)({},u.toptags||{}),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},u.toptags&&u.toptags[e]||{}),{},{view:"timesheet"})))}))},size:"15px",title:"".concat(Object(S.w)("$__workedHours"),": ").concat(m),text:"".concat(Object(S.w)("$__workedHours"),": ").concat(m)}):a.a.createElement(a.a.Fragment,null),a.a.createElement(k.a,{color:u.toptags&&u.toptags[e]&&"activities"===(null===(s=u.toptags[e])||void 0===s?void 0:s.view)?Object(S.d)("menu"):Object(S.d)("lightgray"),icon:"list_alt",onClick:function(){d(Object(p.a)(Object(p.a)({},u),{},{toptags:Object(p.a)(Object(p.a)({},u.toptags||{}),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},u.toptags&&u.toptags[e]||{}),{},{view:"activities"})))}))},size:"15px",title:Object(S.w)("$__viewActivities","*"),text:Object(S.w)("$__viewActivities","*")}))),a.a.createElement("div",{style:{border:"solid 1px #d6d6d6",padding:5,marginTop:-10,paddingTop:15,borderTop:"none",marginLeft:10}},"00:00:00"!==m&&(u.toptags&&u.toptags[e]&&u.toptags[e].view&&"timesheet"===u.toptags[e].view||!u.toptags||u.toptags&&!u.toptags[e]||u.toptags&&u.toptags[e]&&!u.toptags[e].view)?a.a.createElement(a.a.Fragment,null,Object.keys(b).filter((function(e){return b[e]})).sort((function(e,t){return b[e]>b[t]?-1:b[e]<b[t]?1:0})).map((function(e){var t=l.a.getState().db.users[e]||{};return a.a.createElement("div",{key:e,style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(at.a,{alt:t.name,src:t.image||null,style:{width:"18px",height:"18px"}},t.name.substr(0,1))),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu"),width:"33%",minWidth:"150px"}},t.name)),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.l)(b[e])))}))):a.a.createElement(a.a.Fragment,null),u.toptags&&u.toptags[e]&&"activities"===(null===(f=u.toptags[e])||void 0===f?void 0:f.view)?a.a.createElement("div",null,Object.keys(t[e]).map((function(e){var t=Object(et.s)(e);return Object.keys(t).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&r.cards[e].status===n&&(!r.cards[e].checklist||r.cards[e].checklist&&r.cards[e].showCard)&&("completed"===n&&Object(S.k)(r.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*o.startDate).format("YYYY-MM-DD")&&Object(S.k)(r.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*o.endDate).format("YYYY-MM-DD")||"completed"!==n&&Object(S.k)(r.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*o.startDate).format("YYYY-MM-DD")&&Object(S.k)(r.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*o.endDate).format("YYYY-MM-DD"))})).sort((function(e,t){var a="completed"===n?Object(S.k)(r.cards[e].completed_at,"YYYY-MM-DD HH:MM:ss"):Object(S.k)(r.cards[e].updated_at,"YYYY-MM-DD HH:MM:ss"),o="completed"===n?Object(S.k)(r.cards[t].completed_at,"YYYY-MM-DD HH:MM:ss"):Object(S.k)(r.cards[t].updated_at,"YYYY-MM-DD HH:MM:ss");return a>o?-1:a<o?1:0})).map((function(e){return a.a.createElement(a.a.Fragment,{key:"card-".concat(e)},a.a.createElement(zc,{db:"cards",data:l.a.getState().db.cards[e],noShadow:!0,resume:!0}))}))}))):a.a.createElement(a.a.Fragment,null)))}))))}function Rc(e){var t,r=e.type,n=e.text,o=e.tags,i=e.tagsChartMount,c=l.a.getState().db,s=window.location.hash.split("/");s[0]=s[0].replace("#",""),36!==s[0].length&&(s[0]=null);var u={};return(null===(t=c.cards[s[0]])||void 0===t?void 0:t.customColumns)&&(u=JSON.parse(c.cards[s[0]].customColumns)),a.a.createElement(a.a.Fragment,null,o&&Object.keys(o).filter((function(e){return o[e].label.indexOf(n)>-1})).length>0?a.a.createElement(Sn.a,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement(Gr.a,null,a.a.createElement(Or.a,{title:u[r]&&u[r].name?u[r].name:Object(S.w)("$__".concat(r),1),color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wr.a,null,Object.keys(o).filter((function(e){return o[e].label.indexOf(n)>-1})).sort((function(e,t){return o[e].label.toUpperCase().trim()<o[t].label.toUpperCase().trim()?-1:o[e].label.toUpperCase().trim()>o[t].label.toUpperCase().trim()?1:0})).forEach((function(e){var t,r,n={};if(c.status.forEach((function(e){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.value,0))})),i&&i[e]&&i[e].TotalCards)return a.a.createElement("div",{style:{width:"100%",marginBottom:7},key:e},a.a.createElement("div",{style:{backgroundColor:(null===(t=o[e])||void 0===t?void 0:t.color)||"none",color:(null===(r=o[e])||void 0===r?void 0:r.color)?Object(S.u)(o[e].color,!0):"none",borderRadius:5,padding:"3px 5px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",null,o[e].label," (",i[e].TotalCards,")")))}))))):a.a.createElement(a.a.Fragment,null))}function Gc(){Gc=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Hc=Object(u.b)((function(e){return{cards:e.db.cards,tags:e.db.tags,searchs:e.searchs,timelines:e.timelines}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){r()}),[]);var r=function(){var t=Object(f.a)(Gc().mark((function t(){return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[n[0]],db:"cards",type:"timer",reqChildrens:!0});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),n=window.location.hash.split("/");n[0]=n[0].replace("#",""),36!==n[0].length&&(n[0]=null);var o=Object(et.s)(n[0]),i={guidelines:{},objectives:{},goals:{},actions:{}},c={};Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&t.cards[e].type.indexOf("guideline")>-1&&!t.cards[e].deleted})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{guidelines:Object(p.a)(Object(p.a)({},i.guidelines||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{guidelines:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.guidelines)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&"objective"===t.cards[e].type&&!t.cards[e].deleted})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{objectives:Object(p.a)(Object(p.a)({},i.objectives||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{objectives:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.objectives)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&t.cards[e].type.indexOf("goal")>-1&&!t.cards[e].deleted})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{goals:Object(p.a)(Object(p.a)({},i.goals||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{goals:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.goals)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&!t.cards[e].deleted&&("iniciative"===t.cards[e].type||"task"===t.cards[e].type||"meeting"===t.cards[e].type||"iniciative"===t.cards[e].type||"myTask"===t.cards[e].type)&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{actions:Object(p.a)(Object(p.a)({},i.actions||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{actions:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.actions)||{}),{},Object(h.a)({},e,!0))})}))}));var s={},u=[],d=[],m=[],g={};Object.keys(c).forEach((function(e){g=Object(p.a)(Object(p.a)({},g),c[e])}));var b=new Date,v=new Date,y=_()(b).unix("X");b=b.toISOString().split("T")[0],v.setDate(v.getDate()-30);var x=_()(v).unix("X");v=v.toISOString().split("T")[0];var w=e.searchs["tagsStatistics_".concat(n[0])]||{text:"#4",startDate:x,endDate:y},O=new Date(1e3*w.startDate||w.startDate),j=new Date(1e3*w.endDate||w.endDate),E="completed";w&&w.status&&Object.keys(w.status).length>0&&Object.keys(w.status).forEach((function(e){w.status[e]&&(E=e)}));for(var k,L=E,C=function(){var e=O.toISOString().split("T")[0],r={};Object.keys(o).filter((function(r){return t.cards[r].status===L&&Object(S.k)(t.cards[r]["completed"===L?"completed_at":"updated_at"],"YYYY-MM-DD")===e})).forEach((function(e){var n=t.cards[e],a=Object(et.s)(e);Object.keys(a).filter((function(e){return"completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD")})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).length>0&&t.cards[e]._tags.filter((function(e){return e.value&&(!w.text||w.text&&e.label.indexOf(w.text)>-1)})).forEach((function(e){var t;r=Object(p.a)(Object(p.a)({},r),{},(t={},Object(h.a)(t,"".concat(e.label),r["".concat(e.label)]+1||1),Object(h.a)(t,"".concat(e.label,"Color"),e.color||null),t)),-1===m.indexOf(e.label)&&m.push(e.label)})),n._tags&&n._tags.filter((function(e){return e.value})).length>0&&n._tags.filter((function(e){return e.value&&(!w.text||w.text&&e.label.indexOf(w.text)>-1)})).forEach((function(e){var t;r=Object(p.a)(Object(p.a)({},r),{},(t={},Object(h.a)(t,"".concat(e.label),r["".concat(e.label)]+1||1),Object(h.a)(t,"".concat(e.label,"Color"),e.color||null),t)),-1===m.indexOf(e.label)&&m.push(e.label)}))}))})),Object.keys(r).length>0&&d.push(Object(p.a)({date:e},r)),k=O.setDate(O.getDate()+1),O=new Date(k)};O<=j;)C();Object.keys(o).filter((function(e){return t.cards[e].status===L&&("completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD"))})).forEach((function(e){var r=Object(et.s)(e),n=t.cards[e];Object.keys(r).filter((function(e){return(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&("completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD"))})).forEach((function(r){t.cards[e]._tags.forEach((function(e){var n,a,o,i;s=Object(p.a)(Object(p.a)({},s),{},Object(h.a)({},e.value,Object(p.a)(Object(p.a)({},s[e.value]||{}),{},Object(h.a)({},r,{date:"completed"===L?Object(S.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(S.k)(t.cards[r].updated_at,"YYYY-MM-DD"),dateStamp:"completed"===L?(null===(n=t.cards[r])||void 0===n||null===(a=n.completed_at)||void 0===a?void 0:a.low)||t.cards[r].completed_at||null:(null===(o=t.cards[r])||void 0===o||null===(i=o.updated_at)||void 0===i?void 0:i.low)||t.cards[r].updated_at||null}))))})),n._tags&&n._tags.filter((function(e){return e.value})).length>0&&n._tags.forEach((function(e){var n,a,o,i;s=Object(p.a)(Object(p.a)({},s),{},Object(h.a)({},e.value,Object(p.a)(Object(p.a)({},s[e.value]||{}),{},Object(h.a)({},r,{date:"completed"===L?Object(S.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(S.k)(t.cards[r].updated_at,"YYYY-MM-DD"),dateStamp:"completed"===L?(null===(n=t.cards[r])||void 0===n||null===(a=n.completed_at)||void 0===a?void 0:a.low)||t.cards[r].completed_at||null:(null===(o=t.cards[r])||void 0===o||null===(i=o.updated_at)||void 0===i?void 0:i.low)||t.cards[r].updated_at||null}))))}))}))})),Object.keys(s).forEach((function(e){var r=[],n={},a={};Object.keys(s[e]).forEach((function(t){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},"".concat(s[e][t].date," "),n["".concat(s[e][t].date," ")]+1||1)),a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e,a[e]+1||1))})),Object.keys(n).forEach((function(e){r.push({x:e,y:n[e]})}));for(var o,i=new Date(v),c=function(){var e=i.toISOString().split("T")[0];0===r.filter((function(t){return t.x===e})).length&&r.push({x:e,y:0}),o=i.setDate(i.getDate()+1),i=new Date(o)};i<=new Date(b);)c();t.tag.filter((function(t){return t.value===e})).length>0&&(u=[].concat(Object(A.a)(u),[{id:t.tag.filter((function(t){return t.value===e})).map((function(e){return e}))[0].label,data:Array.from(Object(A.a)(r.sort((function(e,t){return Date.parse(e.x)<Date.parse(t.x)?-1:Date.parse(e.x)>Date.parse(t.x)?1:0}))))}]))}));var I=0;return Object.keys(s).filter((function(e){return t.tag.filter((function(t){return t.value===e})).length>0})).sort((function(e,t){return Object.keys(s[e]).length>Object.keys(s[t]).length?-1:Object.keys(s[e]).length<Object.keys(s[t]).length?1:0})).forEach((function(e,r){var n=0,a={},o=s[e].total||0;Object.keys(s[e]).forEach((function(e){if(l.a.getState().timeline&&l.a.getState().timeline[e]){var r=l.a.getState().timeline[e];Object.keys(r).filter((function(e){return"timer"===r[e].type&&r[e].ini>=w.startDate&&r[e].fin<=w.endDate})).forEach((function(e){var t=1;r[e]&&r[e].users&&r[e].users.filter((function(e){return e._id})).length>0?t=r[e].users.filter((function(e){return e._id})).length:a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},r[e].user._id,a[r[e].user._id]+1||1));var o=(r[e].fin-r[e].ini)*t;n+=o,r[e]&&r[e].users&&r[e].users.filter((function(e){return e._id})).length>0?r[e].users.filter((function(e){return e._id})).forEach((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e._id,a[e._id]+o||o))})):a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},r[e].user._id,a[r[e].user._id]+o||o))}))}var i=Object(et.s)(e);o+=Object.keys(i).filter((function(e){return t.cards[e]&&!t.cards[e].deleted&&t.cards[e].status===L&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&("completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*w.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*w.endDate).format("YYYY-MM-DD"))})).length})),I+=n,s[e]=Object(p.a)(Object(p.a)({},s[e]),{},{times:Object(S.l)(n),timesInt:n,TotalCards:o,timesByUser:a})})),a.a.createElement(N.a,null,a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12},a.a.createElement(ei.a,{nodeId:"tagsStatistics_".concat(n[0]),defaultValues:{startDate:x,endDate:y,text:"#4",status:{all:!1,notStarted:!1,awaitAction:!1,paused:!1,inProgress:!1,completed:!0}},preffers:{searchButton:!0,unique:{status:!0}},fields:["text","date","status"],showFilters:!0})),a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,style:{minHeight:300,height:35*d.length}},a.a.createElement(Tc,{data:d,keys:m}))),a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12},a.a.createElement(Gr.a,null,a.a.createElement(Yc,{data:s,statusFilter:L,startDate:x,search:w,totalTimes:I})))),a.a.createElement(Rr.a,null,a.a.createElement(Rc,{tagsChartMount:s,tags:i.guidelines,cards:c.guidelines,type:"guidelines",text:"#1"}),a.a.createElement(Rc,{tagsChartMount:s,tags:i.objectives,cards:c.objectives,type:"objectives",text:"#2"}),a.a.createElement(Rc,{tagsChartMount:s,tags:i.goals,cards:c.goals,type:"goals",text:"#3"}),a.a.createElement(Rc,{tagsChartMount:s,tags:i.actions,cards:c.actions,type:"actions",text:"#4"})))})),Wc=function(){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}};var Uc=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Wc)((function(){var e=l.a.getState(),t=e.db,r=e.search,n=a.a.useState(0),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(25),u=Object(m.a)(s,2),d=u[0],p=u[1],f=window.location.hash.split("/");f[0]=f[0].replace("#","");var h={};return h=36===f[0].length?(h=Object.keys(t.cards).filter((function(e){return t.cards[e]._parent&&t.cards[e]._parent===f[0]&&"insight"===t.cards[e].type&&!t.cards[e].deleted})).sort((function(e,r){return t.cards[e].created_at>t.cards[r].created_at?-1:0})).map((function(e){return t.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(r.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1})).map((function(e){return e})):(h=Object.keys(t.cards).filter((function(e){return!t.cards[e]._parent&&"insight"===t.cards[e].type})).sort((function(e,r){return t.cards[e].created_at>t.cards[r].created_at?-1:0})).map((function(e){return t.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(r.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1})).map((function(e){return e})),a.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(h).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.w)("$__page")," ",i+1," ",Object(S.w)("$__of")," ",Math.ceil(Object.keys(h).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:Object.keys(h).length,page:i,onChangePage:function(e,t){c(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__insightsPerPage")}))),a.a.createElement(Rr.a,null,Object.keys(h).filter((function(e,t){return t<=(i+1)*d&&t>=i*d})).map((function(e,t){return a.a.createElement(Sn.a,{key:h[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:h[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(h).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.w)("$__page")," ",i+1," ",Object(S.w)("$__of")," ",Math.ceil(Object.keys(h).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:Object.keys(h).length,page:i,onChangePage:function(e,t){c(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__insightsPerPage")}))))}))),qc={container:Object(p.a)(Object(p.a)({},Z.k),{},{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 Vc,Jc,Xc=Object(le.a)(qc)(Object(n.memo)((function(e){var t=e.data,r=l.a.getState().db,n=[],o=r.cards,i=function(e,t){if(!t.isDropAnimating)return Object(p.a)({},e);var r=t.dropAnimation.moveTo,n="translate(".concat(r.x,"px, ").concat(r.y,"px)");return Object(p.a)(Object(p.a)({},e),{},{clear:"both",transition:"all 0.1s ease",transform:"".concat(n," ").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(ar.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(ut.a,{cardId:e.data._id,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 Kc,Zc=j.b.div(Vc||(Vc=Object(d.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                ")})),Qc=j.b.div(Jc||(Jc=Object(d.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                "})),el=Object(u.b)((function(e){return{searchs:e.searchs,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(qo)((function(e){var t=l.a.getState().session,r=e.classes,n=v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),o=e.searchs&&e.searchs[n]?e.searchs[n]:null,i=window.location.hash.split("/");i[0]=i[0].replace("#",""),36!==i[0].length&&(i[0]=null);var c=e.cards;o&&(c=Object(et.q)(c,o));var s=String(t.dashboard.period).replace("$__last","");s=s.replace("Days","");var u=_()(new Date).tz("America/Sao_Paulo").subtract(parseInt(s),"d").format("YYYY-MM-DDT00:00"),d=_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(c=c.filter((function(e){return!!("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")<=d&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u||e.completed_at&&!e.completed_at.low&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=d&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u)||"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")<=d&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u||e.updated_at&&!e.updated_at.low&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=d&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u))})).map((function(e){return e}))),e.showDeleted||l.a.getState().controls.deleted||(c=c.filter((function(e){return!e.deleted})).map((function(e){return e})));var f=r.cardList+" "+x()(Object(h.a)({},r.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1)),m=Object(S.w)(e.column.name,1),g={};return l.a.getState().db.cards[i[0]]&&l.a.getState().db.cards[i[0]].customColumns&&(g=JSON.parse(l.a.getState().db.cards[i[0]].customColumns)),g&&g[e.column.name.replace("$__","")]&&g[e.column.name.replace("$__","")].name&&(m=Object(S.w)(g[e.column.name.replace("$__","")].name,1)),a.a.createElement(ar.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){var n,o;return a.a.createElement(Zc,Object.assign({},!e.isDropDisabled&&r.draggableProps,e,{ref:r.innerRef}),a.a.createElement("div",Object.assign({},r.draggableProps,r.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&r.dragHandleProps,a.a.createElement(ge.a,Object.assign({title:m,icon:(null===(n=g[e.column.name.replace("$__","")])||void 0===n?void 0:n.icon)?null===(o=g[e.column.name.replace("$__","")])||void 0===o?void 0:o.icon:e.column.icon||"topic",color:Object(S.d)("menu"),style:{padding:"7px"}},i.length>0&&i[1]&&"overview"===i[1]&&l.a.getState().db.cards[i[0]]&&l.a.getState().db.cards[i[0]].planType&&"operational"===l.a.getState().db.cards[i[0]].planType&&l.a.getState().db.cards[i[0]]._users&&l.a.getState().db.cards[i[0]]._users[t._id]&&l.a.getState().db.cards[i[0]]._users[t._id].access&&parseInt(l.a.getState().db.cards[i[0]]._users[t._id].access)>3?{editable:!0,onEdit:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:i[0]}}),{customColumns:JSON.stringify(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[i[0]]&&l.a.getState().db.cards[i[0]].customColumns?JSON.parse(l.a.getState().db.cards[i[0]].customColumns):{}),{},Object(h.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(S.w)("$__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(ar.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(Qc,Object.assign({className:f,ref:t.innerRef},t.droppableProps,{isDraggingOver:r.isDraggingOver,inLine:e.inLine},e),c.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){return t?a.a.createElement("div",{key:t._id||t.id?t._id:null},a.a.createElement(Xc,{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})):a.a.createElement(a.a.Fragment,null)})),e.inLineAdd&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ce.a,{text:Object(S.w)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:i[0]?i[0]:null,rows:c.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))}))})));function tl(){tl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var rl,nl=j.b.div(Kc||(Kc=Object(d.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                ")})),al=Object(u.b)((function(e,t){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(f.a)(tl().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,v;return tl().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l.a.getState().functions.socket,o=n.destination,i=n.source,c=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,d=o.droppableId,f=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!==d||l.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,c),m.forEach((function(e,t){s[e]=Object(p.a)(Object(p.a)({},s[e]),{},{order:{low:t}})})),g=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:f.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.status===d})).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,c),f.forEach((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),b.forEach((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),v=Object(p.a)(Object(p.a)({},t),{},{cards:Object(p.a)(Object(p.a)({},t.cards),{},Object(h.a)({},c,Object(p.a)(Object(p.a)({},t.cards[c]),{},{status:d,completed_at:"completed"===d?{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(p.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:f});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(f.a)(tl().mark((function e(t){return tl().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(f.a)(tl().mark((function e(t){return tl().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(ar.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(nl,Object.assign({},e,{ref:t.innerRef}),l.a.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(el,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(p.a)(Object(p.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(p.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"}}))})))})),ol=r(1894),il=r(2025),cl=r(2026),ll=r(2024),sl=r(1227);function ul(e){var t=e.open,r=e.onClose;return a.a.createElement(sl.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&a.a.createElement(ll.a,{id:"simple-dialog-title"},e.title),a.a.createElement(K.a,null,e.options.map((function(e,t){return a.a.createElement(ol.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},a.a.createElement(il.a,null,a.a.createElement(re.a,{icon:e.icon})),a.a.createElement(cl.a,{primary:Object(S.w)(e.name,1)}))}))))}function dl(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce.a,{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(ul,{selectedValue:l,open:n,onClose:function(){var e;o(!1),s(e)},options:e.options}))}function pl(){pl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var fl,hl=j.b.div(rl||(rl=Object(d.a)(["\n                    background-color:none;\n                    "]))),ml=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=l.a.getState().functions.socket,i=a.a.useState(e.defaultName?e.defaultName:""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),g=Object(m.a)(d,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(f.a)(pl().mark((function t(){var r;return pl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=l.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(f.a)(pl().mark((function e(t){return pl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("card.UPD",{cardId:t.id,cardData:Object(p.a)(Object(p.a)({},t.data),{},{_parent:y[0],_timeline:Object(h.a)({},t.log._id,Object(p.a)(Object(p.a)({},t.log),{},{_parent:[t.id]})),_users:Object(h.a)({},n._id,{name:l.a.getState().db.users[n._id].name?l.a.getState().db.users[n._id].name:null,displayName:l.a.getState().db.users[n._id].displayName?l.a.getState().db.users[n._id].displayName:null,image:l.a.getState().db.users[n._id].image?l.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)}}(),w=function(){var t=Object(f.a)(pl().mark((function t(n){var a,i,c,s,u;return pl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,i=n.source,c=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,c),Fe.a.put("cards/reorder",{cards:s}),u={},s.map((function(e,t){return(u=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},e,r.cards[e])))[e].order||(u[e].order.low=t),u[e].order.low=t,!0})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.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)}}(),_=function(){var e=Object(f.a)(pl().mark((function e(t){return pl().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(f.a)(pl().mark((function e(t){return pl().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(ar.a,{onDragEnd:w,onDragStart:_,onDragUpdate:O},a.a.createElement(ar.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,r){return a.a.createElement(hl,Object.assign({},t.droppableProps,{isDraggingOver:r.isDraggingOver,ref:t.innerRef}),e.cards.map((function(e,t){return a.a.createElement(ar.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(ut.a,{isDragging:r.isDragging&&!r.isDropAnimating,snapshot:r,cardId: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(Ce.a,{text:Object(S.w)("$__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(_e.a,{label:Object(S.w)("$__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.w)("$__titleOfCard_placeholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return x()}},a.a.createElement(re.a,{color:"green",icon:"save",title:Object(S.w)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){v(!b),u("")}},a.a.createElement(re.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.w)("$__cancel","*"),size:e.actionsSize||"25px"}))))))}));function gl(){gl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var bl=j.b.div(fl||(fl=Object(d.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                ")})),vl=Object(u.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){Object(et.H)(e)}),[]);var r=function(){var r=Object(f.a)(gl().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,v,y;return gl().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l.a.getState().functions.socket,o=n.destination,i=n.source,c=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,d=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(f=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),f.splice(o.index,0,c),m={},f.forEach((function(e,r){m[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:r}})})),g=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t.cards),m)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:f,columnName:"type",sourceCards:[]}),r.abrupt("return");case 21:d.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})))).splice(o.index,0,c),v=Object(p.a)({},t.cards),d.forEach((function(e,t){v=Object(p.a)(Object(p.a)({},v),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},v[e]?v[e]:{}),{},{order:{low:t}})))})),b.forEach((function(e,t){v=Object(p.a)(Object(p.a)({},v),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},v[e]?v[e]:{}),{},{order:{low:t}})))})),y=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},v),{},Object(h.a)({},c,Object(p.a)(Object(p.a)({},v[c]),{},{type:u,order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},y)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"type",sourceCards:d});case 30:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement(ar.a,{onDragEnd:r},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return a.a.createElement(bl,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(el,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(p.a)(Object(p.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 yl=Object(u.b)((function(e,t){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=l.a.getState().db,n=r.dataType,o=r.cards,i=window.location.hash.split("/");i[0]=i[0].replace("#",""),i[0]&&36!==i[0].length&&(i[0]=null),a.a.useEffect((function(){y()}),[]);var c={};Object.keys(r.cards).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&(r.cards[e]._planId===i[0]||r.cards[e]._parent===i[0])})).forEach((function(e){c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},e,r.cards[e]))}));var s,u=Object.keys(c).filter((function(e){return!0===c[e]._selected&&c[e].type&&c[e].type.indexOf("guideline")>-1&&c[e]._parent===i[0]}))[0]||null,d=Object.keys(c).filter((function(e){return!0===c[e]._selected&&c[e].type&&"objective"===c[e].type}))[0]||null,f=Object.keys(c).filter((function(e){return!0===c[e]._selected&&c[e].type&&"goal"===c[e].type}))[0]||null,m=Object.keys(c).filter((function(e){return"guidelineR"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),g=Object.keys(c).filter((function(e){return"guidelineC"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),b=Object.keys(c).filter((function(e){return"guidelineE"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),v=Object.keys(c).filter((function(e){return"guidelineD"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),y=function(){var t=Object(p.a)({},l.a.getState().db.cards);Object.keys(c).forEach((function(e){c[e]&&c[e]._selected&&(c[e]._selected=!1)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t),c)}))};f?s=Object.keys(c).filter((function(e){return c[e]._parent===f&&!c[e].checklist})):d?s=Object.keys(c).filter((function(e){return c[e]._parent===d&&!c[e].checklist})):u&&(s=Object.keys(c).filter((function(e){return c[e]._parent===u&&!c[e].checklist})));var x=Object.keys(c).filter((function(e){return c[e]._parent===i[0]})),w=c&&Object.keys(c).filter((function(e){return c[e]&&c[e]._selected&&c[e].type&&c[e].type.indexOf("guideline")>-1}));return a.a.createElement("div",{style:{width:"inherit",padding:15}},!d&&a.a.createElement(a.a.Fragment,null,a.a.createElement(X.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.w)("$__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.w)("$__externalAspects",1))),a.a.createElement(X.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.w)("$__s.W.O.T","*"))),a.a.createElement(vl,{cards:x.map((function(e){return c[e]})),showSelected:Object.keys(c).filter((function(e){return!0===c[e]._selected})).length>0,lockColumns:w.length>0&&"guidelineD"===c[w[0]].type?["strength","threat"]:w.length>0&&"guidelineR"===c[w[0]].type?["strength","opportunity"]:w.length>0&&"guidelineE"===c[w[0]].type?["weakness","threat"]:w.length>0&&"guidelineC"===c[w[0]].type?["weakness","opportunity"]:null,columnStyle:{minWidth:"calc(25% - 14px)"},showOrder:!0,inLineAdd:!0})),a.a.createElement(Rr.a,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(re.a,{icon:Ht.a,color:Object(S.d)("textColor"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},u?Object(S.w)("$__planning",1):"MATRIX SWOT"))),u?a.a.createElement(a.a.Fragment,null,a.a.createElement(Sn.a,{md:3,sm:12,xs:12},a.a.createElement("div",null,a.a.createElement(ge.a,{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&&o[u]&&o[u].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(ut.a,{data:o[u],db:"cards",selectOption:!0,expanded:!0}),a.a.createElement(Ce.a,{icon:"undo",text:Object(S.w)("$__backToMatrix","*"),onClick:function(){y("guideline")}})),d&&a.a.createElement("div",null,a.a.createElement(ge.a,{title:Object(S.w)("$__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&&o[d]&&o[d].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(ut.a,{data:o[d],db:"cards",selectOption:!0,expanded:!0})),f&&a.a.createElement("div",null,a.a.createElement(ge.a,{title:Object(S.w)("$__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(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"goal"===e.name}))[0].iniModule,db:"cards",data:{type:"goal",_parent:d,status:"notStarted"}}))}}]}),e.hidePrivate&&o[f]&&o[f].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(ut.a,{data:o[f],db:"cards",selectOption:!0,expanded:!0}))),a.a.createElement(Sn.a,{md:9,sm:12,xs:12},a.a.createElement(ge.a,{title:d&&!f?Object(S.w)("$__goals",1):d?Object(S.w)("$__actions",1):Object(S.w)("$__objectives",1),icon:d&&!f?n.filter((function(e){return"goal"===e.name}))[0].icon:d?"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:[f?{component:a.a.createElement(dl,{iconColor:Object(S.d)("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:Object(S.w)("$__".concat(t.name),1),onClick:function(){return e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",db:"cards",data:{type:t.name,_parent:f,status:"notStarted"}}))}}}))})}:{title:"$__new",icon:"add_box",color:Object(S.d)("color"),actionsSize:"22px",show:!0,onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"objective"===e.name}))[0].iniModule,db:"cards",data:d?{type:"goal",_parent:d,status:"notStarted"}:{type:"objective",_parent:u,status:"notStarted"}}))}}]}),a.a.createElement(al,{cards:(null===(t=s)||void 0===t?void 0:t.map((function(e){return c[e]})))||[],viewButton:!0}))):a.a.createElement(Sn.a,{md:12},a.a.createElement(Rr.a,{style:{paddingBottom:"33px"}},a.a.createElement(Sn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.w)("$__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.w)("$__guidelineRtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.w)("$__guidelineRdetails",1))),a.a.createElement(ml,{cards:m,cardType:"guidelineR"})),a.a.createElement(Sn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.w)("$__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.w)("$__guidelineDtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.w)("$__guidelineDdetails",1))),a.a.createElement(ml,{cards:v,cardType:"guidelineD"})),a.a.createElement(Sn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.w)("$__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.w)("$__guidelineCtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.w)("$__guidelineCdetails",1))),a.a.createElement(ml,{cards:g,cardType:"guidelineC"})),a.a.createElement(Sn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.w)("$__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.w)("$__guidelineEtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.w)("$__guidelineEdetails",1))),a.a.createElement(ml,{cards:b,cardType:"guidelineE"}))))))}));function xl(){xl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var wl,_l=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=l.a.getState().db,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object(n.useState)(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],v=Object(n.useState)(0),y=Object(m.a)(v,2),x=y[0],w=y[1],_=Object(n.useState)({index:0}),O=Object(m.a)(_,2),j=O[0],E=O[1],k=Object(n.useState)({status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},users:[],tags:[],priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},prioritySelected:"normal",statusSelected:{color:"#929497",icon:"query_builder",label:"",value:null},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}}),L=Object(m.a)(k,2),C=L[0],I=L[1];console.log(C);var T,D=function(){var t=Object(f.a)(xl().mark((function t(r,n){return xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return 1,!1,console.log(e,r,1,n,!1),t.next=5,Object(ke.b)(e,r,1,n,!1);case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();return console.log(C),a.a.createElement("div",{style:{marginTop:"610px"}},a.a.createElement("div",null,a.a.createElement("p",{style:{marginTop:"2px",height:"60px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",borderBottom:"1px solid #d1d1cf",fontSize:"16px"}},a.a.createElement(re.a,{size:"25px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"edit"),Object(S.w)("$__MultipleEdit")),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(re.a,{onClick:function(t){e.handleCardsUpdate(!0),e.handleClose()},style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"20px",right:"15px",top:"13px",color:"grey"},size:"30px"},"close"))),a.a.createElement("p",{style:{marginLeft:"25px",fontWeight:"bold",marginTop:"30px"}},"   ",Object(S.w)("$__AddUsers")+":"),a.a.createElement("div",{style:{marginLeft:"30px"}},a.a.createElement(Ec.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:l.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!0,onSelect:function(e){console.log(e),console.log(null===C||void 0===C?void 0:C.users),I(Object(p.a)(Object(p.a)({},C),{},{users:Object(A.a)(e)}))},selected:null===C||void 0===C?void 0:C.users,transparent:!0})),a.a.createElement("div",{style:{width:"490px",marginTop:"5px",marginLeft:"25px"}},a.a.createElement($t.a,{options:l.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:C.tags,placeholder:Object(S.w)("$__tags"),onChange:function(e){console.log(e),I(Object(p.a)(Object(p.a)({},C),{},{tags:Object(A.a)(e)}))}})),a.a.createElement("div",{style:{width:"490px",marginTop:"15px",marginLeft:"25px"}},a.a.createElement(Be.a,{id:"combo-box-demo",options:r.status,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"status",value:C.statusSelected,disableClearable:!0,placeholder:Object(S.w)("$__status"),renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__status",1),variant:Object(S.d)("fieldVariant"),value:r.status[0]}))},onChange:function(e,t){I(Object(p.a)(Object(p.a)({},C),{},{statusSelected:Object(p.a)({},t)}))}}),(T="priority",a.a.createElement(Ur.a,{style:{width:"100%"},expanded:!0},a.a.createElement(Vr.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(re.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.w)("$__".concat(T))),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(C[T]).filter((function(e,t){return C[T][e]&&"all"!==e})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.w)(r.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:r.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(qr.a,{style:{minWidth:"100%"}},a.a.createElement(Kr.a,{style:{width:"100%"}},r.priority.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:t},a.a.createElement(Xr.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:a.a.createElement(zr.a,{color:"default",checked:t===j.index,onChange:function(){E({index:t}),I(Object(p.a)(Object(p.a)({},C),{},{prioritySelected:e.value}))}}),label:Object(S.w)(e.label)}))}))))))),a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},c?a.a.createElement("div",{style:{marginBottom:"30px",marginTop:"30px",display:"flex",fontWeight:"bold"}},a.a.createElement(be.a,null),a.a.createElement("div",{style:{marginLeft:"16px",marginTop:"3px"}}," ","".concat(x," / ").concat(e.cards.length))):a.a.createElement("button",{onClick:function(){e.cards.forEach(function(){var t=Object(f.a)(xl().mark((function t(r,n,a){var o,i,c,s;return xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(l.a.getState().db.cards[r]),console.log(Object(p.a)(Object(p.a)({},null===(o=l.a.getState().db.cards[r])||void 0===o?void 0:o._users),C.users)),(null===C||void 0===C?void 0:C.users)&&C.users.forEach((function(e){D(e,r)})),(null===C||void 0===C||null===(i=C.statusSelected)||void 0===i?void 0:i.value)&&(console.log("passed status"),Object(et.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:r}}),{status:C.statusSelected.value})),t.next=6,Object(et.P)(e,[{_id:r,priority:C.prioritySelected,_tags:[].concat(Object(A.a)(null===(c=l.a.getState().db.cards[r])||void 0===c?void 0:c._tags),Object(A.a)(C.tags))}]);case 6:(s=t.sent)&&(w((function(e){return e+1})),console.log(s)),n===a.length-1&&setTimeout((function(){e.handleClose(),e.handleCardsUpdate(!0)}),1e3);case 9:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),s(!0)},onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},style:(t={minWidth:"140px",height:"40px",cursor:"pointer",fontWeight:"bold",border:"1px solid #d1d1cf"},Object(h.a)(t,"fontWeight","bolder"),Object(h.a)(t,"marginBottom","30px"),Object(h.a)(t,"marginTop","30px"),Object(h.a)(t,"backgroundColor",g?"rgba(0, 0, 0, 0.1)":"white"),t)},Object(S.w)("$__conclude"))))})),Ol=Object(u.b)((function(e,t){return{controls:e.controls,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({checkSelectedCards:[],childrenChecked:[]}),r=Object(m.a)(t,2),o=r[0],i=r[1],c=a.a.useState(!1),s=Object(m.a)(c,2),u=s[0],d=s[1];Object(n.useEffect)((function(){i(e.selectCards)}),[e.selectCards]),console.log(o.childrenChecked.map((function(e){return l.a.getState().db.cards[e]})));return a.a.createElement("div",null,o.checkSelectedCards.length>0&&a.a.createElement("div",{style:{width:"100vw",display:"flex",justifyContent:"center",height:"60px",position:"fixed",top:"0px",backgroundColor:"#eeeeee",borderBottom:"1px solid #d1d1cf",opacity:"1",zIndex:"50"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"-300px",position:"relative"}},a.a.createElement("p",{style:{position:"absolute",left:"-197px",top:"20px",fontWeight:"bold",fontSize:"16px"}},Object(S.w)("$__selectedActivities")," ",[].concat(Object(A.a)(e.selectCards.checkSelectedCards),Object(A.a)(e.selectCards.childrenChecked)).length),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginLeft:"10px",cursor:"pointer"},onMouseOver:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseOut:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0)"},onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{selectedCards:o.checkSelectedCards})),i({checkSelectedCards:[],childrenChecked:[]}),e.handleState(),e.handleCheckBoxState()}},a.a.createElement(re.a,{title:Object(S.w)("$__move"),style:{width:"40px",height:"40px"},size:30},"send")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginLeft:"10px",cursor:"pointer"},onMouseOver:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseOut:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0)"},onClick:function(){d(!0),e.handleCardsUpdate(!1)}},a.a.createElement(re.a,{title:"edit",size:30,style:{width:"40px",height:"40px"}},"edit")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginLeft:"10px",cursor:"pointer"},onMouseOver:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseOut:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0)"},onClick:function(){!function(){var t=[].concat(Object(A.a)(o.checkSelectedCards),Object(A.a)(o.childrenChecked));Object(S.c)({message:"Excluir atividades",variant:"warning",persist:!0,horizontal:"right",confirm:function(){t.forEach((function(t){Object(et.o)(e,{_id:t},!1),Object(S.f)(e,{_id:t},!1)})),e.reduxFunction("ASYNC","CLEAR_MODULE"),i({checkSelectedCards:[],childrenChecked:[]}),Object(S.c)({message:"Atividades excluidas",variant:"info",persist:!1,horizontal:"right",confirm:null}),e.handleState()}})}()}},a.a.createElement(re.a,{title:Object(S.w)("$__deleteCards"),size:30,style:{width:"40px",height:"40px",color:"red"}},"delete")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginLeft:"10px",cursor:"pointer"},onMouseOver:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseOut:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0)"},onClick:function(){Object(S.c)({message:"Adicionar atividades ao meu dia? ",variant:"info",persist:!0,horizontal:"right",confirm:function(){var t=l.a.getState().session._id;[].concat(Object(A.a)(o.checkSelectedCards),Object(A.a)(o.childrenChecked)).forEach((function(r){Object(et.J)(e,{_id:r,userId:t,option:!0})})),Object(S.c)({message:"Atividades adicionadas ao meu dia",variant:"info",persist:!1,horizontal:"right",confirm:null})}})}},a.a.createElement(re.a,{title:Object(S.w)("$__addMyDay"),size:30,style:{width:"40px",height:"40px",color:"lightblue"}},"alarm_add")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginLeft:"10px",cursor:"pointer"},onMouseOver:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseOut:function(e){return e.target.style.backgroundColor="rgba(0, 0, 0, 0)"},onClick:function(){i({checkSelectedCards:[],childrenChecked:[]}),e.handleState()}},a.a.createElement(re.a,{title:Object(S.w)("$__cancel"),size:30,style:{width:"40px",height:"40px",color:"grey"}},"close")))),u&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{onClick:function(e){d((function(e){return!e})),e.stopPropagation()},style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",backdropFilter:"blur(2px)",zIndex:98}}),a.a.createElement("div",{style:{position:"absolute",borderRadius:"5px",left:"calc(50% - 65px)",transform:"translate(-50%, -50%)",backgroundColor:"white",width:"540px",zIndex:99}},a.a.createElement(_l,{handleCardsUpdate:function(t){return e.handleCardsUpdate(t)},cards:[].concat(Object(A.a)(e.selectCards.checkSelectedCards),Object(A.a)(e.selectCards.childrenChecked)),handleClose:function(){return d((function(e){return!e}))},nodeID:l.a.getState().db.cards[e.nodeId]}))))}));function jl(){jl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var El=j.b.div(wl||(wl=Object(d.a)(["\nposition:absolute;\nheight:100%;\npadding:7px;\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                ")})),kl=Object(u.b)((function(e,t){return{cards:e.db.cards,searchs:e.searchs,controls:e.controls}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,o,i,c,s,u,d,g=l.a.getState(),b=g.db,y=g.session,x=b.dataType,w=a.a.useState(!1),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useState(!0),L=Object(m.a)(E,2),C=L[0],I=L[1],T=a.a.useState({}),D=Object(m.a)(T,2),F=D[0],N=D[1],P=a.a.useState({checkSelectedCards:[],childrenChecked:[]}),$=Object(m.a)(P,2),M=$[0],B=$[1],z=Object(n.useState)({}),Y=Object(m.a)(z,2),R=Y[0],G=Y[1],H=v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),W=window.location.hash.split("/");W[0]=W[0].replace("#",""),36!==W[0].length&&(W[0]=null);var U={},q=[],V=(null===(t=e.searchs[H])||void 0===t||null===(r=t.selectedCards)||void 0===r?void 0:r.guideline)||null,J=(null===(o=e.searchs[H])||void 0===o||null===(i=o.selectedCards)||void 0===i?void 0:i.objective)||null,X=(null===(c=e.searchs[H])||void 0===c||null===(s=c.selectedCards)||void 0===s?void 0:s.goal)||null,K=(null===(u=e.searchs[H])||void 0===u||null===(d=u.selectedCards)||void 0===d?void 0:d.action)||null,Z=[{value:"guidelines",type:"guideline",label:"$__guidelines",icon:"alt_route",viewButton:!0,selectedParent:null},{value:"objectives",type:"objective",label:"$__objectives",icon:x.filter((function(e){return"objective"===e.name}))[0].icon,viewButton:!0,selectedParent:V},{value:"goals",type:"goal",label:"$__goals",icon:x.filter((function(e){return"goal"===e.name}))[0].icon,viewButton:!0,selectedParent:J||V},{value:"actions",type:"iniciative",label:"$__actions",icon:"double_arrow",viewButton:!0,selectedParent:X||J||V}],Q=function e(t){-1===q.indexOf(t)&&q.push(t),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent&&!l.a.getState().db.cards[e].checklist&&l.a.getState().db.cards[e]._parent===t&&-1===q.indexOf(e)})).forEach((function(t){e(t),q.push(t)}))},ee=function e(t){-1===q.indexOf(q)&&q.push(t),Object.keys(l.a.getState().db.cards).filter((function(e){var r;return t&&l.a.getState().db.cards[t]&&(e===t||(null===(r=l.a.getState().db.cards[t])||void 0===r?void 0:r._parent)===e)&&!l.a.getState().db.cards[e].checklist&&-1===q.indexOf(e)})).forEach((function(t){l.a.getState().db.cards[t]&&l.a.getState().db.cards[t]._parent&&e(l.a.getState().db.cards[t]._parent),q.push(t)}))};Object(n.useEffect)((function(){e.showCheck||B({checkSelectedCards:[],childrenChecked:[]})}),[e.showCheck]),Object(n.useEffect)((function(){if(C){console.log("passou edit"),Object.keys(b.cards).filter((function(t){var r=Object(et.j)(t);return!(!b.cards[t]||b.cards[t].private&&!(b.cards[t].private&&b.cards[t]._users&&b.cards[t]._users[y._id])||b.cards[t]._planId!==W[0]&&b.cards[t]._parent!==W[0]||!e.showCompleted&&(e.showCompleted||"completed"===b.cards[t].status)||e.onlyUnReaded&&!(e.onlyUnReaded&&r.total>0))})).forEach((function(e){U=Object(p.a)(Object(p.a)({},U),{},Object(h.a)({},e,b.cards[e]))})),K?(Q(K),ee(K)):X?(Q(X),ee(X)):J?(Q(J),ee(J)):V&&(Q(V),ee(V));var t={};t.guidelines=Object.keys(U).filter((function(e){return(U[e]._parent===W[0]||U[e]._planId===W[0])&&U[e].type&&U[e].type.indexOf("guideline")>-1&&(0===q.length||q.length>0&&q.indexOf(e)>-1)}))||null,t.objectives=Object.keys(U).filter((function(e){return U[e].type&&"objective"===U[e].type&&(0===q.length||q.length>0&&q.indexOf(e)>-1)}))||null,t.objectives=Object.keys(U).filter((function(e){return"objective"===U[e].type&&!U[e].checklist&&(0===q.length||q.length>0&&q.indexOf(e)>-1)})),t.objectives2=Object.keys(U).filter((function(e){return!J&&"objective"===U[e].type&&U[e]._parent!==V&&!U[e].checklist&&t.objectives.indexOf(U[e]._parent)>-1&&(0===q.length||q.length>0&&q.indexOf(e)>-1)})),t.objectives2.forEach((function(e){-1===t.objectives.indexOf(e)&&t.objectives.push(e)})),t.goals=Object.keys(U).filter((function(e){return U[e].type&&"goal"===U[e].type&&(0===q.length||q.length>0&&q.indexOf(e)>-1)}))||null,t.goals2=Object.keys(U).filter((function(e){return"goal"===U[e].type&&!U[e].checklist&&t.goals.indexOf(U[e]._parent)>-1&&(0===q.length||q.length>0&&q.indexOf(e)>-1)})),t.goals2.forEach((function(e){-1===t.goals.indexOf(e)&&t.goals.push(e)})),t.actions=Object.keys(U).filter((function(e){return U[e].type&&!U[e].checklist&&"plan"!==U[e].type&&"objective"!==U[e].type&&"goal"!==U[e].type&&"feed"!==U[e].type&&"link"!==U[e].type&&"insight"!==U[e].type&&"link"!==U[e].type&&"chatGroup"!==U[e].type&&-1===U[e].type.indexOf("guideline")&&x.filter((function(t){return t.name===U[e].type})).length>0&&"swot"!==x.filter((function(t){return t.name===U[e].type}))[0].module&&(0===q.length||q.length>0&&q.indexOf(e)>-1)}))||null,t.guidelines=t.guidelines.map((function(e){return U[e]})),t.objectives=t.objectives.map((function(e){return U[e]})),t.goals=t.goals.map((function(e){return U[e]})),t.actions=t.actions.map((function(e){return U[e]})),G(t)}}),[b.cards,e.cards,e.searchs]);var te=function(){var t=Object(f.a)(jl().mark((function t(r){var n,a,o,i,c,s,u,d,f,m,g,v,y;return jl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=r.destination,a=r.source,o=r.draggableId,!r.combine){t.next=4;break}return Object(S.c)({message:"".concat(Object(S.w)("$__confirmLink",1),": ").concat(l.a.getState().db.cards[o].name," >>> ").concat(l.a.getState().db.cards[r.combine.draggableId]?l.a.getState().db.cards[r.combine.draggableId].name:""),variant:"warning",persist:!0,horizontal:"right",confirm:function(){r.combine.draggableId&&Object(et.y)(e,{cardId:o,cardToLink:r.combine.draggableId})}}),t.abrupt("return");case 4:if(n){t.next=6;break}return t.abrupt("return",!1);case 6:if(n.droppableId!==a.droppableId||n.id!==a.index){t.next=8;break}return t.abrupt("return",!1);case 8:if(i=a.droppableId,c=n.droppableId,s=Array.from(Object.keys(U).filter((function(e){return U[e].status===i})).sort((function(e,t){return U[e].order&&U[t].order&&String(U[e].order.low)&&String(U[t].order.low)&&parseInt(U[e].order.low)<parseInt(U[t].order.low)?-1:1})).map((function(e){return e._id}))),i!==c||!l.a.getState().db.orderByTitle){t.next=13;break}return t.abrupt("return");case 13:if(i!==c||l.a.getState().db.orderByTitle){t.next=30;break}return u=l.a.getState().functions.socket,d="iniciative"===i?"action":i,(f=Array.from(R["".concat(d,"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(a.index,1),t.next=20,setTimeout(500);case 20:return f.splice(n.index,0,o),t.next=23,setTimeout(500);case 23:return u.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:f}),m=Object(p.a)({},l.a.getState().db.cards),t.next=27,new Promise((function(e,t){f.forEach((function(t,r){m=Object(p.a)(Object(p.a)({},m),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},m[t]),{},{order:"".concat(r+1)}))),r+1===f.length&&e(!0)}))}));case 27:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),m)})),t.abrupt("return");case 30:if(s.splice(a.index,1),(g=Array.from(Object.keys(U).filter((function(e){return e.status===c})).sort((function(e,t){return U[e].order&&U[t].order&&String(U[e].order.low)&&String(U[t].order.low)&&parseInt(U[e].order.low)<parseInt(U[t].order.low)?-1:1})).map((function(e){return e._id})))).splice(n.index,0,o),s.forEach((function(e,t){b.cards[e].order&&b.cards[e].order.low?b.cards[e].order.low=parseInt(t):b.cards[e]=Object(p.a)(Object(p.a)({},b.cards[e]),{},{order:{low:parseInt(t)}})})),g.forEach((function(e,t){b.cards[e].order&&b.cards[e].order.low?b.cards[e].order.low=parseInt(t):b.cards[e]=Object(p.a)(Object(p.a)({},b.cards[e]),{},{order:{low:parseInt(t)}})})),v=Object(et.s)(o),y={_id:o,type:n.droppableId,_childrens:v,_objectives:R.objectives.filter((function(e){return v[e._id]})).map((function(e){return e})),_goals:R.goals.filter((function(e){return v[e._id]})).map((function(e){return e}))},"goal"!==b.cards[o].type||"guideline"!==n.droppableId){t.next=41;break}return Object(S.c)({message:Object(S.w)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheObjectiveColumn",1),variant:"error",persist:!1,horizontal:"center"}),N({}),t.abrupt("return");case 41:if(-1!==b.cards[o].type.indexOf("guideline")||"objective"===b.cards[o].type||"goal"===b.cards[o].type||"guideline"!==n.droppableId&&"objective"!==n.droppableId){t.next=45;break}return Object(S.c)({message:Object(S.w)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheGoalsColumn",1),variant:"error",persist:!1,horizontal:"center"}),N({}),t.abrupt("return");case 45:b.cards[o].type.indexOf("guideline")>-1&&"guideline"!==b.cards[o].type?Object(S.c)({message:Object(S.w)("$__youCantMoveGuidelineWithSwotLinked",1),variant:"error",persist:!1,horizontal:"center"}):"guideline"===b.cards[o].type&&"guideline"!==n.droppableId&&(R.objectives.filter((function(e){return e._parent===o})).length>0||R.goals.filter((function(e){return e._parent===o})).length>0)||b.cards[o].type.indexOf("objective")>-1&&"guideline"!==n.droppableId&&"objective"!==n.droppableId&&R.goals.filter((function(e){return e._parent===o})).length>0?(N(y),j(!0)):Object(S.c)({message:"".concat(Object(S.w)("$__confirmTransformIn",1),": ").concat(Object(S.w)("$__".concat(n.droppableId))),variant:"warning",persist:!0,horizontal:"right",confirm:function(){ne(y),b.cards[b.cards[o]._parent].type.indexOf(n.droppableId)>-1&&Object(et.y)(e,{cardId:o,cardToLink:b.cards[b.cards[o]._parent]._parent})},cancel:function(){N({})}});case 46:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ne=function(){var t=Object(f.a)(jl().mark((function t(r){var n;return jl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,F&&F._id&&(n=F),t.next=4,Object(et.M)(e,n);case 4:e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},n._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[n._id]),{},{type:n.type})))})),N({});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ae=function(){var t=Object(f.a)(jl().mark((function t(r){var n;return jl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="goals"===r?F._goals:F._objectives,R[r].filter((function(e){return F._childrens[e._id]})).forEach(function(){var t=Object(f.a)(jl().mark((function t(a,o){return jl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.filter((function(e){return e._id===a._id})).forEach((function(e){e.type="goals"===r?"task":"goal"})),t.next=3,Object(et.M)(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)}}()),N(Object(p.a)(Object(p.a)({},F),"goals"===r?{_goals:n}:{_objectives:n}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),oe=function(){var t=Object(f.a)(jl().mark((function t(){return jl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.M)(e,{_id:F._id,type:F.type});case 2:j(!1),N({});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Object(n.useEffect)((function(){console.log(C)}),[C]),a.a.createElement("div",null,a.a.createElement(ar.a,{onDragEnd:te},a.a.createElement(Ol,{selectCards:M,handleCheckBoxState:function(){return e.handleCheckBoxState()},handleCardsUpdate:function(e){return I(e)},handleState:function(){return B({checkSelectedCards:[],childrenChecked:[]})}}),a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(El,Object.assign({},e,{ref:t.innerRef}),Z.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(Xo,Object.assign({},e,{key:t.value,columnId:t.type,isDropDisabled:!0,column:n,setSelectedCards:function(e,t){return function(e,t,r){var n=Object(p.a)({},e),a=l.a.getState().db.cards[t]._parent;e.checkSelectedCards.includes(t)||e.childrenChecked.includes(t)||e.checkSelectedCards.includes(a)?e.checkSelectedCards.includes(a)?e.childrenChecked.includes(t)?n.childrenChecked=e.childrenChecked.filter((function(e){return e!==t})):n.childrenChecked=[].concat(Object(A.a)(e.childrenChecked),[t]):(n.checkSelectedCards=e.checkSelectedCards.filter((function(e){return e!==t})),n.childrenChecked=e.childrenChecked.filter((function(e){return e!==t}))):n.checkSelectedCards=[].concat(Object(A.a)(e.checkSelectedCards),[t]),(Object.keys(Object(et.s)(t))||[]).filter((function(e){return e!==t})).map((function(e){n.childrenChecked.includes(e)?n.childrenChecked=n.childrenChecked.filter((function(t){return t!==e})):(n.childrenChecked.includes(t)||n.checkSelectedCards.includes(t))&&(n.childrenChecked=[].concat(Object(A.a)(n.childrenChecked),[e]))})),B(n)}(M,e)},selectedCards:[].concat(Object(A.a)(null===M||void 0===M?void 0:M.checkSelectedCards),Object(A.a)(null===M||void 0===M?void 0:M.childrenChecked)),showCheck:e.showCheck,cards:R&&R[t.value]?R[t.value].map((function(e){return e._id})):[],index:r,columnsSettings:!1,locked:!1,columnStyle:{minWidth:"200px"},viewButton:t.viewButton,isCombineEnabled:!0,inLineAdd:!0,typeAdd:t.type,selectedParent:t.selectedParent,cardColorPicker:!!e.showColors}))})),t.placeholder)}))),a.a.createElement(sl.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:O},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(Or.a,{title:Object(S.w)("$__attention",1),icon:"label",onCancel:function(){j(!1),N({})}})),a.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},F._childrens&&!F._skipGoals&&F._goals.length>0&&F._goals.filter((function(e){return l.a.getState().db.cards[e._id]&&l.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.w)("$__YouHaveLinkedGoals"),a.a.createElement("p",{style:{color:"red"}},Object(S.w)("$__ThisActionCanOnlyBeUndoneManually"))),F._goals.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return l.a.getState().db.orderByTitle&&"ASC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||l.a.getState().db.orderByTitle&&"DESC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:l.a.getState().db.orderByTitle?0:!l.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(ut.a,{db:"cards",cardId:t._id,noShadow:!0}),a.a.createElement(rt.a,{onClick:function(){Object(et.M)(e,{_id:t._id,type:"task"})}},a.a.createElement(re.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.w)("$__transformInTask")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__skipAll"),text:Object(S.w)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){N(Object(p.a)(Object(p.a)({},F),{},{_skipGoals:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__changeAllInTasks"),text:Object(S.w)("$__changeAllInTasks"),icon:"change_circle",size:"25px",onClick:function(){ae("goals"),N(Object(p.a)(Object(p.a)({},F),{},{_skipGoals:!0}))}})))),F._childrens&&!F._skipObjectives&&F._objectives.length>0&&F._objectives.filter((function(e){return l.a.getState().db.cards[e._id]&&l.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.w)("$__YouHaveLinkedObjectives"),a.a.createElement("p",{style:{color:"red"}},Object(S.w)("$__ThisActionCanOnlyBeUndoneManually"))),F._objectives.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return l.a.getState().db.orderByTitle&&"ASC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||l.a.getState().db.orderByTitle&&"DESC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:l.a.getState().db.orderByTitle?0:!l.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(ut.a,{db:"cards",cardId:t._id,noShadow:!0}),a.a.createElement(rt.a,{onClick:function(){Object(et.M)(e,{_id:t._id,type:"goal"})}},a.a.createElement(re.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.w)("$__transformInGoal")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__skipAll"),text:Object(S.w)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){N(Object(p.a)(Object(p.a)({},F),{},{_skipObjectives:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__changeAllInGoal"),text:Object(S.w)("$__changeAllInGoal"),icon:"change_circle",size:"25px",onClick:function(){ae("objectives"),N(Object(p.a)(Object(p.a)({},F),{},{_skipObjectives:!0}))}}))),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__cancel"),text:Object(S.w)("$__cancel"),icon:"cancel",size:"25px",onClick:function(){j(!1),N({})}}))),(F&&F._childrens&&Object.keys(F._childrens).length>0&&0===F._goals.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).length&&0===F._objectives.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).length||(F._skipGoals&&F._goals.length>0||F&&F._goals&&0===F._goals.length)&&(F._skipObjectives&&F._objectives.length>0||F&&F._objectives&&0===F._objectives.length))&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"red"}},Object(S.w)("$__clickInSaveToFinishMigration")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__cancel"),text:Object(S.w)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){j(!1),N({})}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),icon:"done_all",size:"25px",onClick:function(){oe()}})))))))}));function Sl(){Sl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ll=Object(u.b)((function(e){return{groupByColor:e.db.groupByColor,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(!0),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(m.a)(y,2),w=x[0],_=x[1],O=a.a.useState(!1),j=Object(m.a)(O,2),E=j[0],L=j[1],C=a.a.useState(!1),I=Object(m.a)(C,2),T=I[0],D=I[1],F=window.location.hash.split("/");F[0]=F[0].replace("#",""),a.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{deleted:!1}))}}),[]),a.a.useEffect((function(){w&&N()}),[w]);var N=function(){var t=Object(f.a)(Sl().mark((function t(){var r;return Sl().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(Rt.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)}}(),A=0;return Object.keys(t.cards).filter((function(e){var r=Object(et.j)(e);return!(!t.cards[e]||t.cards[e].deleted||t.cards[e]._planId!==F[0]&&t.cards[e]._parent!==F[0]||!o&&(o||"completed"===t.cards[e].status)||!(r.total>0))})).forEach((function(e){var t=Object(et.j)(e);A+=t.total})),a.a.createElement("div",null,a.a.createElement("div",{style:{padding:"0px 10px"}},a.a.createElement(ei.a,{style:{marginLeft:"5px",paddingTop:"10px"},fields:["text","date","tags","priority","unit","usersMode","users","responsible"],showFilters:!0},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(V.a,{text:Object(S.w)("$__options"),icon:"settings",horizontalButton:!0,size:"21px",transparent:!0,style:{border:"1px solid rgba(0, 0, 0, 0.47)",borderRadius:"5px"},color:Object(S.d)("menu"),btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?Object(S.w)("$__orderByAsc"):Object(S.w)("$__orderByDesc"),icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitlePosition:"ASC"===l.a.getState().db.orderByTitlePosition?"DESC":"ASC"}))}},{name:t.orderByTitle?Object(S.w)("$__manualOrder"):Object(S.w)("$__orderByName"),icon:t.orderByTitle?"drag_handle":"format_list_numbered_rtl",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitle:!l.a.getState().db.orderByTitle}))}},{name:u?Object(S.w)("$__hideCatenationColors"):Object(S.w)("$__showCatenationColors"),icon:"palette",color:u?"lightGray":Object(S.d)("menu"),onClick:function(){d((function(e){return!e}))}},{name:Object(S.w)("$__groupByColor"),icon:"gradient",color:t.groupByColor?Object(S.d)("menu"):"lightGray",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{groupByColor:!t.groupByColor}))}}]}),a.a.createElement("div",{style:{marginLeft:"9px",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{title:o?Object(S.w)("$__hideCompleted","*"):Object(S.w)("$__selectCards","*"),text:Object(S.w)("$__selectCards","*"),color:T?Object(S.d)("menu"):"grey",icon:T?"toggle_on":"toggle_off",transparent:!0,onClick:function(){D((function(e){return!e}))},size:"21px",style:{marginRight:"9px",padding:"0px !important",backgroundColor:"transparent",border:"1px solid rgba(0, 0, 0, 0.47)",borderRadius:"5px"}}),a.a.createElement(k.a,{title:o?Object(S.w)("$__hideCompleted","*"):Object(S.w)("$__showCompleted","*"),text:o?Object(S.w)("$__hideCompleted","*"):Object(S.w)("$__showCompleted","*"),color:o?Object(S.d)("menu"):"grey",icon:o?"toggle_on":"toggle_off",transparent:!0,onClick:function(){i((function(e){return!e}))},size:"21px",style:{padding:"0px !important",backgroundColor:"transparent",border:"1px solid rgba(0, 0, 0, 0.47)",borderRadius:"5px"}}),A<0?a.a.createElement(k.a,{title:b?Object(S.w)("$__hideUnreaded","*"):Object(S.w)("$__showUnreaded","*"),text:b?Object(S.w)("$__hideUnreaded","*"):Object(S.w)("$__showUnreaded","*"),color:b?Object(S.d)("menu"):"lightGray",icon:b?"toggle_on":"toggle_off",transparent:!0,onClick:function(){v((function(e){return!e}))},badgeContent:A,size:"21px",style:{marginLeft:"12px",padding:"0px !important",backgroundColor:"transparent",border:"1px solid rgba(0, 0, 0, 0.47)",borderRadius:"5px"}}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:l.a.getState().controls.deleted?Object(S.w)("$__hideDeleted"):Object(S.w)("$__showDeleted"),color:l.a.getState().controls.deleted?"red":Object(S.d)("menu"),load:E,icon:"recycling",transparent:!0,onClick:function(){_((function(e){return!e})),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{deleted:!w}))},size:"25px",style:{padding:"0px !important",marginLeft:"-6px",border:"1px solid rgba(0, 0, 0, 0.47)",backgroundColor:"transparent",borderRadius:"5px"}})))))),a.a.createElement(kl,{nodeId:F[0]||null,showCompleted:o,showCheck:T,handleCheckBoxState:function(){return D((function(e){return!e}))},showColors:u,onlyUnReaded:b,styles:{discountHeight:130}}))}));var Cl=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Wc)((function(e){var t=l.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(25),d=Object(m.a)(u,2),p=d[0],f=d[1],h=window.location.hash.split("/");h[0]=h[0].replace("#","");var g={};return g=36===h[0].length?(g=Object.keys(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===h[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})):(g=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(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.w)("$__page")," ",c+1," ",Object(S.w)("$__of")," ",Math.ceil(Object.keys(g).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:Object.keys(g).length,page:c,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__cardsPerPage")}))),a.a.createElement(Rr.a,null,Object.keys(g).filter((function(e,t){return t<=(c+1)*p&&t>=c*p})).map((function(e,t){return a.a.createElement(Sn.a,{key:g[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{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.w)("$__page")," ",c+1," ",Object(S.w)("$__of")," ",Math.ceil(Object.keys(g).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jn.a,{component:"div",count:Object.keys(g).length,page:c,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.w)("$__cardsPerPage")}))))}))),Il=r(724),Tl=r.n(Il);var Dl=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=Object(S.j)(),i=e.nodeId?e.nodeId:v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),c=e.searchs&&e.searchs[i]?e.searchs[i]:null,s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=[];return u=Object.keys(r.cards).filter((function(e){return"plan"===r.cards[e].type&&("trash"!==s[1]&&!r.cards[e].deleted||"trash"===s[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]})),u=o&&!o.owner&&!o.planAdmin&&!o.planEdit&&!o.planRead&&!o.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"===s[1]||"templates"!==s[1]&&r.cards[e]._users&&Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||"admin"===s[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]})),c&&(c.text&&(u=u.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(c.text.toLowerCase())>-1)})).map((function(e){return e}))),u=(u=u.filter((function(e){return!!(e&&e.status&&c&&c.status&&c.status[e.status]||!e.status&&c&&c.status&&c.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&c.priority[e.priority]||c.priority.null&&!e.priority)})).map((function(e){return e})),c&&c.users&&c.users.length>0&&(u=u.filter((function(e){var t=!1;if(c.users.indexOf("ALL")>-1&&(!e._users||0===Object.keys(e._users).length))t=!0;else if(e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).forEach((function(e){c.users.indexOf(e)>-1&&(t=!0)})),t;return!1})).map((function(e){return e}))),c&&c.clients&&c.clients.length>0&&(u=u.filter((function(e){return c.clients.indexOf("ALL")>-1&&!e.client||!!(e.client&&c.clients.indexOf(e.client)>-1)})).map((function(e){return e}))),c&&c.tags&&c.tags.length>0&&(u=u.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return c.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})))),a.a.createElement(Rr.a,{style:{marginTop:"7px"}},u&&u.length>0&&u.filter((function(e){return!!((!e._planId||e._planId&&0===u.filter((function(t){return t._id===e._planId})).length)&&("templates"!==s[1]&&(!e.isTemplate||e.isTemplate&&"trash"===s[1])||"templates"===s[1]&&e.isTemplate)&&("archived"===s[1]&&e.archived||"archived"!==s[1]&&!e.archived)&&("trash"===s[1]&&e.deleted||"trash"!==s[1]&&!e.deleted))})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return a.a.createElement(Sn.a,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:e,Avatar:!0,expanded:!0,ignoreList:!0}))})),r.loaded&&(!u||0===u.length)&&a.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Tl.a})))}))),Fl=r(300),Nl=r(750),Al=r.n(Nl),Pl=r(751),$l=r.n(Pl);var Ml=function(e){var t=l.a.getState().db.users,r=l.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].deleted&&t[r]._parent===e.id})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%"}},Object(S.w)("$__users",1),":"),a.a.createElement(Jr.a,{max:12},Object.keys(t).filter((function(r){return t[r]&&!t[r].deleted&&t[r]._parent===e.id})).map((function(e,r){return a.a.createElement(Kt.a,{title:t[e].name,key:e},a.a.createElement(at.a,{alt:t[e].name,src:t[e].image||null,style:{width:"23px",height:"23px"}},t[e].name&&t[e].name.substr(0,1)?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(ut.a,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},Bl=Object(u.b)((function(e){return{usersStatus:e.usersStatus,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ze)((function(e){var t,r,n=e.data,o=l.a.getState(),i=o.db,s=o.session,u=a.a.useState(null),d=Object(m.a)(u,2),f=d[0],g=d[1],b=window.location.hash.split("/");b[0]=b[0].replace("#","");var v=[],y={};return Object.keys(i.cards).filter((function(e){return!!(i.cards[e]&&"chatGroup"!==i.cards[e].type&&"link"!==i.cards[e].type&&"insight"!==i.cards[e].type&&i.cards[e]._users&&Object.keys(i.cards[e]._users).length>0&&1===Object.keys(i.cards[e]._users).filter((function(e){return e===n._id})).length)})).forEach((function(e){if(i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0]&&i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0].module&&"swot"!==i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0].module||i.cards[e]&&i.cards[e].type&&i.dataType.filter((function(t){return t.name===i.cards[e].type})).length>0&&"swot"===i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0].module){var t;if(i.cards[e]&&i.cards[e].status&&"completed"!==i.cards[e].status)y=Object(p.a)(Object(p.a)({},y),{},(t={},Object(h.a)(t,i.cards[e].status,y&&y[i.cards[e].status]?y[i.cards[e].status]+1:1),Object(h.a)(t,"total",y.total?y.total+1:1),Object(h.a)(t,"late",i.cards[e].endDate&&_()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()().tz("America/Sao_Paulo").format()?y.late?y.late+1:1:y.late?y.late:0),t));else y=Object(p.a)(Object(p.a)({},y),{},{completed:y&&y.completed?y.completed+1:1,total:y.total?y.total+1:1});v[i.cards[e].type]=v[i.cards[e].type]?v[i.cards[e].type]+1:1}else v.swot=null==v.swot?1:v.swot+1})),v=[],y={},e.expanded?a.a.createElement("div",{style:Object(p.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",marginTop:"5px",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(re.a,{color:Object(S.d)("color"),icon:"close",onClick:function(){c.a.push("c#tab/".concat(b[1]))}})))),!f&&n.image?a.a.createElement("img",{alt:"MACHEN_IMAGE",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?$l.a:Al.a),onError:function(e){g(null)},onLoad:function(e){g("".concat(n.image?n.image:n.type&&"user"!==n.type?$l.a:Al.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(f,'")'),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(re.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(re.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&&l.a.getState().db.users[n._parent]&&!l.a.getState().db.users[n._parent].independentAccount)&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(re.a,{color:Object(S.d)("color"),icon:"create",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},i.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(p.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(re.a,{color:Object(S.d)("color"),icon:"contacts",onClick:function(){c.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(re.a,{color:Object(S.d)("color"),icon:"badge",onClick:function(){c.a.push("c#tab/units/".concat(n._id))}})))),n.image&&(!f||n.image&&n.image!==f)?a.a.createElement("img",{alt:"MACHEN_IMAGE",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?$l.a:Al.a),onError:function(e){},onLoad:function(e){g("".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(f,'")'),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(re.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(re.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(re.a,{color:Object(S.d)("medium"),size:"12px"},"supervisor_account"),a.a.createElement("span",null,Object(S.w)("$__supervisorAccount"))):a.a.createElement(a.a.Fragment,null,a.a.createElement(re.a,{color:Object(S.d)("medium"),size:"12px"},"supervised_user_circle"),a.a.createElement("span",null,Object(S.w)("$__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.w)("$__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.w)("$__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(Ml,Object.assign({id:n._id},e))),"user"===n.type&&Object.keys(v).length>0?a.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},Object.keys(v).map((function(e,t){return"null"!==String(e)&&"undefined"!==String(e)?a.a.createElement(wa.a,{overlap:"rectangular",key:t,style:{padding:3},icon:i.dataType.filter((function(t){return t.name===e}))[0].icon,title:Object(S.w)("$__".concat(e),1),size:"16px",count:v[e],disabled:!0}):null}))):a.a.createElement(a.a.Fragment,null),"user"===n.type&&y&&y.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.w)("$__openActivities")),a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.w)("$__total",1),": ",y.total)),i.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(re.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.w)(e.label,1))),a.a.createElement("div",null,y[e.value]?y[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(re.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.w)("$__late",1))),a.a.createElement("div",null,y.late)))):a.a.createElement(a.a.Fragment,null),!e.resume&&a.a.createElement(dt.a,{options:n.tags,showOptions:!1}),e.resume&&a.a.createElement("div",null,a.a.createElement(Fl.a,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},userId:n._id},a.a.createElement(re.a,{size:"27px"},"chat")))))})));var zl=function(e){var t=l.a.getState().db,r=[];return e.plans.forEach((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(Sn.a,{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(Bl,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},Yl=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(Sn.a,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},Rl=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=e.nodeId?e.nodeId:v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),i=e.searchs&&e.searchs[o]?e.searchs[o]:null,c=Object(S.j)(),s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=[];return u=Object.keys(r.cards).filter((function(t){return r.cards[t]&&r.cards[t].type&&"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]})),u=c&&!c.owner&&!c.planAdmin&&!c.planEdit&&!c.planRead&&!c.planModerate&&r.cards&&n&&n._id||!r.adminView?u.filter((function(e){return"plan"===e.type&&e&&e._users&&Object.keys(e._users).filter((function(t){return t===n._id||l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.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})):u.filter((function(e){return"plan"===e.type&&e&&e._users&&(Object.keys(e._users).filter((function(t){return t===n._id||l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.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})),i&&(i.text&&(u=u.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(i.text.toLowerCase())>-1)})).map((function(e){return e}))),u=(u=u.filter((function(e){return!!(e&&e.status&&i&&i.status&&i.status[e.status]||!e.status&&i&&i.status&&i.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&i.priority[e.priority]||i.priority.null&&!e.priority)})).map((function(e){return e})),i&&i.users&&i.users.length>0&&(u=u.filter((function(e){var t=!1;if(i.users.indexOf("ALL")>-1&&(!e._users||0===Object.keys(e._users).length))t=!0;else if(e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).filter((function(e){return i.users.indexOf(e)>-1&&(t=!0),!1})),t;return!1})).map((function(e){return e}))),i&&i.clients&&i.clients.length>0&&(u=u.filter((function(e){return i.clients.indexOf("ALL")>-1&&!e.client||!!(e.client&&i.clients.indexOf(e.client)>-1)})).map((function(e){return e}))),i&&i.tags&&i.tags.length>0&&(u=u.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return i.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})))),a.a.createElement("div",null,u.filter((function(e){return e._isFavorite})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.w)("$__myFavoritePlans",1),icon:"favorite",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(Yl,{plans:u.filter((function(e){return e._isFavorite&&!e.private})).map((function(e){return e}))}))),u.filter((function(e){return e._isFavorite&&e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.w)("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(Yl,{plans:u.filter((function(e){return e._isFavorite&&e.private})).map((function(e){return e}))}))),u.filter((function(e){return e.client&&r.users[e.client]})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.w)("$__customerPlanning",1),icon:"business",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(zl,{plans:u.filter((function(e){return e.client})).map((function(e){return e})),completed:!!e.completed}))),u.filter((function(e){return!e.client&&!e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.w)("$__accountPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(Yl,{plans:u.filter((function(e){return!e.client&&!e.private})).map((function(e){return e}))}))),u.filter((function(e){return e.client&&!r.users[e.client]})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.w)("$__consultingPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(Yl,{plans:u.filter((function(e){return e.client&&!r.users[e.client]})).map((function(e){return e}))}))),u.filter((function(e){return!e.client&&e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.w)("$__privatePlanning",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(Yl,{plans:u.filter((function(e){return!e.client&&e.private})).map((function(e){return e}))}))),r.loaded&&(!u||0===u.length)&&a.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Tl.a})))}));var Gl=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=l.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("#","");var n=e.nodeId?e.nodeId:v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();window.location.hash.split("/")[0].replace("#","")||c.a.push("sp#tab/home");var o=!0;if(r[0]&&36===r[0].length&&!l.a.getState().db.cards[r[0]]&&(o=!1),r[0]&&36===r[0].length&&l.a.getState().db.cards[r[0]]&&!l.a.getState().db.cards[r[0]].isTemplate&&l.a.getState().db.cards[r[0]]._users&&!l.a.getState().db.cards[r[0]]._users[t._id]&&l.a.getState().db.cards[r[0]]._account&&l.a.getState().db.cards[r[0]]._account!==v()(t.account).toString()&&(o=!1),Object(et.A)(r[0])&&(o=Object(et.A)(r[0])),!o)return c.a.push("/deniedAccess"),a.a.createElement(a.a.Fragment,null);if(36===r[0].length&&l.a.getState().db.cards[r[0].replace("#","")]&&r[1]&&"board"===r[1])return a.a.createElement(Ii.a,{nodeId:r[0]||null});var i=Ku.filter((function(e){return!(r[1]&&e.tabs&&e.tabs.filter((function(e){return e.path===r[1]})).length>0&&!1===e.tabs.filter((function(e){return e.path===r[1]}))[0].search)&&!(!e||e.path!==window.location.pathname||!e.search)})).length>0;return a.a.createElement("div",{style:{height:"-webkit-fill-available"}},i?a.a.createElement("div",{style:{position:"absolute",left:0,top:0,right:0,zIndex:1,paddingLeft:15,display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(ei.a,{fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0,nodeId:n}),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(oa,null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"absolute",top:i?30:0,left:0,bottom:0,right:0,overflow:"auto"}},(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"home"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Rl,null)):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"completed"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Rl,{completed:!0})):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&a.a.createElement(Dl,null),36===r[0].length&&l.a.getState().db.cards[r[0].replace("#","")]?a.a.createElement(a.a.Fragment,null,r[1]&&"matrix"===r[1]&&a.a.createElement(yl,null),r[1]&&("actions"===r[1]||"guidelines"===r[1]||"objectives"===r[1]||"goals"===r[1])&&a.a.createElement(Ti,{type:r[1]}),r[1]&&"dashboard"===r[1]&&a.a.createElement(Ic,null),r[1]&&"statistics"===r[1]&&a.a.createElement(Hc,null),r[1]&&"overview"===r[1]&&a.a.createElement(Ll,null),r[1]&&"bright-and-connected"===r[1]&&a.a.createElement("div",{style:{marginTop:30}},a.a.createElement(Ua,null)),r[1]&&"insight-boards"===r[1]&&a.a.createElement("div",{style:{marginTop:30}},a.a.createElement(Uc,null)),r[1]&&"radar"===r[1]&&a.a.createElement("div",{style:{marginTop:30}},a.a.createElement(Cl,null)),r[1]&&"library"===r[1]&&a.a.createElement("div",{style:{padding:15}},a.a.createElement(Lo,null)),r[1]&&"planningBoard"===r[1]&&a.a.createElement("div",{style:{padding:15}},a.a.createElement("iframe",{title:"outModule",style:{position:"absolute",width:"calc(100% - 30px)",height:"100%",border:"none"},src:"https://miro.com/app/live-embed/".concat(l.a.getState().db.cards[r[0]].miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):a.a.createElement(a.a.Fragment,null)))}))),Hl=r(1194),Wl=r.n(Hl),Ul=r(336),ql=Object(le.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(sl.a),Vl=r(241);function Jl(){Jl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Xl=function(e,t){var r=l.a.getState().db.tag;r.filter((function(e){return e.value===t.value})).length>0?r.forEach((function(e,n){e.value===t.value&&(r[n]=Object(p.a)(Object(p.a)({},r[n]),t))})):r.push(t),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{tag:Object(A.a)(r)}))},Kl=function(){var e=Object(f.a)(Jl().mark((function e(t,r){return Jl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Fe.a.delete("/tag/unique/".concat(r._id),Object(p.a)({},r))&&Zl(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Zl=function(e,t){var r=[];l.a.getState().db.tag.forEach((function(e){e.value!==t._id&&r.push(e)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{tag:r}))},Ql=function(){var e=Object(f.a)(Jl().mark((function e(t,r){return Jl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Fe.a.put("/tag/unlink/",Object(p.a)({},r))&&ts(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),es=function(){var e=Object(f.a)(Jl().mark((function e(t,r){var n,a;return Jl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.a.getState(),a=n.session,r.target===r._id&&(r.target=a.account),e.next=4,Fe.a.put("/tag/link/",Object(p.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)}}(),ts=function(e,t){var r=[],n=l.a.getState(),a=n.session,o=n.db;o.tag.forEach((function(e){var n=e;e.value===t._id&&(n=Object(p.a)(Object(p.a)({},n),{},{count:0})),r.push(n)}));var i=Object(p.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})).forEach((function(e){var r=[];i[e]._tags.forEach((function(e){e.value!==t._id&&r.push(e)})),i[e]._tags=r})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},o),{},{tag:r,cards:i}))};r(1134);function rs(){rs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ns=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.data,r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],s=Object(S.j)(),u=function(){var t=Object(f.a)(rs().mark((function t(r){return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Kl(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var t=Object(f.a)(rs().mark((function t(r){return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Ql(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(){s&&s.plan&&s.planAdmin&&i(!0)},onMouseLeave:function(e){i(!1)}},a.a.createElement("div",{style:Object(p.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 r;r=t.item,c.a.push("tags#".concat(r.value)),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{history:"tags#".concat(r.value)}))}},t.item.text," ",t.item._count?"(".concat(t.item._count,")"):""),o&&a.a.createElement("div",{style:{zIndex:1}},a.a.createElement(V.a,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(S.d)("color"),options:[].concat(Object(A.a)(s&&s.plan&&s.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(){u(t.item)}},parseInt(t.item._count)>0&&parseInt(t.item._countOthers)>0&&{name:"$__unlinkMyActivities",icon:"label_off",onClick:function(){d(t.item)}}])}))):a.a.createElement("div",{style:{fontWeight:"bold",color:Object(S.d)("color"),fontSize:"12px"}},t.item.text)})),as=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{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"}})};function os(){os=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var is=Object(u.b)((function(e){return{tag:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(Y.a)(as)(),r=l.a.getState(),n=r.db,o=r.session,i=e.tag,c=a.a.useState(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(m.a)(y,2),w=x[0],O=x[1],j=a.a.useState({}),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(!1),T=Object(m.a)(I,2),D=T[0],F=T[1],P=a.a.useState(null),$=Object(m.a)(P,2),M=$[0],B=$[1],z=a.a.useState([]),R=Object(m.a)(z,2),G=R[0],H=R[1],W=a.a.useState(!1),U=Object(m.a)(W,2),q=U[0],V=U[1],J=a.a.useState(null),X=Object(m.a)(J,2),K=X[0],Z=X[1],Q=a.a.useState(!0),ee=Object(m.a)(Q,2),te=ee[0],ne=ee[1],ae=ai.a.ExcelFile,oe=ai.a.ExcelFile.ExcelSheet,ie=ai.a.ExcelFile.ExcelColumn,ce=window.location.hash.split("/");ce.length>0&&(ce[0]=ce[0].replace("#","")),a.a.useEffect((function(){return u||(d(!0),se(),e.onLoad&&e.onLoad()),function(){}}),[]),a.a.useEffect((function(){se()}),[M,JSON.stringify(e.tag)]);var le=Object(S.j)(),se=function(){var e=[];i.filter((function(e){var t=M?Object(S.q)(M.toLowerCase().trim()):"",r=Object(S.q)(e.label.toLowerCase().trim());return!(e.parent||M&&!(M&&r.indexOf(t)>-1))})).sort((function(e,t){return Object(S.q)(e.label.toLowerCase().trim())<Object(S.q)(t.label.toLowerCase().trim())?-1:Object(S.q)(e.label.toLowerCase().trim())>Object(S.q)(t.label.toLowerCase().trim())?1:0})).forEach((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})).forEach((function(e){0===a.filter((function(t){return t.value===e.value})).length&&a.push(Object(p.a)({id:e.value,text:e.label},e))})),e.push({id:r.label.substr(0,1),text:r.label.substr(0,1),children:[Object(p.a)(Object(p.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})).forEach((function(e){0===c.filter((function(t){return t.value===e.value})).length&&c.push(Object(p.a)({id:e.value,text:e.label},e))})),e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.push(Object(p.a)(Object(p.a)({id:r.value,text:r.label},r),{},{children:c}))}})),JSON.stringify(e)!==JSON.stringify(G)&&H(e)},ue=function(){C({}),F(!1),v(!1)},de=function(e){v(!0),C(e||{})},pe=function(){var t=Object(f.a)(os().mark((function t(){var r;return os().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(F(!0),!L.value){t.next=15;break}return t.prev=2,t.next=5,Fe.a.put("tag/update",{_id:L.value,name:L.name?L.name:L.label,color:L.newColor?L.newColor:L.color?L.color:null});case 5:t.sent&&(Xl(e,{value:L.value,label:L.name?L.name:L.label,color:L.newColor?L.newColor:L.color}),F(!1),ue()),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,Fe.a.post("tag/add",{name:L.name,color:L.newColor?L.newColor:L.color?L.color:null});case 18:(r=t.sent)&&r.data&&(O(!0),Xl(e,r.data),F(!1),ue()),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)}}(),he=function(){var e=Object(f.a)(os().mark((function e(){var t;return os().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(!0),e.next=3,Pe.a.post("Rel_TagUser_Used");case 3:(t=e.sent)&&(V(!1),Z(a.a.createElement(ae,{filename:"".concat(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_tagReport"),element:a.a.createElement(k.a,{title:Object(S.w)("$__export"),text:Object(S.w)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(oe,{data:t.data,name:"timeSheet"},a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__user",1)),value:"user"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__tag",1)),value:"tag"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__activity",1)),value:"card"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.w)("$__status",1)),value:"status"})))));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(N.a,null,a.a.createElement("div",{style:{position:"relative",width:"100%",height:"90vh"}},a.a.createElement("div",{className:t.menu,style:{backgroundColor:"rgba(250,250,250,0.7)",position:"relative",width:"100%",overflow:"hidden",padding:15}},a.a.createElement(Or.a,{title:Object(S.w)("$__tagList",1),icon:"bookmarks",iconTitle:Object(S.w)("$__tagList",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(){de()}},le&&le.plan&&le.planAdmin&&!w&&{name:"$__showAllTags",icon:"style",color:Object(S.d)("color"),show:"hover",onClick:function(){O(!0)}},w&&{name:"$__onlyMyTags",icon:"loyalty",color:Object(S.d)("color"),show:"hover",onClick:function(){O(!1)}},{name:te?"$__showFilters":"$__showTagList",icon:te?"filter_alt":"bookmarks",color:Object(S.d)("color"),show:"hover",onClick:function(){ne((function(e){return!e}))}},le&&le.plan&&le.planAdmin&&{name:"$__exportReport",icon:"print",color:Object(S.d)("color"),show:"hover",onClick:function(){he()}}],optionsProps:{transparent:!0}}),K&&K,a.a.createElement("div",{className:t.separator}),te?a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",clear:"both",width:"100%"}},a.a.createElement(_e.a,{label:Object(S.w)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:M?a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"cancel",color:"green",onClick:function(){return B(null)}})):null,onChange:function(e){B(e.target.value)}},placeholder:Object(S.w)("$__nameOfTagSearch_placeholder",1)})):a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",padding:7,width:"100%"}},a.a.createElement(Vl.a,{nodeId:"tagsView",customLabels:{text:"$__"},fields:["tags","date","users","status","priority","impact","risk","complexity"].concat(Object(A.a)(le&&le.plan&&le.planAdmin?["admin"]:[])),showFilters:!0,mode:"modal",fieldsProps:{users:{allPlataform:!0,selectedShow:{internal:!0,external:!1}}}}))),te&&a.a.createElement("div",{style:{position:"absolute",top:150,bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},a.a.createElement(Wl.a,{collapse:"ALL",items:G,maxDepth:3,renderItem:function(e){return a.a.createElement(ns,{data:e,editTag:function(e){de(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;es(e,{_id:t.dragItem.id,target:n.id}),H(r)}})),a.a.createElement(ql,{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(Or.a,{title:L.value?Object(S.w)("$__editTag",1):Object(S.w)("$__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(_e.a,{error:!(!L||L.label&&0!==L.label.length),label:Object(S.w)("$__name",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){C(Object(p.a)(Object(p.a)({},L),{},{name:e.target.value}))}},defaultValue:L&&L.label?L.label:null,placeholder:Object(S.w)("$__nameOfTag_placeholder",1)})),a.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},a.a.createElement("span",{style:{marginRight:"7px"}},Object(S.w)("$__tagColor"),":"),a.a.createElement(Ul.a,{disablePortal:!0,color:L.color,onChange:function(e){C(Object(p.a)(Object(p.a)({},L),{},{newColor:e}))}},L.color||L.newColor?a.a.createElement("div",{className:"tag",style:{backgroundColor:L.newColor?L.newColor:L.color,width:"22px",height:"22px",borderRadius:"50%",cursor:"pointer"}}):a.a.createElement("div",{className:"tag",style:{fontWeight:"bold"}},Object(S.w)("$__clickHereToAddColor")))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__cancel"),text:Object(S.w)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){v(!1)}}),L&&(L.name||L.newColor)&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),icon:"save",size:"25px",load:!!D,onClick:function(){pe()}})))),q?a.a.createElement(fe.a,{fullScreen:!0}):a.a.createElement(a.a.Fragment,null)))}));function cs(){cs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ls=Object(u.b)((function(e){return{store:{db:{cards:e.db.cards,tag:e.db.tag}},history:e.db.history,hidePrivate:e.controls.hidePrivate,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(null),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState([]),h=Object(m.a)(d,2),g=h[0],b=h[1],v=a.a.useState([]),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(!1),O=Object(m.a)(_,2),j=O[0],E=O[1],L=l.a.getState().session,C=e.store.db,I=l.a.getState().db.dataType,T=Object(S.j)();a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(x)&&w(e)}),[e.history]),a.a.useEffect((function(){var e=setTimeout((function(){return F()}),400);return x.length>0&&x[0]!==n&&(E(!1),o(x[0])),j&&D(),function(){return clearTimeout(e)}}),[C.cards,C.tag,j,x]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(x)&&w(e)}),[e.history]);var D=function(){Object(Rt.b)(e,{cardLoad:"tags",idRel:x[0],adminView:!0})},F=function(){var t=Object(f.a)(cs().mark((function t(){var r,n;return cs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){e(Object.keys(C.cards).filter((function(e){return C.cards&&C.cards[e]&&!C.cards[e].deleted&&(!j&&L&&L._id&&C.cards[e]&&C.cards[e]._users&&C.cards[e]._users[L._id]||j&&(T.owner||T&&T.plan&&T.planAdmin))&&x&&x.length>0&&x[0]&&C.tag&&C.tag.filter((function(e){return e.value===x[0]||e.parent===x[0]})).length>0&&C.cards&&C.cards[e]._tags&&C.cards[e]._tags.filter((function(e){return e.value===x[0]||C.tag.filter((function(t){return t.parent===x[0]&&e.value===t.value})).length>0})).length>0&&(!C.cards[e].private||L&&L._id&&C.cards[e].private&&C.cards[e]._users&&C.cards[e]._users[L._id])})))})),t.next=3,r.then((function(e){return e}));case 3:(n=t.sent)&&(b(n),u(!1),e.onFinish&&e.onFinish());case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=g.map((function(e){return C.cards[e]}));if(e.searchs&&e.searchs.tagsView){var A=e.searchs.tagsView;A.text&&void 0!==A.text&&null!==A.text&&""!==A.text&&(N=Array.from(N.filter((function(e){var t;return e.name.toLowerCase().indexOf(A.text.toLowerCase())>-1||(null===(t=e.description)||void 0===t?void 0:t.toLowerCase().indexOf(A.text.toLowerCase()))>-1})))),A.startDate&&void 0!==A.startDate&&null!==A.startDate&&""!==A.startDate&&(N=Array.from(N.filter((function(e){return parseInt(e.startDate)>=parseInt(A.startDate)})))),A.endDate&&void 0!==A.endDate&&null!==A.endDate&&""!==A.endDate&&(N=Array.from(N.filter((function(e){return parseInt(e.endDate)<=parseInt(A.endDate)})))),A.tags&&A.tags&&A.tags.filter((function(e){return e.value})).length>0&&(N=Array.from(N.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return A.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})))),N=(N=(N=(N=(N=N.filter((function(e){return!(e.status&&!(e&&e.status&&A.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&A.priority[e.priority]||A.priority.null&&!e.priority)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.complexity&&A.complexity[e.complexity]||A.complexity.null&&!e.complexity)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.risk&&A.risk[e.risk]||A.risk.null&&!e.risk)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.impact&&A.impact[e.impact]||A.impact.null&&!e.impact)})).map((function(e){return e})),A.users&&A.users.length>0&&(N=N.filter((function(e){return A.users.filter((function(t){return e&&e._users&&e._users[t]})).length>0})).map((function(e){return e})))}var P=N.map((function(e){return e._id}));return a.a.createElement("div",{style:{width:"100%",display:"flex",height:"89vh",overflow:"hidden"}},a.a.createElement(Rr.a,{style:{overflow:"hidden"}},a.a.createElement(Sn.a,{md:3},a.a.createElement(is,null)),a.a.createElement(Sn.a,{md:9},s&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(ct.a,null)),C.tag.filter((function(e){return e.value===x[0]})).length>0?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:Object(p.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},C.tag.filter((function(e){return e.value===x[0]})).length>0&&C.tag.filter((function(e){return e.value===x[0]}))[0].color?{backgroundColor:C.tag.filter((function(e){return e.value===x[0]}))[0].color,color:C.tag.filter((function(e){return e.value===x[0]}))[0].color?Object(S.u)(C.tag.filter((function(e){return e.value===x[0]}))[0].color,!0):Object(S.d)("menu")}:{})},a.a.createElement(re.a,{size:"22px",color:C.tag.filter((function(e){return e.value===x[0]}))[0].color?Object(S.u)(C.tag.filter((function(e){return e.value===x[0]}))[0].color,!0):Object(S.d)("menu"),icon:"tag"}),a.a.createElement("span",{style:{marginLeft:"7px"}},C.tag.filter((function(e){return e.value===x[0]}))[0].label)),T&&T.plan&&T.planAdmin&&T.user&&T.userAdmin?a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.w)("$__adminMode"),text:Object(S.w)("$__adminMode"),color:j?Object(S.d)("menu"):"lightgrey",textColor:j?Object(S.d)("menu"):"lightgrey",icon:"manage_accounts",onClick:function(){E((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%",height:"90vh",overflow:"auto"}},a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("plan")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)("$__plans",1),icon:I.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(S.d)("menu"),filterText:e.text,style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return"plan"===C.cards[t].type&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name<C.cards[t].name?-1:C.cards[e].name>C.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,showTags:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return C.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)("$__guidelines",1),icon:I.filter((function(e){return"guideline"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return C.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)("$__objectives",1),icon:I.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return C.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)("$__goals",1),icon:I.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return I.filter((function(e){return e.name===C.cards[t].type})).length>0&&I.filter((function(e){return e.name===C.cards[t].type}))[0]&&"objective"!==C.cards[t].type&&"goal"!==C.cards[t].type&&"plan"!==C.cards[t].type&&"chatGroup"!==C.cards[t].type&&"link"!==C.cards[t].type&&"insight"!==C.cards[t].type&&-1===C.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)("$__actions",1),icon:"double_arrow",color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return I.filter((function(e){return e.name===C.cards[t].type})).length>0&&I.filter((function(e){return e.name===C.cards[t].type}))[0]&&"objective"!==C.cards[t].type&&"goal"!==C.cards[t].type&&"plan"!==C.cards[t].type&&"chatGroup"!==C.cards[t].type&&"link"!==C.cards[t].type&&"insight"!==C.cards[t].type&&-1===C.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(e){return"insight"===C.cards[e].type||"link"===C.cards[e].type})).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:"BRIGHT & CONNECTED",icon:La.a,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(e){return"insight"===C.cards[e].type||"link"===C.cards[e].type})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,expanded:!0,Avatar:!0,Resume:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))))))),a.a.createElement("div",null))}));var ss=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 115px)"}},e.provisorio||"N\xe3o Autorizado")})),us={root:{}},ds=r(907),ps=function(e){var t=e.handleData,r=Object(n.useState)(!1),o=Object(m.a)(r,2),i=o[0],c=o[1],l=Object(n.useState)(!1),s=Object(m.a)(l,2),u=s[0],d=s[1],f=Object(n.useState)(null),h=Object(m.a)(f,2),g=h[0],b=h[1],v={formFileUpload:{height:"88%",width:"90%",marginTop:"5%",marginBottom:"5%",maxWidth:"100%",textAlign:"center",position:"relative"},inputFileUpload:{display:"none"},labelFileUpload:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderWidth:"2px",borderRadius:"1rem",borderStyle:"dashed",borderColor:"#cbd5e1",backgroundColor:"#f8fafc"},labelFileUploadDragActive:{backgroundColor:"#ffffff"},uploadButton:{cursor:"pointer",padding:"0.25rem",fontSize:"1rem",border:"none",fontFamily:"'Oswald', sans-serif",backgroundColor:"transparent"},uploadButtonHover:{textDecorationLine:"underline"},dragFileElement:{position:"absolute",width:"100%",height:"100%",borderRadius:"1rem",top:"0px",right:"0px",bottom:"0px",left:"0px"}},y=a.a.useRef(null),x=function(e){d(!0);var r=new FileReader;r.onload=function(e){var r=e.target.result,n=ds.a(r,{type:"binary"}),a=n.SheetNames[0],o=n.Sheets[a],i=ds.b.sheet_to_json(o);setTimeout((function(){d(!1),t(i)}),0)},e instanceof File?(r.readAsBinaryString(e),b(e)):(r.readAsBinaryString(e.target.files[0]),b(e.target.files[0]))},w=function(e){e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?c(!0):"dragleave"===e.type&&c(!1)};return a.a.createElement("form",{style:v.formFileUpload,onDragEnter:w,onSubmit:function(e){return e.preventDefault()}},a.a.createElement("input",{ref:y,type:"file",style:v.inputFileUpload,multiple:!0,onChange:function(e){e.preventDefault(),e.target.files&&e.target.files[0]}}),a.a.createElement("label",{className:i?"label-file-upload drag-active":"label-file-upload",style:i?Object(p.a)(Object(p.a)({},v.labelFileUpload),v.labelFileUploadDragActive):v.labelFileUpload},a.a.createElement("div",null,g?a.a.createElement("p",null,Object(S.w)("$__youSendedArchive"),' "',g.name,'"'):a.a.createElement("p",null,Object(S.w)("$__putAnArchive")),u&&a.a.createElement(fe.a,null),a.a.createElement("input",{type:"file",style:{alignSelf:"center",display:"none"},accept:".xlsx, .xls",id:"selectedFile",onChange:x}),a.a.createElement("input",{style:{marginTop:"10px",backgroundColor:"#0095ff",color:"white",cursor:"pointer",border:"none",borderRadius:"5px",padding:" 10px 20px"},type:"button",value:Object(S.w)("$__search..."),onClick:function(){document.getElementById("selectedFile").click()}}))),i&&a.a.createElement("div",{style:v.dragFileElement,onDragEnter:w,onDragLeave:w,onDragOver:w,onDrop:function(e){e.preventDefault(),e.stopPropagation(),c(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&(console.log(e.dataTransfer.files[0]),x(e.dataTransfer.files[0]))}}))},fs=function(e){var t=e.usuario,r=e.index,n=e.handleCheckboxChange,o=e.isActive,i=e.style,c=e.handleDataChange,l=e.selected,s=e.dataError,u=e.column,d=e.add,f=e.data,h=e.data1,m={display:"flex",justifyContent:"flex-start",alignItems:"center",textAlign:"left",flex:1,border:"1px solid #ebebeb",alignSelf:"stretch"},g=function(e){var n=e.item;return a.a.createElement("div",{style:Object(p.a)({},m)},a.a.createElement("input",{style:{border:"none",backgroundColor:"transparent",height:"100%",width:"100%",marginLeft:"5px",color:"#1C1C1C",fontWeight:"nomecompleto"===n?"bold":"normal"},type:"text",defaultValue:null===t||void 0===t?void 0:t[n],onMouseUp:function(e){return e.target.focus()},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onBlur:function(e){return c(r,e.target.value,[n])}}))};return a.a.createElement("div",{style:i},a.a.createElement("div",{style:{backgroundColor:!1===o&&Object.keys(h).length>=r&&0!==r?"rgba(255, 0, 0, 0.02)":o&&Object.keys(h).length>=r&&0!==r?"rgba(0, 128, 0, 0.02)":s&&!1===o||0===r&&!1===o&&Object.keys(h).length?"rgba(255, 0, 0, 0.02)":o&&0===r?"rgba(0, 128, 0, 0.02)":"transparent",width:"100%",display:"flex",justifyContent:"center",height:"44px",overflowY:f.length>11?"hidden":"scroll"}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},m),{},{width:"80px",border:"1px solid #ebebeb",flex:"none",height:"100%",justifyContent:"center",display:"flex"})},a.a.createElement("input",{type:"checkbox",style:{width:"16px",height:"16px",borderRadius:"15px",cursor:"pointer",backgroundColor:"transparent"},defaultChecked:l,onMouseUp:function(){n(r)}})),u.length>0&&u.map((function(e,t){return a.a.createElement(g,{item:e,key:t})})),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},m),{},{width:"60px",border:"1px solid #ebebeb",flex:"none",height:"100%",justifyContent:"center",display:"flex"})},o?a.a.createElement("div",null,a.a.createElement(re.a,{style:{color:"green",alignSelf:"center"}},"done")):a.a.createElement("div",null,a.a.createElement(ka.a,{title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"200px",marginBottom:"20px",fontSize:"16px",marginTop:"20px"}},a.a.createElement("p",null,null===s||void 0===s?void 0:s.emailError),a.a.createElement("p",null,null===s||void 0===s?void 0:s.nameError),a.a.createElement("p",null,null===s||void 0===s?void 0:s.emailErrorInv)))},a.a.createElement("div",{style:{alignSelf:"center"}},h&&Object.keys(h).length>0&&r===Object.keys(h).length||d&&0===r&&!Object.keys(h).length?a.a.createElement(be.a,null):0===r&&!1===o&&Object.keys(h).length||!1===o&&Object.keys(h).length>=r&&0!==r||s?a.a.createElement(re.a,{style:{color:"red",alignSelf:"center"}},"warning"):void 0))))))},hs=function(e){var t=e.resetComponent,r=e.message,n=e.title,o=e.icon,i=e.color,c=function(e){var t=e.children;return a.a.createElement("div",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0, 0, 0, 0.3)",left:"0% !important",right:"0%",top:"0%",bottom:"0%",zIndex:"9999",display:"flex",justifyContent:"center",overflowY:"scroll",overflowX:"hidden"}},t)},l=function(e){var t=e.children,r=(e.widthSize,e.id);return a.a.createElement("div",{style:{width:"500px",position:"absolute",borderRadius:"5px",backgroundColor:"#fafbfc",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",alignSelf:"center"},id:r},t)},s=function(e){var t=e.name,r=e.handleEvent,n=e.style,o=e.disabled,i=e.id;return a.a.createElement("button",{id:i,onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onMouseUp:r,disabled:o,style:Object(p.a)(Object(p.a)({},n),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:"transparent"})},t)};return a.a.createElement("div",{style:{height:"80vh",maxHeight:"600px",display:"flex",justifyContent:"center"}},a.a.createElement(c,null,a.a.createElement(l,null,a.a.createElement(Fi.a,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex",padding:"0px"}},a.a.createElement(re.a,{style:{alignSelf:"center"},color:i,size:"30px"},o),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",fontWeight:"bolder",marginBottom:"20px",color:"#141414"}},n)),a.a.createElement(Fi.a,{item:!0,xs:12,style:{justifyContent:"center",display:"flex",marginTop:"50px",padding:"0px"}},a.a.createElement("p",{style:{marginLeft:"30px",marginRight:"30px",fontWeight:"bolder"}},r)),a.a.createElement(Fi.a,{item:!0,xs:12,style:{justifyContent:"center",display:"flex",marginTop:"30px"}},a.a.createElement(s,{handleEvent:t,name:Object(S.w)("$__back"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",backgroundColor:"none",color:"black"}})))))};function ms(){ms=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var gs=function(e){var t=e.dataUser,r=e.resetComponent,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object(n.useState)(t),d=Object(m.a)(u,2),g=d[0],b=d[1],v=Object(n.useState)({}),y=Object(m.a)(v,2),x=y[0],w=y[1],_=Object(n.useState)([]),O=Object(m.a)(_,2),j=O[0],E=O[1],k=Object(n.useState)(!1),L=Object(m.a)(k,2),C=L[0],I=L[1],T=a.a.createRef(),D=Object(n.useState)([]),F=Object(m.a)(D,2),P=F[0],$=F[1],M=Object(n.useState)({}),B=Object(m.a)(M,2),z=B[0],Y=B[1],R=Object(n.useState)(!1),G=Object(m.a)(R,2),H=G[0],W=G[1];Object(n.useEffect)((function(){if(t.length>0){var e=t,r=["nomecompleto","nomedeexibi\xe7\xe3o","email","departamento/grupo","ramal","observa\xe7\xf5es","celular"];e=(e=(e=Object(A.a)(new Set(t.flatMap((function(e){return Object.keys(e)}))))).map((function(e){return e.toLowerCase()}))).filter((function(e){return r.includes(e)})),$(e);n=e,["nomecompleto","email"].every((function(e){return n.includes(e)}))?W(!1):W(!0)}var n}),[t]);var U=function(e){E((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(Object(A.a)(t),[e])}))},q=function(e,t,r){var n=Object(A.a)(g);n[e][r]=t,n&&b(n)},V=function(e){var t=e.name,r=e.handleEvent,n=e.style,o=e.disabled,i=e.id;return a.a.createElement("button",{id:i,onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onMouseUp:r,disabled:o,style:Object(p.a)(Object(p.a)({},n),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:"transparent"})},t)};Object(n.useEffect)((function(){if(x&&Object.keys(x).length>0&&Object.keys(x).length<Object.keys(g).length)setTimeout((function(){J(Object.keys(x).length)}),100);else if(Object.keys(x).length>0){!function(){if(!C){I(!0);var e=x;e=Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(m.a)(e,2);t[0];return!1===t[1].sended})));var t=[];r=e,n=function(e,r){if(!1===e.sended)return t=[].concat(Object(A.a)(t),[parseInt(r)])},Object.fromEntries(Object.entries(r).map((function(e,t){var r=Object(m.a)(e,2),a=r[0],o=r[1];return[a,n(o,a,t)]}))),b(g.filter((function(e,r){return t.includes(r)}))),e=Object.entries(e).reduce((function(e,t,r){var n=Object(m.a)(t,2),a=(n[0],n[1]);return e[r]=a,e}),{}),Y(e),w({})}var r,n}()}}),[x]);var J=function(){var t=Object(f.a)(ms().mark((function t(){var r,n,a,o,i,c,u,d=arguments;return ms().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=d.length>0&&void 0!==d[0]?d[0]:0,e.onAdding&&e.onAdding(!0),!(g.length>0)){t.next=31;break}return I(!1),n=Object(S.x)(g[r].email),t.next=7,Object(ke.g)(g[r].email);case 7:if(!(a=t.sent)){t.next=31;break}if(!(i=Object(p.a)(Object(p.a)({},x),{},Object(h.a)({},r,Object(p.a)(Object(p.a)(Object(p.a)({email:g[r].email,sended:!0},a&&(a.exists||Object.keys(x).filter((function(e){return x[e].email===g[r].email})).length>0)&&{sended:!1,emailError:Object(S.w)("$__emailAlreadyInUse")}),(null===(o=g[r])||void 0===o?void 0:o.nomecompleto.split("").length)<3&&{sended:!1,nameError:Object(S.w)("$__minimalNameField")}),!n&&{sended:!1,emailErrorInv:Object(S.w)("$__invalidEmail")}))))[r].sended){t.next=28;break}return c={name:g[r].nomedeexibi\u00e7\u00e3o||"".concat(g[r].nomecompleto.split(" ")[0]," ").concat(g[r].nomecompleto.split(" ")[1]?g[r].nomecompleto.split(" ")[1]:"").trim(),fullName:g[r].nomecompleto,email:g[r].email,line:g[r].ramal||null,phone:g[r].phone||null,obs:g[r].observa\u00e7\u00f5es||null},g[r]["departamento/grupo"]&&l.a.getState().db.userGroup.filter((function(e){return e.label===g[r]["departamento/grupo"]})).length>0&&(c.groups=Array.from(l.a.getState().db.userGroup.filter((function(e){return e.label===g[r]["departamento/grupo"]})))),t.prev=13,t.next=16,Fe.a.post("user/addImport",c);case 16:(u=t.sent)&&(Fe.a.post("user/accessSendInvite",{_id:u.data._id}),T&&T.current&&T.current.scrollToItem(r),w(i),g.length===r+1&&(s(!1),e.onAdding&&e.onAdding(!1))),t.next=26;break;case 20:t.prev=20,t.t0=t.catch(13),i[r]={sended:!1,nameError:Object(S.w)("$__serverError")},T&&T.current&&T.current.scrollToItem(r),w(i),g.length===r+1&&(s(!1),e.onAdding&&e.onAdding(!1));case 26:t.next=31;break;case 28:T&&T.current&&T.current.scrollToItem(r),w(i),g.length===r+1&&(s(!1),e.onAdding&&e.onAdding(!1));case 31:case"end":return t.stop()}}),t,null,[[13,20]])})));return function(){return t.apply(this,arguments)}}(),X={display:"flex",justifyContent:"flex-start",alignItems:"center",textAlign:"left",flex:1,border:"1px solid #ebebeb",fontWeight:"bold",alignSelf:"stretch",overflow:"hidden"},K=function(e){var t="";switch(e.name){case"nomecompleto":t=Object(S.w)("$__completeName");break;case"nomedeexibi\xe7\xe3o":t=Object(S.w)("$__showName");break;case"email":t=Object(S.w)("$__email");break;case"departamento/grupo":t=Object(S.w)("$__department/group");break;case"ramal":t=Object(S.w)("$__branchLine");break;case"observa\xe7\xf5es":t=Object(S.w)("$__observation");break;case"celular":t=Object(S.w)("$__phone")}return a.a.createElement("div",{style:X},a.a.createElement("p",{style:{width:"100%",alignSelf:"center",padding:"0px",overflow:"hidden",margin:"0px 0px 0px 10px"}},t))};return a.a.createElement(N.a,null,a.a.createElement(Fi.a,{item:!0,xs:12,style:{justifyContent:"center",padding:"0px 4px 0px",position:"re\xe7ative"}},c&&a.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",zIndex:"99"}}),0===g.length&&a.a.createElement(hs,{message:Object(S.w)("$__finalMsgUserImportConcluded"),title:Object(S.w)("$__concluded"),icon:"done",color:"green",resetComponent:r}),H?a.a.createElement(hs,{message:Object(S.w)("$__finalMsgUserImportError"),title:Object(S.w)("$__error"),icon:"warning",color:"red",resetComponent:r}):a.a.createElement("div",null,g.length>0&&a.a.createElement("div",{id:"table-container",style:{marginBottom:"5px",height:"80vh",maxHeight:"600px",overflow:"hidden"}},a.a.createElement("div",{style:{overflowY:"scroll"}},a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",height:"50px",color:"#141414"}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},X),{},{width:"80px",border:"1px solid #ebebeb",flex:"none",justifyContent:"center",display:"flex"})},a.a.createElement("p",{style:{alignSelf:"center",padding:"0px"}},Object(S.w)("$__remove"))),P.length>0&&P.map((function(e,t){return a.a.createElement(K,{name:e,key:t})})),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},X),{},{width:"60px",border:"1px solid #ebebeb",flex:"none",display:"flex"})},a.a.createElement("p",{style:{marginLeft:"2px",alignSelf:"center",padding:"0px",margin:"0px 0px 0px 10px"}}," ",Object(S.w)("$__stats"))))),g.length>0&&a.a.createElement(Uo.a,null,(function(e){var t=e.height,r=e.width;return a.a.createElement(Wo.a,{itemData:g,height:t,itemCount:g.length,itemSize:44,width:r,ref:T},(function(e){var t,r=e.data,n=e.index,o=e.style;return a.a.createElement("div",{key:"a_".concat(n,"_").concat(Math.random(0,99999999))},a.a.createElement(fs,{selected:!(!j||!j.includes(n)),column:P,handleDataChange:function(e,t,r){return q(e,t,r)},handleCheckboxChange:U,style:o,add:c,data:r,data1:x,dataError:z[n],usuario:r[n],index:n,isActive:!!(x&&r.length>0&&(null===(t=x[n])||void 0===t?void 0:t.sended))}))}))}))))),a.a.createElement(Fi.a,{item:!0,xs:12,style:{borderTop:"1px solid #ebebeb",display:"flex",justifyContent:"right",marginTop:"10px"}},!H&&!c&&a.a.createElement(a.a.Fragment,null,a.a.createElement(V,{handleEvent:function(){b(g.filter((function(e,t){return!j.includes(t)}))),E([])},name:Object(S.w)("$__removeSelected"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black",justifySelf:"left"}}),a.a.createElement(V,{handleEvent:function(){J(0),s(!0)},name:Object(S.w)("$__add"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black"}})," ")))},bs=r(1195),vs=r.n(bs),ys=r(1196),xs=r.n(ys),ws=Object(u.b)((function(e){return{importUsers:e.controls.importUsers}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(n.useState)([]),r=Object(m.a)(t,2),o=r[0],i=r[1],c=Object(n.useState)(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],f={padding:"5px 10px"},h={borderBottom:"1px solid #dddddd"},g={padding:"5px 25px",fontWeight:"bold",backgroundColor:"#f2f2f2"};return e.importUsers?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)",padding:33,margin:"auto",display:"flex",alignItems:"center",justifyContents:"center"}},a.a.createElement(Rr.a,{style:{maxWidth:"1400px",backgroundColor:"#ffffff",borderRadius:"5px",border:"2px solid #dedede",position:"relative",margin:"auto"}},a.a.createElement(Sn.a,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex"}},o.length>0&&!u&&a.a.createElement(re.a,{onClick:function(){return i([])},style:{alignSelf:"left",color:Object(S.d)("menu"),left:"25px",top:"25px",position:"absolute"},size:"30px"},"arrow_back"),!u&&a.a.createElement(re.a,{onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{importUsers:!1}))},style:{alignSelf:"left",color:Object(S.d)("menu"),right:"25px",top:"25px",position:"absolute"},size:"30px"},"close"),a.a.createElement(re.a,{style:{alignSelf:"center",color:Object(S.d)("menu")},size:"30px"},"download"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"20px",width:"240px",color:Object(S.d)("menu")}},Object(S.w)("$__importUsers"))),!o.length>0?a.a.createElement(a.a.Fragment,null," ",a.a.createElement(Sn.a,{item:!0,xs:6,style:{}},a.a.createElement(Sn.a,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(re.a,{style:{alignSelf:"center",color:Object(S.d)("menu")},size:"30px"},"task"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"10px"}},Object(S.w)("$__beforeImportUser"))),a.a.createElement(Sn.a,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginBottom:"10px"}},Object(S.w)("$__importUsersDescp"),a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(S.w)("$__email"),'" '),Object(S.w)("$__and")," ",a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(S.w)("$__completeName"),'"'),"."),a.a.createElement("a",{href:vs.a,style:{fontSize:"17px"},target:"_blank",rel:"noopener noreferrer",download:"Arquivo-Amostra"},a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(S.w)("$__clickToDownloadXLSX")))),a.a.createElement(Sn.a,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginTop:"10px"}},Object(S.w)("$__importUsersSecondDescp")),a.a.createElement("a",{href:xs.a,style:{fontSize:"16px"},target:"_blank",rel:"noopener noreferrer",download:"Arquivo-Amostra-Completo"},a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(S.w)("$__clickToDownloadXLSXOptions")))),a.a.createElement(Sn.a,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(re.a,{style:{alignSelf:"center",color:Object(S.d)("menu")},size:"30px"},"checklist"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"20px",color:Object(S.d)("menu")}},Object(S.w)("$__fieldOptions"))),a.a.createElement(Sn.a,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",marginBottom:"60px"}},a.a.createElement("table",{style:{borderCollapse:"collapse",fontSize:"0.9em",fontFamily:"sans-serif",width:"100%",minHeight:"300px",height:"100%",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},a.a.createElement("tbody",null,a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.w)("$__phone")),a.a.createElement("td",{style:g}," ",Object(S.w)("$__phoneDescpImportUsers"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.w)("$__branchLine")),a.a.createElement("td",{style:g},Object(S.w)("$__branchLineDescp"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.w)("$__observation")),a.a.createElement("td",{style:g},Object(S.w)("$__observationImportDescp"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.w)("$__department/group")),a.a.createElement("td",{style:g},Object(S.w)("$__department/groupDescp"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.w)("$__showName")),a.a.createElement("td",{style:g}," ",Object(S.w)("$__showNameDescp"))))))),a.a.createElement(Sn.a,{item:!0,xs:6,style:{border:"1px solid #ebebeb",display:"flex",justifyContent:"center"}},a.a.createElement(ps,{handleData:function(e){var t=e.reduce((function(e,t){var r=Object.entries(t).reduce((function(e,t){var r=Object(m.a)(t,2),n=r[0],a=r[1];return e[n.toLowerCase().replace(/\s/g,"")]=a.toString().trim(),e}),{});return[].concat(Object(A.a)(e),[r])}),[]);i(t)}}))):a.a.createElement(gs,{dataUser:o,resetComponent:function(){i([]),d(!1)},onAdding:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d(e)}}))):a.a.createElement(a.a.Fragment,null)}));function _s(){_s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Os=Object(u.b)((function(e){return{users:e.db.users,userGroup:e.db.userGroup,page:e.db.history,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(us)((function(e){var t,r,n=a.a.useState(!1),o=Object(m.a)(n,1)[0],i=a.a.useState(!1),s=Object(m.a)(i,1)[0],u=l.a.getState(),d=u.db,h=u.session,g=d.users,b=Object(S.j)(),y=window.location.hash.split("/");y[0]=y[0].replace("#","");var x=Object.keys(g).filter((function(e){return!g[e].deleted})).map((function(e){return g[e]})),w=function(){var t=Object(f.a)(_s().mark((function t(r){var n;return _s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Fe.a.post("/user_group/save",r),n=l.a.getState().db.userGroup,e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{userGroup:n.map((function(e){return e.value===r._id&&(e.label=r.name,r.icon&&(e.icon=r.icon)),e}))}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),_=e.nodeId?e.nodeId:v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),O=e.searchs&&e.searchs[_]?e.searchs[_]:{};O.text&&(x=x.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(O.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(O.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(O.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===y[0]&&"users"===y[1]&&(x=x.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===y[0]&&"units"===y[1]&&(x=x.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),(null===O||void 0===O||null===(t=O.userGroups)||void 0===t?void 0:t.length)>0&&(x=x.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return O.userGroups.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var j=Object.keys(g).map((function(e){return g[e]}));if("tab"===y[0]&&"units"===y[1]&&y[2]&&36===y[2].length&&(j=j.filter((function(e){return"user"===e.type&&e._parent===y[2]})).map((function(e){return e}))),(null===O||void 0===O?void 0:O.users)&&(null===O||void 0===O?void 0:O.userGroup.length)>0&&(j=j.filter((function(e){return e.groups.filter((function(e){return e.value===O.users.userGroup[0].value})).length>0})).map((function(e){return e}))),O.text&&(j=j.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(O.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(O.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(O.text.toLowerCase())>-1)})).map((function(e){return e}))),(null===O||void 0===O||null===(r=O.tags)||void 0===r?void 0:r.length)>0&&(j=j.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return O.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),b&&!b.owner&&!b.user)return a.a.createElement(ss,null);window.location.hash.split("/")[0].replace("#","")||c.a.push("c#tab/units");var E=function(e,t){var r,n,a,i;return!!(l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.a.getState().db.users[t].groups.length>0&&l.a.getState().db.users[t].groups.filter((function(t){return t.value===e.value})).length>0&&(!O.text||O.text&&(l.a.getState().db.users[t].name.toLowerCase().indexOf(O.text.toLowerCase())>-1||(null===(r=l.a.getState().db.users[t])||void 0===r||null===(n=r.email)||void 0===n?void 0:n.toLowerCase().indexOf(O.text.toLowerCase()))>-1))&&(!O.tags||(null===(a=l.a.getState().db.users[t])||void 0===a||null===(i=a.tags)||void 0===i?void 0:i.filter((function(e){return O.tags.filter((function(t){return t.value===e.value})).length>0})).length)>0)&&(!o&&(!l.a.getState().db.users[t]._parent||l.a.getState().db.users[t]._parent===h.account)||o&&l.a.getState().db.users[t]._parent&&l.a.getState().db.users[t]._parent!==h.account)&&(!s&&!l.a.getState().db.users[t].deleted||s&&l.a.getState().db.users[t].deleted))};return a.a.createElement("div",null,a.a.createElement(oa,null),a.a.createElement("div",null,a.a.createElement(ei.a,Object.assign({},"tab"!==y[0]||"departments"!==y[1]?{fields:["text","tags","userGroups"]}:{fields:["text","tags"]},{nodeId:_,showFilters:!0,style:{marginLeft:7},onChange:function(e){},title:{text:Object(S.w)("$__name")}})),a.a.createElement(Rr.a,null,"tab"===y[0]&&"departments"===y[1]?a.a.createElement("div",null,a.a.createElement("div",null,l.a.getState().db.userGroup.filter((function(e){return Object.keys(l.a.getState().db.users).filter((function(t){return E(e,t)})).length>0})).sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0})).map((function(e){var t=Object.keys(l.a.getState().db.users).filter((function(t){return E(e,t)}));return a.a.createElement("div",{key:e.value,style:{width:"100%",padding:7,marginBottom:77}},a.a.createElement(ge.a,Object.assign({title:e.label,icon:e.icon||null,color:Object(S.d)("menu"),style:{padding:"7px"}},b&&(b.userAdmin||b.userModerate)?{iconOnEditable:!0,editable:!0,onEdit:function(t){w(Object(p.a)(Object(p.a)({},t),{},{_id:e.value}))},placeholder:Object(S.w)("$__groupName")}:{})),a.a.createElement(Rr.a,null,t.sort((function(e,t){var r=l.a.getState().db.users[e].name.toLowerCase(),n=l.a.getState().db.users[t].name.toLowerCase();return r<n?-1:r<n?1:0})).map((function(t){return a.a.createElement(Sn.a,{key:"".concat(e.value,"_").concat(t),xs:12,sm:6,md:4,lg:4,xl:3,style:{minWidth:"300px"}},a.a.createElement(Bl,{data:l.a.getState().db.users[t]}))}))))})))):a.a.createElement(a.a.Fragment,null,x.sort((function(e,t){return e&&e.name&&e.name<t.name||g&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return!y[2]||y[2]&&e._id===y[2]?a.a.createElement(Sn.a,{key:e._id,xs:12,sm:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:6,md:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:4,lg:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:4,xl:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:3,style:{minWidth:"300px"}},a.a.createElement(Bl,{data:e,expanded:!!(y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]])})):!y[2]&&a.a.createElement(Sn.a,{key:e._id,xs:12,sm:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:6,md:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:4,lg:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:3,xl:y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]]?12:3},a.a.createElement(Bl,{data:e,expanded:!!(y[1]&&y[2]&&"units"===y[1]&&36===y[2].length&&d.users[y[2]])}))})),"tab"===y[0]&&"units"===y[1]&&y[2]&&36===y[2].length&&j.filter((function(e){return!e.deleted})).sort((function(e,t){return e&&e.name&&e.name<t.name||g&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return a.a.createElement(Sn.a,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Bl,{data:e}))}))))),a.a.createElement(ws,null))}))),js=r(1898),Es=r(1925),ks=["label","icon","defaultChecked"];function Ss(){Ss=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ls=Object(Y.a)({formControl:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& +:after":{border:"1px solid rgb(192,178,131)"},"& +:before":{borderBottom:"1px solid rgb(192,178,131)"}},switch:{"& + .MuiSwitch-track":{backgroundColor:"rgb(158, 158, 158)"},"& .MuiSwitch-thumb":{backgroundColor:"rgb(125, 125, 125)"},"& .Mui-checked":{"& + .MuiSwitch-track":{backgroundColor:"rgb(192, 178, 131)"},"& .MuiSwitch-thumb":{backgroundColor:"rgb(192, 178, 131)"},"& .MuiSvgIcon-root":{backgroundColor:"rgb(192, 178, 131)",borderRadius:"50%",width:"20px",height:"20px",color:"rgb(192, 178, 131)"}},"& .Mui-disabled":{"& + .MuiSwitch-track":{opacity:.5},"& .MuiSvgIcon-root":{backgroundColor:"rgb(192, 178, 131)",borderRadius:"50%",width:"14px !important",height:"14px !important",padding:"3px",color:"#ffffffb0 !important",transform:"translate(0, 0, 0, 0.2em)"}}},labelSwitch:{marginLeft:"15px"}}),Cs=function(e){var t=e.label,r=(e.icon,e.defaultChecked),o=Object(ft.a)(e,ks),i=Object(n.useState)(r),c=Object(m.a)(i,2),l=c[0],s=c[1],u=Ls();return a.a.createElement(Xr.a,{control:a.a.createElement(js.a,Object.assign({className:u.switch,color:"default",checked:l,onChange:function(e){s(e.target.checked)}},o)),label:t})},Is=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,o,i=Ls(),c=Object(n.useState)((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t._id)||Object(Nr.a)()),s=Object(m.a)(c,2),u=s[0],d=s[1],g=Object(n.useState)(""),b=Object(m.a)(g,2),v=b[0],y=b[1],x=Object(n.useState)(!1),w=Object(m.a)(x,2),_=w[0],O=w[1],j=Object(n.useState)(""),E=Object(m.a)(j,2),k=E[0],L=E[1],C=Object(n.useState)([]),I=Object(m.a)(C,2),T=I[0],D=I[1],F=Object(n.useState)({}),N=Object(m.a)(F,2),P=N[0],$=N[1],M=Object(n.useState)({type:"text"}),B=Object(m.a)(M,2),z=B[0],Y=B[1];function H(e,t){var r=Object(A.a)(T),n=r.splice(e,1)[0];r.splice(t,0,n),D(r)}Object(n.useEffect)((function(){var t,r,n,a;d((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t._id)||Object(Nr.a)()),y((null===(r=e.data)||void 0===r?void 0:r.name)||""),D((null===(n=e.data)||void 0===n?void 0:n.elements)?JSON.parse(e.data.elements):[]),O((null===(a=e.data)||void 0===a?void 0:a.boardColumns)||!1)}),[e.data]);var V=function(){var t=Object(f.a)(Ss().mark((function t(r){return Ss().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Fe.a.post("forms/add",{_id:u,name:v,boardColumns:_,elements:JSON.stringify(T)}),e.reduxFunction("ASYNC","SET_FORMS",Object(p.a)(Object(p.a)({},l.a.getState().forms),{},Object(h.a)({},u,{_id:u,name:v,boardColumns:_,elements:JSON.stringify(T)}))),e.onClose&&r&&e.onClose();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement(R.a,{onClickAway:function(){}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.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",padding:0})},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,justifyContent:"flex-end",margin:"0px"}},a.a.createElement("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:"30%",backgroundColor:"#fafbfc",overflowY:"scroll"}},a.a.createElement("h1",{style:{margin:"20px 15px"}},v),a.a.createElement("div",{id:"form",style:{padding:"10px 15px",display:"flex",justifyContent:"center",alignItems:"flex-start",flexDirection:"column",gap:"5px",paddingBottom:"50px"}},null===T||void 0===T?void 0:T.map((function(e,t){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"20px",alignItems:"center",marginBottom:"10px",width:"100%"},onMouseOver:function(){return $(Object(p.a)(Object(p.a)({},P),{},Object(h.a)({},e.id,!0)))},onMouseLeave:function(){return $(Object(p.a)(Object(p.a)({},P),{},Object(h.a)({},e.id,!1)))},key:e.id},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%"}},a.a.createElement("label",{htmlFor:e.id,style:{marginBottom:"5px",display:"flex"}},e.name,e.required?"*":"",":"),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"radio"===e.type||"checkbox"===e.type?a.a.createElement("div",{style:{flexDirection:"column",width:"100%"}},null===e||void 0===e?void 0:e.items.map((function(t,r){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"},key:"ITEM_".concat(e.id,"_").concat(r)},a.a.createElement("input",{type:e.type,id:t,name:e.id,required:!!e.required}),a.a.createElement("label",{htmlFor:t,style:{color:"#aaa"}},t))}))):"textarea"===e.type?a.a.createElement("textarea",{rows:4,required:!!e.required,id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}}):a.a.createElement("input",{type:e.type,required:!!e.required,id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}}),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center",color:"rgb(171 171 171)"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},P[e.id]?a.a.createElement(a.a.Fragment,null,0===t?null:a.a.createElement("div",{style:{padding:7,cursor:"pointer"},onClick:function(){return H(t,t-1)}},a.a.createElement(re.a,{style:{cursor:"pointer",backgroundColor:"#eee",borderRadius:"50%"}},"arrow_drop_up")),t===T.length-1?null:a.a.createElement("div",{style:{padding:7,cursor:"pointer"},onClick:function(){return H(t,t+1)}},a.a.createElement(re.a,{style:{cursor:"pointer",backgroundColor:"#eee",borderRadius:"50%"}},"arrow_drop_down")),a.a.createElement("div",{style:{padding:7,cursor:"pointer"},onClick:function(){return function(e){Object(S.c)({message:Object(S.w)("$__confirmDeleteField",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){D(T.filter((function(t){return t.id!==e})))}})}(e.id)}},a.a.createElement(re.a,null,"delete")),a.a.createElement("div",{style:{padding:7,cursor:"pointer"},onClick:function(){return Y(e)}},a.a.createElement(re.a,null,"edit"))):a.a.createElement(a.a.Fragment,null))))))})))),a.a.createElement("div",{style:(r={backgroundColor:"#fafbfc",position:"absolute",top:0,bottom:0,right:0,left:"70%"},Object(h.a)(r,"backgroundColor","#fafbfc"),Object(h.a)(r,"overflowY","scroll"),Object(h.a)(r,"height","100%"),Object(h.a)(r,"display","flex"),Object(h.a)(r,"flexDirection","row"),Object(h.a)(r,"paddingBottom",100),r)},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%",borderLeft:"3px solid rgb(192,178,131)"}},a.a.createElement("div",{style:{height:"50px",minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"space-between",width:"calc(100% - 0px)",marginTop:"-4px"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(re.a,{style:{margin:"0px 10px"}},"edit_note"),a.a.createElement("div",{style:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"bold",color:"rgb(1, 30, 65)"}},Object(S.w)("$__createForm"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"}},(null===T||void 0===T?void 0:T.length)>0&&v?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"25px",width:"25px",fontSize:"25px",color:"rgb(192, 178, 131)",opacity:"1",cursor:"pointer"},onClick:function(){V()}},a.a.createElement(re.a,null,"save")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"25px",width:"25px",fontSize:"25px",color:"green",opacity:"1",cursor:"pointer"},onClick:function(){V(!0)}},a.a.createElement(re.a,null,"playlist_add_check"))):null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"25px",width:"25px",fontSize:"25px",color:"lightgrey",opacity:"1",cursor:"pointer"},onClick:e.onClose?function(){return e.onClose()}:null},a.a.createElement(re.a,null,"cancel")))),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",right:"0px",padding:"4px 25px",position:"relative",backgroundColor:"rgb(192,178,131)",marginBottom:"10px",alignItems:"center",color:"#fff"}}),a.a.createElement("div",{style:{maxHeight:"75vh",overflowY:"auto",padding:"0px 15px",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",gap:"10px"}},a.a.createElement("div",null,a.a.createElement(W.a,{className:i.formControl,variant:"standard"},a.a.createElement(U.a,{htmlFor:"titleForm",className:i.formControl},Object(S.w)("$__formName")),a.a.createElement(q.a,{id:"titleForm",type:"text",onChange:function(e){return y(e.target.value)},value:v}),a.a.createElement(Cs,{label:Object(S.w)("$__showBoardColumns"),defaultChecked:!0,onClick:function(){O(!_)},checked:_})),a.a.createElement("fieldset",{style:{borderRadius:10,padding:7,marginTop:33}},a.a.createElement("legend",null,Object(S.w)("$__field")),a.a.createElement("form",{id:"adicionar",onSubmit:function(e){e.preventDefault()}},a.a.createElement(W.a,{className:i.formControl,variant:"standard"},a.a.createElement(U.a,{htmlFor:"title",className:i.formControl},Object(S.w)("$__title")),a.a.createElement(q.a,{id:"title",type:"text",onChange:function(e){Y(Object(p.a)(Object(p.a)({},z),{},{name:e.target.value}))},value:z.name||""})),a.a.createElement("div",null,a.a.createElement(W.a,{variant:"standard",fullWidth:!0,className:i.formControl},a.a.createElement(U.a,{id:"typeField",className:i.formControl},Object(S.w)("$__type")),a.a.createElement(Es.a,{value:z.type||"text",onChange:function(e){Y((function(t){return Object(p.a)(Object(p.a)({},t),{},{type:e.target.value},"radio"===e.target.value||"checkbox"===e.target.value?{items:z.items||[""]}:{})}))},labelId:"typeField",id:"typeField",label:"Tipo de campo"},a.a.createElement(G.a,{value:"text"},Object(S.w)("$__shortText")),a.a.createElement(G.a,{value:"textarea"},Object(S.w)("$__longText")),a.a.createElement(G.a,{value:"radio"},Object(S.w)("$__selection")),a.a.createElement(G.a,{value:"checkbox"},Object(S.w)("$__multiSelection")),a.a.createElement(G.a,{value:"date"},Object(S.w)("$__date")),a.a.createElement(G.a,{value:"number"},Object(S.w)("$__number")))),"radio"===z.type||"checkbox"===z.type?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{htmlFor:"legendRadio"},Object(S.w)("$__options")),null===z||void 0===z||null===(o=z.items)||void 0===o?void 0:o.map((function(e,t){return a.a.createElement("div",{style:{marginBotton:15,width:"100%",clear:"both",position:"relative"},key:t},a.a.createElement(_e.a,{id:"sideModule_user_fullName",label:"".concat(Object(S.w)("$__option",1)," ").concat(t+1),variant:Object(S.d)("fieldVariant"),name:"option".concat(e+1),InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"delete",color:"red",onClick:function(){var e=Array.from(z.items);1===e.length?e[0]="":e.splice(t,1),Y(Object(p.a)(Object(p.a)({},z),{},{items:e}))}})),onChange:function(e){var r=Array.from(z.items);r[t]=e.target.value,0===r.filter((function(e){return""===e})).length&&r.push(""),Y(Object(p.a)(Object(p.a)({},z),{},{items:r}))}},value:z.items[t],placeholder:Object(S.w)("$__optionText",1),autoFocus:0===t}))})))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Cs,{label:Object(S.w)("$__required"),defaultChecked:!0,onClick:function(){Y(Object(p.a)(Object(p.a)({},z),{},{required:!z.required}))},checked:!!(null===z||void 0===z?void 0:z.required)}),T.length>0?a.a.createElement(Cs,{label:Object(S.w)("$__dependsOnAnotherAnswew"),onClick:function(){Y(Object(p.a)(Object(p.a)({},z),{},{depends:!z.depends}))},checked:!!(null===z||void 0===z?void 0:z.depends)}):a.a.createElement(a.a.Fragment,null),(null===z||void 0===z?void 0:z.depends)?a.a.createElement("div",null,T.map((function(e){return a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"},key:e.id},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"}},a.a.createElement("input",Object.assign({type:"radio",id:"R_".concat(e.id),name:"dependsOn"},z&&z.dependsOn&&String(z.dependsOn)===String(e.id)?{defaultChecked:!0}:{},{onClick:function(){Y(Object(p.a)(Object(p.a)({},z),{},{dependsOn:e.id}))}})),a.a.createElement("label",{htmlFor:"R_".concat(e.id)},e.name)),z&&z.dependsOn&&z.dependsOn===e.id?a.a.createElement(a.a.Fragment,null,"radio"===e.type||"checkbox"===e.type?null===e||void 0===e?void 0:e.items.map((function(t,r){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 15px"},key:"ITEM_".concat(e.id,"_").concat(r)},a.a.createElement("div",null,a.a.createElement("input",Object.assign({type:e.type,id:"R_".concat(t),name:e.id},"checkbox"===e.type&&0===r&&(!z.dependsValue||z.dependsValue&&0===z.dependsValue.length||z.dependsValue&&1===z.dependsValue.length&&z.dependsValue.indexOf(t)>-1)?{defaultChecked:!0}:{},"radio"===e.type?{checked:!(!z||!z.dependsValue||z.dependsValue!==t)}:{},{onClick:function(r){var n=t;"checkbox"===e.type&&(z&&(!z.dependsValue||z.dependsValue&&-1===z.dependsValue.indexOf(t))?(n=Array.from(z.dependsValue||[])).push(t):z&&z.dependsValue&&z.dependsValue.indexOf(t)>-1&&(n=Array.from(z.dependsValue)).splice(z.dependsValue.indexOf(t),1)),Y(Object(p.a)(Object(p.a)({},z),{},{dependsValue:n}))}})),a.a.createElement("label",{htmlFor:"R_".concat(t),style:{color:"#aaa"}},t)))})):"textarea"===e.type?a.a.createElement("textarea",{rows:4,onChange:function(e){return Y(Object(p.a)(Object(p.a)({},z),{},{dependsValue:e.target.value}))},id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}}):a.a.createElement("input",{type:e.type,onChange:function(e){return Y(Object(p.a)(Object(p.a)({},z),{},{dependsValue:e.target.value}))},id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}})):null)}))):null,a.a.createElement("button",{onClick:function(){!function(){var e,t=z.id||"".concat(Math.random().toString(36).slice(2).substr(0,4)).concat(Math.floor(Date.now()*Math.random()).toString(36).substr(0,4)),r=Object(p.a)(Object(p.a)({},z),{},{id:t});if(r.type||(r.type="text"),(null===r||void 0===r||null===(e=r.items)||void 0===e?void 0:e.length)>0&&(r.items=Array.from(r.items.filter((function(e){return""!==e&&void 0!==e&&null!==e})))||null),("checkbox"===r.type||"radio"===r.type)&&0===r.items.filter((function(e){return""!==e&&void 0!==e&&null!==e})).length)return L(Object(S.w)("$__formWarningOptionsListRequire")),void setTimeout((function(){L("")}),4e3);if(!r.type||!r.name)return L(Object(S.w)("$__formWarningNameAndType")),void setTimeout((function(){L("")}),4e3);if(T.filter((function(e){return e.name===z.name&&e.id!==z.id})).length>0)return L("O t\xedtulo para o campo j\xe1 foi definido para outro campo, defina outro nome!"),L(Object(S.w)("$__formWarningFieldNameUsed")),void setTimeout((function(){L("")}),4e3);if(0===T.filter((function(e){return e.id===t})).length)D([].concat(Object(A.a)(T),[r]));else{var n=Array.from(T);n=Array.from(n.map((function(e){return e.id===z.id&&(e=r),e}))),D(Object(A.a)(n))}Y({})}()},style:{padding:"7px 30px",border:"rgb(1, 30, 65) 1px solid",background:"linear-gradient(90deg, rgb(1, 30, 65) 0%, rgb(0, 49, 112) 100%)",color:"rgb(192,178,131)",borderRadius:"4px",fontWeight:"600",margin:"10px 0",width:"100%",cursor:"pointer"}},z.id?Object(S.w)("$__save"):Object(S.w)("$__add"))))))),a.a.createElement("p",{style:{color:"red",fontSize:"0.8rem",textAlign:"center"}},k))))))))}));var Ts=Object(u.b)((function(e){return{forms:e.forms}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState({}),c=Object(m.a)(i,2),l=c[0],s=c[1],u=e.nodeId?e.nodeId:v()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();return a.a.createElement("div",null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",grid:5}},a.a.createElement(ei.a,{nodeId:u,fields:["text"],showFilters:!0,style:{marginLeft:7},onChange:function(e){o(e)},title:{text:Object(S.w)("$__formName")}}),a.a.createElement(Ka.a,{text:Object(S.w)("$__newForm"),icon:"add",onClick:function(){s({new:!0})}})),a.a.createElement(Rr.a,{style:{margin:0,marginTop:33,padding:0,marginLeft:-15}},e.forms&&Object.keys(e.forms).filter((function(t){return!n||!n.text||n&&n.text&&e.forms[t]&&e.forms[t].name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(t,r){return a.a.createElement(Sn.a,{xs:12,sm:12,md:3,lg:3,xl:2,key:"".concat(t,"-").concat(r)},a.a.createElement(Ct.a,{style:{marginBottom:15}},a.a.createElement("div",{style:{padding:7,cursor:"pointer"},onClick:function(){s(e.forms[t])}},a.a.createElement("div",{style:{fontSize:"18px",color:"gray",fontWeight:"bold"}},e.forms[t].name),a.a.createElement("div",{style:{fontSize:"12px",color:"gray",marginTop:15}},Object(S.w)("$__items"),": ",JSON.parse(e.forms[t].elements).length))))}))),Object.keys(l).length>0?a.a.createElement(Is,{data:l,onClose:function(){s({})}}):a.a.createElement(a.a.Fragment,null))})),Ds=r(1197);r(1135);var Fs=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(De)((function(e){var t=a.a.useState({cvc:"",expiry:"",focus:"",name:"",number:""}),r=Object(m.a)(t,2),n=r[0],o=r[1];return a.a.createElement("div",null,a.a.createElement(Ds.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.w)("$__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(_e.a,{id:"sideModule_user_displayName",label:Object(S.w)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"number",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{number:e.target.value}))}},value:n&&n.number?n.number:"",placeholder:Object(S.w)("$__cardNumber",1)})),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.w)("$__forceChangePassword")),a.a.createElement(Te.a,{checked:!!(n&&n._access&&n._access.user),onChange:function(e){},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__forceChangePasswordDescription")))})));function Ns(){Ns=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var As=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=function(){var e=Object(f.a)(Ns().mark((function e(){return Ns().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l.a.getState().functions.socket.emit("data",{module:"galaxPay",method:"post",action:"integration"},{action:"reqData",accountData:l.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(Fs,null),a.a.createElement("div",{style:{padding:15,backgroundColor:"black"},onClick:function(){t()}},"TEST"))})));function Ps(){Ps=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var $s=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!0),d=Object(m.a)(u,2),p=d[0],h=d[1];a.a.useEffect((function(){g()}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var g=function(){var e=Object(f.a)(Ps().mark((function e(){var t,r,n,a,i,c=arguments;return Ps().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>0&&void 0!==c[0]&&c[0],n=r,e.next=4,Pe.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}o({secretKey:"Bearer ".concat(a.data.token)}),e.next=13;break;case 9:return e.next=11,Fe.a.post("/api/token");case 11:(i=e.sent)&&o({secretKey:"Bearer ".concat(i.data.token)});case 13:h(!1);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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(N.a,null,p?a.a.createElement(ct.a,null):a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginTop:50}},a.a.createElement("legend",null,Object(S.w)("$__authorizationToken")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(_e.a,{label:Object(S.w)("$__authorizationToken",1),variant:Object(S.d)("fieldVariant"),name:"secretKey",InputLabelProps:{shrink:!0},InputProps:{multiline:!0,minRows:3,autoComplete:"new-password",type:l?"text":"password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement("div",{style:{cursor:"pointer",marginRight:7},onClick:function(){navigator.clipboard.writeText(n.secretKey)}},a.a.createElement(re.a,{icon:"content_copy"})),a.a.createElement(re.a,{icon:l?"visibility_off":"visibility",onClick:function(){s((function(e){return!e}))}}))},value:"".concat(n&&n.secretKey?n.secretKey:""),placeholder:Object(S.w)("$__secretKey",1),autoFocus:!0,disabled:!0})),a.a.createElement("i",null,Object(S.w)("$__secretKeyDescription"))),a.a.createElement("div",{style:{display:"none",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.w)("$__newToken"),text:Object(S.w)("$__newToken"),color:"green",icon:"refresh",size:"25px",onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmApiTokenRevokeAndRecreate",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){}})}})))))))}))),Ms=r(205),Bs=r.n(Ms);function zs(){zs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var Ys=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(t.GlobalData?t.GlobalData:{}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useState({historyEditor:null}),b=Object(m.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){i(t.GlobalData?t.GlobalData:{}),d(t.GlobalData?t.GlobalData:{});var e=B.EditorState.createEmpty(),r=B.EditorState.createEmpty(),n=B.EditorState.createEmpty(),a=B.EditorState.createEmpty(),o=B.EditorState.createEmpty(),c=B.EditorState.createEmpty();t.GlobalData.history&&(e=Bs()("<div>".concat(t.GlobalData.history,"</div>")),e=B.ContentState.createFromBlockArray(e.contentBlocks),e=B.EditorState.createWithContent(e)),t.GlobalData.strategicStatement&&(o=Bs()("<div>".concat(t.GlobalData.strategicStatement,"</div>")),o=B.ContentState.createFromBlockArray(o.contentBlocks),o=B.EditorState.createWithContent(o)),t.GlobalData.values&&(c=Bs()("<div>".concat(t.GlobalData.values,"</div>")),c=B.ContentState.createFromBlockArray(c.contentBlocks),c=B.EditorState.createWithContent(c)),t.GlobalData.vocation&&(r=Bs()("<div>".concat(t.GlobalData.vocation,"</div>")),r=B.ContentState.createFromBlockArray(r.contentBlocks),r=B.EditorState.createWithContent(r)),t.GlobalData.legacy&&(n=Bs()("<div>".concat(t.GlobalData.legacy,"</div>")),n=B.ContentState.createFromBlockArray(n.contentBlocks),n=B.EditorState.createWithContent(n)),t.GlobalData.message&&(a=Bs()("<div>".concat(t.GlobalData.message,"</div>")),a=B.ContentState.createFromBlockArray(a.contentBlocks),a=B.EditorState.createWithContent(a)),y({history:e,vocation:r,legacy:n,message:a,values:c,strategicStatement:o})}),[]);var x=function(){var t=Object(f.a)(zs().mark((function t(){var r;return zs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Object.keys(o).forEach((function(e){!o[e]||u[e]&&JSON.stringify({a:o[e]})===JSON.stringify({a:u[e]})||(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e])))})),console.log(r),t.prev=3,t.next=6,Fe.a.post("account/save",r);case 6:t.sent&&(i(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),d(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}))),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),console.log(t.t0);case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Rr.a,{style:{marginTop:15}},a.a.createElement(Sn.a,{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.w)("$__adminMessage")),a.a.createElement(N.a,null,a.a.createElement(z.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.message,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{message:M()(Object(B.convertToRaw)(e.getCurrentContent()))})),y(Object(p.a)(Object(p.a)({},v),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Sn.a,{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.w)("$__strategicStatement")),a.a.createElement(N.a,null,a.a.createElement(z.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.strategicStatement,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{strategicStatement:M()(Object(B.convertToRaw)(e.getCurrentContent()))})),y(Object(p.a)(Object(p.a)({},v),{},{strategicStatement:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Sn.a,{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.w)("$__vocation")),a.a.createElement(N.a,null,a.a.createElement(z.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.vocation,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{vocation:M()(Object(B.convertToRaw)(e.getCurrentContent()))})),y(Object(p.a)(Object(p.a)({},v),{},{vocation:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Sn.a,{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.w)("$__history")),a.a.createElement(N.a,null,a.a.createElement(z.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.history,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{history:M()(Object(B.convertToRaw)(e.getCurrentContent()))})),y(Object(p.a)(Object(p.a)({},v),{},{history:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Sn.a,{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.w)("$__values")),a.a.createElement(N.a,null,a.a.createElement(z.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.values,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{values:M()(Object(B.convertToRaw)(e.getCurrentContent()))})),y(Object(p.a)(Object(p.a)({},v),{},{values:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Sn.a,{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.w)("$__legacy")),a.a.createElement(N.a,null,a.a.createElement(z.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.legacy,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{legacy:M()(Object(B.convertToRaw)(e.getCurrentContent()))})),y(Object(p.a)(Object(p.a)({},v),{},{legacy:e}))},style:{minHeight:150},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}}))))),JSON.stringify(o)!==JSON.stringify(u)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){x()}})):a.a.createElement(a.a.Fragment,null))}));function Rs(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 Gs=r(908),Hs=r(180);function Ws(){Ws=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Us=Object(u.b)((function(e){return{session:e.session}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=l.a.getState().session,r=a.a.useState(t.GlobalData?t.GlobalData:{}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(t.GlobalData?t.GlobalData:{}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=function(){var r=Object(f.a)(Ws().mark((function r(){var n,a,i,c;return Ws().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},Object.keys(o).forEach((function(e){if("file"===e)a=o[e];else if("document"===e){var t=!1;11===o[e].length&&Gs.b.isValid(o[e])&&(t=!0),14===o[e].length&&Gs.a.isValid(o[e])&&(t=!0),t?n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e])):Object(S.c)({message:"".concat(Object(S.w)("$__".concat(e)),": ").concat(Object(S.w)("$__invalidDocument")),variant:"warning",persist:!1,horizontal:"right",confirm:null})}else!o[e]||u[e]&&JSON.stringify({a:o[e]})===JSON.stringify({a:u[e]})?o[e]||"_id"===e||Object(S.c)({message:"".concat(Object(S.w)("$__".concat(e)),": ").concat(Object(S.w)("$__cantBeEmpty")),variant:"warning",persist:!1,horizontal:"right",confirm:null}):n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e]))})),r.prev=2,!a){r.next=9;break}return r.next=6,Object(Hs.a)(t.account,a);case 6:r.t0=r.sent,r.next=10;break;case 9:r.t0=!0;case 10:if(!(i=r.t0)){r.next=17;break}return"true"!==String(i)&&(n=Object(p.a)(Object(p.a)({},n),{},{image:i})),r.next=15,Fe.a.post("/account/save",n);case 15:(c=r.sent)&&(c.error?console.log("companyDataError",c.error):(e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),n)})),d(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),n))));case 17:r.next=22;break;case 19:r.prev=19,r.t1=r.catch(2),console.log(r.t1);case 22:case"end":return r.stop()}}),r,null,[[2,19]])})));return function(){return r.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(we.a,{maxWidthOrHeight:600,img:o&&o.image?o.image:null,onChange:function(e,t){i(Object(p.a)(Object(p.a)({},o),{},{file:t}))},avatar:!0,avatarIcon:"business"})),a.a.createElement(_e.a,{id:"sideModule_user_fullName",label:Object(S.w)("$__fullCompanyName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"business"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{fullName:e.target.value}))},onBlur:function(e){if(o&&!o.fullName){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";i(Object(p.a)(Object(p.a)({},o),{},{fullName:t}))}}},value:o&&o.fullName?o.fullName:"",placeholder:Object(S.w)("$__fullName",1),autoFocus:!0,disabled:!0}),a.a.createElement(_e.a,{id:"sideModule_user_displayName",label:Object(S.w)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{name:e.target.value}))}},value:o&&o.name?o.name:"",placeholder:Object(S.w)("$__displayName",1),disabled:!0}),a.a.createElement(_e.a,{id:"customURL",label:Object(S.w)("$__customURL",1),variant:Object(S.d)("fieldVariant"),name:"customURL",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement("span",{style:{color:"gray",fontSize:12}},".machen.ai")),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{customURL:e.target.value.trim()}))},onBlur:function(e){o&&!o.fullName&&i(Object(p.a)(Object(p.a)({},o),{},{customURL:e.target.value.trim()}))}},value:o&&o.customURL?o.customURL:"",placeholder:Object(S.w)("$__customURL",1),autoFocus:!0}),a.a.createElement(_e.a,{id:"__documentCPForCNPJ",label:Object(S.w)("$__documentCPForCNPJ",1),variant:Object(S.d)("fieldVariant"),name:"document",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{document:e.target.value}))}},value:o&&o.document?o.document:"",placeholder:Object(S.w)("$__displayName",1),disabled:!!u.document}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__accountResponsible")),a.a.createElement(N.a,null,a.a.createElement(Ec.a,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:o.accountResponsible?[o.accountResponsible]:null,onSelect:function(e){i(Object(p.a)(Object(p.a)({},o),{},{accountResponsible:e[0]}))}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__invoiceResponsible")),a.a.createElement(N.a,null,a.a.createElement(Ec.a,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:o.invoiceResponsible?[o.invoiceResponsible]:null,onSelect:function(e){i(Object(p.a)(Object(p.a)({},o),{},{invoiceResponsible:e[0]}))}}))),a.a.createElement("ul",{style:{color:Object(S.d)("color")}},a.a.createElement("li",null,Object(S.w)("$__createdAt"),": ",Object(S.k)(o.created_at)),o.expire_at?a.a.createElement("li",{style:{color:Object(S.d)("menu")}},Object(S.w)("$__expireDate"),": ",Object(S.k)(o.expire_at)):a.a.createElement(a.a.Fragment,null)),JSON.stringify(o)!==JSON.stringify(u)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){g()}})):a.a.createElement(a.a.Fragment,null))})));function qs(){qs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Vs=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.session,n=t.db,o=a.a.useState(r.GlobalData?r.GlobalData:{}),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(r.GlobalData?r.GlobalData:{}),d=Object(m.a)(u,2),g=d[0],b=d[1],v=function(){var t=Object(f.a)(qs().mark((function t(){var r;return qs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Object.keys(c).forEach((function(e){!String(c[e])||g[e]&&JSON.stringify({a:c[e]})===JSON.stringify({a:g[e]})||(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e])))})),!r.requireExpirePassword&&r.expiresIn&&(r.expiresIn=null),t.prev=3,t.next=6,Fe.a.post("account/save",r);case 6:t.sent&&(s(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),b(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}))),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),console.log(t.t0);case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{grid:7}},a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.w)("$__hideDeletedUsersInTimelines")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!(!c||!c.hideDeletedUsers),onChange:function(e){var t=Object(p.a)(Object(p.a)({},c),{},{hideDeletedUsers:!c.hideDeletedUsers||null});s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__required")),a.a.createElement("i",null,Object(S.w)("$__hideDeletedUsersDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.w)("$__2FactorTokenRequired")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!(!c||!c.requireToken),onChange:function(e){var t=Object(p.a)(Object(p.a)({},c),{},{requireToken:!c.requireToken||null});s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__required")),a.a.createElement("i",null,Object(S.w)("$__2FactorTokenRequiredDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.w)("$__forceChangePassword")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!(!c||!c.requireExpirePassword),onChange:function(e){var t=Object(p.a)(Object(p.a)({},c),{},{requireExpirePassword:!c.requireExpirePassword||null},c.requireExpirePassword?{passwordExpire:null}:{});s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__required")),a.a.createElement("i",null,Object(S.w)("$__forceChangePasswordDescription")),c.requireExpirePassword?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__sessionDuration",1)),a.a.createElement(Be.a,{id:"combo-box-demo",options:n.passwordExpire,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(c.passwordExpire)}))[0]:n.passwordExpire[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:c&&c.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(c.passwordExpire)}))[0]:n.passwordExpire.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{passwordExpire:t.value}))}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__language",1)),a.a.createElement(Be.a,{id:"combo-box-demo",options:n.languages,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(c.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(c.language)}))[0]:n.languages[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__language",1),variant:Object(S.d)("fieldVariant"),value:c&&c.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(c.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(c.language)}))[0]:n.languages[0]}))},onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{language:t.value}))}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__sessionExpire",1)),a.a.createElement(Be.a,{id:"combo-box-demo",options:n.expiresIn,getOptionLabel:function(e){return Object(S.w)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(c.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return a.a.createElement(_e.a,Object.assign({},e,{label:Object(S.w)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:c&&c.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(c.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{expiresIn:t.value}))}})),JSON.stringify(c)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){v()}})):a.a.createElement(a.a.Fragment,null))})),Js=Object(Y.a)({list:{position:"relative",listStyleType:"disclosure-closed","& li":{marginBottom:3}},item:{display:"flex",alignItems:"center"}});var Xs=Object(u.b)((function(e,t){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.planDetails,r=e.data,n=Js(),o=a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.w)("$__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.w)("$__subscription"),": ",a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)(t.label))),a.a.createElement("ul",{className:n.list},a.a.createElement("li",null,Object(S.w)("$__adminLimit",1),": ",r&&r.customAdminsLimit?r.customAdminsLimit:t.settings.admins),a.a.createElement("li",null,Object(S.w)("$__storageSpace",1),": ",r&&r.customStorageSpace?Object(S.a)(r.customStorageSpace):Object(S.a)(t.settings.space)),a.a.createElement("li",null,Object(S.w)("$__BrightAndConnected",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:n.item},Object(S.w)("$__feed",1),": ",t.settings.brightAndConnected.feed?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),t.settings.brightAndConnected.feed?a.a.createElement("li",{className:n.item},Object(S.w)("$__feedDays",1),":",t.settings.brightAndConnected.feedDays?"".concat(t.settings.brightAndConnected.feedDays," ").concat(Object(S.w)("$__days")):Object(S.w)("$__unlimited")):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:n.item},Object(S.w)("$__radarLimit",1),": ",t.settings.brightAndConnected.radarLimit?t.settings.brightAndConnected.radarLimit:Object(S.w)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.w)("$__insights",1),": ",t.settings.brightAndConnected.insight?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o))),a.a.createElement("li",null,Object(S.w)("$__plannings",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:n.item},Object(S.w)("$__limit",1),": ",t.settings.plan.limit?t.settings.brightAndConnected.radarLimit:Object(S.w)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.w)("$__clientPlannings",1),": ",t.settings.plan.planClient?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),t.settings.plan.planClient?a.a.createElement("li",{className:n.item},Object(S.w)("$__clientUserAdmins",1),": ",t.settings.plan.clientAdmin?t.settings.plan.clientAdmin:o):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:n.item},Object(S.w)("$__externalPlanning",1),": ",t.settings.plan.machenPlan?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),a.a.createElement("li",{className:n.item},Object(S.w)("$__professionalTemplates",1),": ",t.settings.plan.templates?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),a.a.createElement("li",{className:n.item},Object(S.w)("$__guidelineLimit",1),": ",t.settings.plan.guidelineLimit?t.settings.plan.guidelineLimit:Object(S.w)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.w)("$__feedLimit",1),": ",t.settings.plan.feedLimit?t.settings.plan.feedLimit:Object(S.w)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.w)("$__radarLimit",1),": ",t.settings.plan.radarLimit?t.settings.plan.radarLimit:Object(S.w)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.w)("$__insightLimit",1),": ",t.settings.plan.insightLimit?t.settings.plan.insightLimit:Object(S.w)("$__unlimited")))),a.a.createElement("a",{href:"https://machen.ai/#planos",target:"_blank",rel:"noopener noreferrer",style:{fontWeight:"bold",color:Object(S.d)("menu"),marginTop:33}},Object(S.w)("$__viewMoreDetails")))))}));function Ks(){Ks=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var Zs=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=l.a.getState(),r=t.session,n=t.db,o=a.a.useState(0),i=Object(m.a)(o,2),s=i[0],u=i[1];a.a.useEffect((function(){}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return p(),function(){clearTimeout(e)}}),[e.history]);var d=window.location.hash.split("/");d[0]=d[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||c.a.push("sp#tab/home"),d[0]&&36===d[0].length&&!l.a.getState().db.cards[d[0]]&&c.a.push("/deniedAccess");var p=function(){var e=Object(f.a)(Ks().mark((function e(){var t;return Ks().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.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)}}(),h=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&&(h=n.plans[r.GlobalData.plan].settings.space,g=n.plans[r.GlobalData.plan]);var b=s*(100/parseInt(h));return a.a.createElement("div",null,a.a.createElement(Rr.a,{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement(Sn.a,{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(re.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.w)("$__subscriptionPlan","*"),": ",Object(S.w)(g.label,"*")),a.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.w)("$__adminLimit",1),": ",g.settings.admins)))),a.a.createElement(Sn.a,{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(re.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.w)("$__usedStorage","*"),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.w)("$__upgradeSubscription"))),a.a.createElement(Rs,{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.w)("$__used",1),": ",Object(S.a)(s))," ",a.a.createElement("span",{style:{color:"lightgray",fontSize:11}},Object(S.w)("$__of")," ",Object(S.w)("$__accountSpace",1),": ",Object(S.a)(h))))))),a.a.createElement(Rr.a,{style:{}},a.a.createElement(Sn.a,{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(N.a,null,a.a.createElement(Us,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(Sn.a,{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(N.a,null,a.a.createElement(Vs,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(Sn.a,{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.w)("$__subscriptionDetails"),a.a.createElement(N.a,null,a.a.createElement(Xs,{data:r&&r.GlobalData?r.GlobalData:{},planDetails:g}))))))}))),Qs=r(131),eu=r.n(Qs),tu=r(1203),ru=(r(856),r(857),["onSelect"]),nu=function(e){var t=e.onSelect,r=Object(ft.a)(e,ru);return a.a.createElement(Qs.Panel,Object.assign({},r,{onChange:function(e){t(e.color,e.alpha/100)},animation:"slide-up"}))};var au=function(e){var t,r,o=Object(n.useState)(!1),i=Object(m.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.forEach((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].trim(),", ").concat(n[1].trim(),", ").concat(n[2].trim(),")"),offset:"".concat(a.trim()),opacity:"".concat(n[3].trim())})}})),r}(e.value.css):(null===e||void 0===e||null===(r=e.value)||void 0===r?void 0:r.color)||[];return a.a.createElement(tu.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.forEach((function(e,t){e.color.indexOf("#")>-1&&(n="".concat(n).concat(Object(S.m)(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(nu,null))};function ou(){ou=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var iu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=l.a.getState().session,r=t.custom,n=a.a.useState(t.custom||{}),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState({}),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState({}),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(null),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useState(null),L=Object(m.a)(E,2),C=L[0],I=L[1],T=a.a.useState(!1),D=Object(m.a)(T,2),F=D[0],A=D[1],P=a.a.useState(!1),$=Object(m.a)(P,2),M=$[0],B=$[1];a.a.useEffect((function(){g(t.custom||{})}),[]),a.a.useEffect((function(){F&&setTimeout((function(){A(!1)}),500)}),[F]);var z=function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{custom:Object(p.a)(Object(p.a)({},l.a.getState().session.custom),{},Object(h.a)({},t.name,t.value))})),x(Object(p.a)(Object(p.a)({},l.a.getState().session.custom),{},Object(h.a)({},t.name,t.value))),c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.name,t.value)))},Y=function(){var t=Object(f.a)(ou().mark((function t(){return ou().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(d),x({}),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{custom:d}));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var e=Object(f.a)(ou().mark((function e(){var n,a,o;return ou().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B(!0),n=Object(p.a)(Object(p.a)({},(null===r||void 0===r?void 0:r.custom)?JSON.parse(null===r||void 0===r?void 0:r.custom):{}),y),c(n),g(n),e.prev=4,!O){e.next=11;break}return e.next=8,Object(Hs.a)(t.account,O);case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=!0;case 12:if(a=e.t0,!C){e.next=19;break}return e.next=16,Object(Hs.a)(t.account,C);case 16:e.t1=e.sent,e.next=20;break;case 19:e.t1=!0;case 20:if(o=e.t1,!a||!o){e.next=29;break}return O&&(n=Object(p.a)(Object(p.a)({},n),{},{customLogo:a})),C&&(n=Object(p.a)(Object(p.a)({},n),{},{loginBackground:o})),n.custom&&delete n.custom,e.next=27,Fe.a.post("/account/save",{custom:JSON.stringify(n)});case 27:e.sent&&(B(!1),x({}));case 29:e.next=34;break;case 31:e.prev=31,e.t2=e.catch(4),console.log(e.t2);case 34:case"end":return e.stop()}}),e,null,[[4,31]])})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__logo")),a.a.createElement(we.a,{maxWidthOrHeight:600,img:r.customLogo,onChange:function(e,t){j(t),z({name:"customLogo",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".png",checkOrientation:!0})))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__loginBackground")),a.a.createElement(we.a,{maxWidthOrHeight:2e3,img:r.loginBackground,onChange:function(e,t){I(t),z({name:"loginBackground",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".jpg, .jpeg",checkOrientation:!0})))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__backgroundColumnsTitle")),a.a.createElement(Or.a,{title:Object(S.w)("$__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:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.ColumnTitleColor},onChange:function(e){z({name:"ColumnTitleColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.colorText||null,mode:"RGB",onChange:function(e){z({name:"colorText",value:e.color})}}),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__text")))))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__menu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.menuColor},onChange:function(e){z({name:"menuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.menuButtonColor,mode:"RGB",onChange:function(e){z({name:"menuButtonColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__menuText"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.active,mode:"RGB",onChange:function(e){z({name:"active",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__menuActiveText"))))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__submenu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.subMenuColor},onChange:function(e){z({name:"subMenuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColor,mode:"RGB",onChange:function(e){z({name:"subMenuTextColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__menuTextIconColor"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColorActive,mode:"RGB",onChange:function(e){z({name:"subMenuTextColorActive",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__subMenuActiveText"))))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__complement")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.linearProgress},onChange:function(e){z({name:"linearProgress",value:e.css})}})),a.a.createElement(ct.a,{customColor:r.linearProgress}),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__progress"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.color,mode:"RGB",onChange:function(e){z({name:"color",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__borderColor"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.menu,mode:"RGB",onChange:function(e){z({name:"menu",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7,fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.w)("$__primaryText"))))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.w)("$__cardImageCover"),a.a.createElement(au,{value:{css:r.AvatarBackground},onChange:function(e){z({name:"AvatarBackground",value:e.css})},type:"radial"}),a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.avatarIconColor,mode:"RGB",onChange:function(e){z({name:"avatarIconColor",value:e.color})}})),a.a.createElement(Fc.a,{backgroundColor:r.AvatarBackground,avatarIconColor:r.avatarIconColor,responsive:!0})))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.w)("$__fields")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.line,mode:"RGB",onChange:function(e){z({name:"line",value:e.color}),A(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__line"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.medium,mode:"RGB",onChange:function(e){z({name:"medium",value:e.color}),A(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__inputAdorment"))),F?a.a.createElement(_e.a,{label:Object(S.w)("$__field",1),variant:r.fieldVariant,name:"field",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"format_color_fill"}))}}):a.a.createElement(_e.a,{label:Object(S.w)("$__field",1),variant:r.fieldVariant,name:"field",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"format_color_fill",color:r.medium}))}})))),JSON.stringify(i)!==JSON.stringify(d)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.w)("$__reset"),text:Object(S.w)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){Y()},load:M})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){R()},load:M}))):a.a.createElement(a.a.Fragment,null))})));var cu=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,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("#","")||c.a.push("acc#tab/resume"),a.a.createElement("div",null,t[1]&&"resume"===t[1]?a.a.createElement(N.a,null,a.a.createElement(Zs,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"profile"===t[1]?a.a.createElement(N.a,null,a.a.createElement(Ys,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"whiteLabel"===t[1]?a.a.createElement(N.a,null,a.a.createElement(iu,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"integrations"===t[1]?a.a.createElement(N.a,null,a.a.createElement($s,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"invoicing"===t[1]?a.a.createElement(N.a,null,a.a.createElement(As,null)):a.a.createElement(a.a.Fragment,null))}))),lu=Object(Y.a)(Eo);var su,uu=Object(Y.a)(Eo);function du(){du=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var pu=j.b.div(su||(su=Object(d.a)(["\n  position:relative;\n  float:left;\n  width:100%;  \n  border-radius:7px;\n  box-shadow:rgba(0,0,0,0.1) 0px 0px 3px 1px;\n  padding:7px;\n  grid:15px;\n  align-items:center;\n  margin-bottom:15px;\n  ","\n  .cardApprovalDate{\n    position:relative;\n    float:left;\n    font-size:12px;\n    font-weight:regular;\n    color:#979797;\n    display:flex;\n    margin-right:15px;\n  }\n  .cardTitle{\n    position:relative;\n    float:left;\n    font-size:16px;\n    font-weight:bold;\n    display:flex;\n  }\n  .cardApprovalStep{\n    position:relative;\n    float:right;\n    font-size:14px;\n    font-weight:bold;\n    text-align:right;\n    ","\n  }\n  .cardApprovalLocal{\n    position:relative;\n    float:left;\n    font-size:12px;\n    color:#979797;\n    display:flex;\n    justify-content:center;\n    align-items:center;\n    margin-left:15px;\n  }\n  .cardApprovalReason{\n    position:relative;\n    float:left;\n    clear:both;\n    width:100%;\n    font-size:13px;\n    color:#979797;\n    display:flex;\n    justify-content:center;\n    align-items:center;\n    margin-left:15px;\n  }\n  \n"])),(function(e){return"\n  \n  "}),(function(e){return"\n    color:".concat(e.approved?"green":"red","\n    ")})),fu=function(){var e=l.a.getState().db.cards,t=Object(n.useState)([]),r=Object(m.a)(t,2),o=(r[0],r[1]),i=Object(n.useState)(!0),c=Object(m.a)(i,2),s=c[0],u=c[1],d=Object(n.useState)([]),p=Object(m.a)(d,2),h=p[0],g=p[1];Object(n.useEffect)((function(){var t=Object.values(e).filter((function(e){return"plan"===e.type})).map((function(e){return e.name}));o(Object(A.a)(new Set(t))),b()}),[]);var b=function(){var e=Object(f.a)(du().mark((function e(){var t;return du().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/Approval_List");case 2:(t=e.sent)&&(u(!1),g(t.data));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return s?a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",justifyContent:"center",paddintTop:"40%"}},a.a.createElement(be.a,null)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",marginBottom:"50px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",marginBottom:"15px",padding:"7px 0px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"history"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__approvalHistory"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},a.a.createElement("div",{style:{width:"100%",grid:"15px",padding:15}},h.sort((function(e,t){return e.date>t.date?-1:e.date<t.date?1:0})).map((function(e,t){return console.log(e),a.a.createElement(pu,{key:e.timeline._id,approved:e.timeline.message.indexOf("$__approved")>-1},a.a.createElement("div",{className:"cardTitle"},a.a.createElement("div",{className:"cardApprovalDate"},Object(S.k)(e.date)),e.card," ",a.a.createElement("div",{className:"item"},"(#",e.code,")")),a.a.createElement("div",{className:"local"},e.local.reverse().map((function(t,r){return a.a.createElement("div",{className:"cardApprovalLocal",key:"lc".concat(t.code)},t.name,r+1<e.local.length?" / ":"")}))),a.a.createElement("div",{className:"cardApprovalStep"},a.a.createElement("div",null,Object(S.w)("$__step",1),": ",e.approvedIn),a.a.createElement("div",{className:"cardApprovalReason"},a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},e.timeline.message.indexOf("$__approved")>-1?a.a.createElement(re.a,{icon:"verified",color:"green"}):e.timeline.message.indexOf("$__rejected")>-1?a.a.createElement(re.a,{icon:"gpp_bad",color:"red"}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{wordBreak:"break-word",width:"100%",clear:"both",marginRight:15}},Object(S.w)(e.timeline.message)),a.a.createElement("div",{style:{clear:"both"}})))))}))))))},hu=r(2031),mu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o=l.a.getState(),i=o.db,c=o.session;i.cards;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}},a.a.createElement("input",{type:"file",id:"fileBack",style:{display:"none"}}),a.a.createElement("img",{src:null===c||void 0===c?void 0:c.custom.loginBackground,alt:"background",style:{height:"150px",width:"100%",objectFit:"cover"}}),a.a.createElement("div",{style:{height:"auto",backgroundColor:"none",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"0px",marginTop:"-110px",padding:"0 17px"}},a.a.createElement("img",{src:null===c||void 0===c?void 0:c.image,style:{borderRadius:"50%",border:"2px solid ".concat(Object(S.d)("color")),width:"110px",height:"110px",margin:"5px",zIndex:"998",cursor:"auto"},alt:"Profile"}),a.a.createElement("div",{style:{backgroundColor:"rgb(238,238,238)",padding:"5px 20px 5px 50px",marginLeft:"-40px",zIndex:"0",borderRadius:"0px 10px 10px 0px",boxShadow:"rgba(0, 0, 0, 0.14) 0px 1px 4px 0px",border:"2px solid ".concat(Object(S.d)("color"))}},a.a.createElement("p",{style:{color:Object(S.d)("medium"),fontSize:"1.7rem",fontWeight:"bold",margin:"5px 0px",display:"flex",textAlign:"left",justifyContent:"flex-start"}},null===c||void 0===c?void 0:c.name,a.a.createElement("sup",{style:{fontSize:"1rem !important"}},a.a.createElement(re.a,{style:{cursor:"pointer"},onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},i.sideModule),{},{id:null===c||void 0===c?void 0:c._id,activeModule:"userEdit",db:"users",data:Object(p.a)({type:"user"},l.a.getState().db.users[c._id])}))}},"edit"))),a.a.createElement("p",{style:{fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:Object(S.d)("colorText"),margin:"0px",textAlign:"left"}},null===c||void 0===c?void 0:c.email),a.a.createElement("p",{style:{margin:"0px",color:Object(S.d)("mediumText"),textAlign:"left",fontSize:"11px"}},null===c||void 0===c||null===(t=c.GlobalData)||void 0===t?void 0:t.name," \u25cf",a.a.createElement(hu.a,{title:null===c||void 0===c?void 0:c.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)}))},a.a.createElement(a.a.Fragment,null,null===c||void 0===c||null===(r=c.groups)||void 0===r||null===(n=r.filter((function(e){return e.value})))||void 0===n?void 0:n.sort((function(e,t){return e.label<t.label?-1:1})).map((function(e,t){return"".concat(t>0?" / ":"").concat(e.label)})).map((function(e){return Object(S.s)(e,32)})))))))))})),gu=r(725),bu=r.n(gu),vu=Object(Y.a)({switch:{"& + .MuiSwitch-track":{backgroundColor:Object(S.d)("color")},"& .MuiSwitch-thumb":{backgroundColor:"rgb(125, 125, 125)"},"& .Mui-checked":{"& + .MuiSwitch-track":{backgroundColor:Object(S.d)("color")},"& .MuiSwitch-thumb":{backgroundColor:Object(S.d)("color")},"& .MuiSvgIcon-root":{backgroundColor:Object(S.d)("color"),borderRadius:"50%",width:"20px",height:"20px",color:Object(S.d)("color")}},"& .Mui-disabled":{"& + .MuiSwitch-track":{opacity:.5},"& .MuiSvgIcon-root":{backgroundColor:Object(S.d)("color"),borderRadius:"50%",width:"20px !important",height:"20px !important",padding:"3px",color:"".concat(Object(S.d)("lightText")," !important"),transform:"translate(0, 0, 0, 0.2em)"}}}}),yu=function(e){var t=e.checked,r=e.setData,o=e.notificationType,i=e.notifications,c=e.notification,l=e.data,s=Object(n.useState)("block"===t||t),u=Object(m.a)(s,2),d=u[0],f=u[1],g=vu();return a.a.createElement(Kt.a,{title:"block"===t?Object(S.w)("$__requiredNotification"):""},a.a.createElement(Xr.a,{control:a.a.createElement(js.a,{className:g.switch,color:"default",checked:d,onChange:function(e){f(e.target.checked),function(e){var t=null===l||void 0===l?void 0:l.map((function(t){if(t===i){var r=t.notifications.map((function(t){return t===c?Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},o,e)):t}));return Object(p.a)(Object(p.a)({},t),{},{notifications:r})}return t}));r(t)}(e.target.checked)},disabled:"block"===t,checkedIcon:a.a.createElement(bu.a,null)})}))};function xu(){xu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var wu=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=Object(n.useState)(t.notifications?t.notifications:[{notificationName:Object(S.w)("$__activities"),notifications:[{title:Object(S.w)("$__lateActivities"),machen:"block",email:null},{title:Object(S.w)("$__dayTasks"),machen:!0,email:null},{title:Object(S.w)("$__nextActivities"),machen:!1,email:null},{title:Object(S.w)("$__statusUpdate"),machen:!0,email:null},{title:Object(S.w)("$__youWasRemoved"),machen:!1,email:null}]},{notificationName:Object(S.w)("$__messages"),notifications:[{title:Object(S.w)("$__unreadMessages"),machen:"block",email:!0},{title:Object(S.w)("$__reactionsMyMessages"),machen:!1,email:null}]},{notificationName:"BRIGHT & CONNECTED",notifications:[{title:Object(S.w)("$__radar"),machen:!0,email:!1},{title:Object(S.w)("$__newInsights"),machen:"block",email:!0}]},{notificationName:Object(S.w)("$__approvals"),notifications:[{title:Object(S.w)("$__pendingApprovals"),machen:!0,email:"block"}]},{notificationName:Object(S.w)("$__myDay"),notifications:[{title:Object(S.w)("$__myDay"),machen:"block",email:null},{title:Object(S.w)("$__otherDays"),machen:!1,email:null}]}]),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object(n.useState)(),u=Object(m.a)(s,2),d=u[0],h=u[1];Object(n.useEffect)((function(){var e=l.a.getState().session;if(e.notifications&&e.GlobalData.notifications){var t=e.notifications.map((function(t){var r=e.GlobalData.notifications.find((function(e){return e.notificationName===t.notificationName})),n=t.notifications.map((function(e){var t=r.notifications.find((function(t){return t.title===e.title}));return Object(p.a)(Object(p.a)({},e),{},{machen:"block"===t.machen?"block":"block"===e.machen?t.machen:e.machen,email:"block"===t.email?"block":"block"===e.email?t.email:e.email})}));return{notificationName:t.notificationName,notifications:n}}));h(t)}else h((function(t){return e.notifications?e.notifications:e.GlobalData.notifications?e.GlobalData.notifications:t}))}),[]);var g=function(){var t=Object(f.a)(xu().mark((function t(){return xu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(d),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{notifications:d}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),b=function(){var r=Object(f.a)(xu().mark((function r(){return xu().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:h(t.GlobalData.notifications?t.GlobalData.notifications:i),c(t.GlobalData.notifications?t.GlobalData.notifications:i),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{notifications:t.GlobalData.notifications?t.GlobalData.notifications:i}));case 3:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",minWidth:"70vw",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",margin:"0 auto",marginBottom:"50px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px 0px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"notifications_active"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__notificationManagement"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"0px 10px",alignItems:"flex-start",padding:"0px 20px",flexWrap:"nowrap",fontSize:"16px"}},a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",marginTop:"20px"}},a.a.createElement("div",{style:{color:Object(S.d)("darkText"),display:"flex",flexDirection:"row",width:"100%",fontWeight:"600"}},a.a.createElement("p",{style:{textAlign:"left",width:"60%",paddingLeft:"15px"}},Object(S.w)("$__notifyMe")),a.a.createElement("p",{style:{padding:"0 10px",width:"20%"}},"Machen"),a.a.createElement("p",{style:{padding:"0 10px",width:"25%"}},Object(S.w)("$__email"))),a.a.createElement("div",{style:{color:Object(S.d)("darkText"),display:"flex",flexDirection:"row",width:"100%",fontWeight:"600"}},a.a.createElement("p",{style:{textAlign:"left",width:"60%",paddingLeft:"15px"}},Object(S.w)("$__notifyMe")),a.a.createElement("p",{style:{padding:"0 10px",width:"20%"}},"Machen"),a.a.createElement("p",{style:{padding:"0 10px",width:"25%"}},Object(S.w)("$__email")))),a.a.createElement("div",{style:{display:"grid",width:"100%",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr 1fr",gap:"10px",flexWrap:"wrap",justifyContent:"center",marginBottom:"20px"}},null===d||void 0===d?void 0:d.map((function(e,t){return a.a.createElement("fieldset",{key:null===e||void 0===e?void 0:e.notificationName,style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"100%",paddingBottom:"0px",gridRow:0===t&&"1 / 3"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:Object(S.d)("colorText"),margin:"0px"}},null===e||void 0===e?void 0:e.notificationName),null===e||void 0===e?void 0:e.notifications.map((function(t){return a.a.createElement("div",{key:null===t||void 0===t?void 0:t.title,style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"baseline"}},a.a.createElement("p",{style:{width:"60%"}},null===t||void 0===t?void 0:t.title),a.a.createElement("div",{style:{width:"20%"}},a.a.createElement(yu,{checked:null===t||void 0===t?void 0:t.machen,setData:h,notificationType:"machen",notifications:e,data:d,notification:t})),a.a.createElement("div",{style:{width:"20%"}},null!==(null===t||void 0===t?void 0:t.email)&&a.a.createElement(yu,{checked:null===t||void 0===t?void 0:t.email,setData:h,notificationType:"email",notifications:e,data:d,notification:t})))})))})))))),JSON.stringify(d)!==JSON.stringify(i)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.w)("$__reset"),text:Object(S.w)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){b()}})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){g()}}))):a.a.createElement(a.a.Fragment,null))})),_u=function(e){var t=e.edit,r=e.data,o=e.changeData,i=e.id,c=e.options,l=Object(n.useState)({historyEditor:null}),s=Object(m.a)(l,2),u=s[0],d=s[1],f={width:"100%",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",border:"none",display:t?"flex":"none",justifyContent:"flex-start",borderBottom:"2px solid #eeeeee",borderRadius:"5px"};return a.a.createElement(a.a.Fragment,null,a.a.createElement(z.Editor,{toolbar:{options:c||["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic","underline"]},list:{inDropdown:!1,options:["unordered"]},link:{inDropdown:!1,options:["link"]}},wrapperClassName:"wrapper-class",editorClassName:"editor-class",toolbarClassName:"toolbar-class",toolbarStyle:f,editorState:null===r||void 0===r?void 0:r.messageD,onEditorStateChange:function(e){o(M()(Object(B.convertToRaw)(e.getCurrentContent())),e,i),d(Object(p.a)(Object(p.a)({},u),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{backgroundColor:"#fff",width:"100%",height:"100%",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",border:"none",margin:"0px"},readOnly:!t}))},Ou=function(){var e=Object(n.useState)(!1),t=Object(m.a)(e,2),r=t[0],o=t[1],i=Object(n.useState)({}),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",marginBottom:"50px",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{flexGrow:"1",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",width:"100%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"space-between",borderBottom:"#e8e8e8 1px solid",padding:"7px 15px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__about")),a.a.createElement(re.a,{onClick:function(){return o(!r)},style:{cursor:"pointer",color:Object(S.d)("color")}},r?"cancel":"edit")),a.a.createElement("div",{style:{padding:"10px 20px 20px 20px"}},a.a.createElement(_u,{edit:r,data:l,changeData:function(e,t,r){s(Object(p.a)(Object(p.a)({},l),{},{message:e,messageD:t}))},title:null}))))},ju=function(){var e=l.a.getState(),t=e.db,r=(e.session,t.cards),o=Object(n.useState)([]),i=Object(m.a)(o,2),c=i[0],s=i[1];return Object(n.useEffect)((function(){var e=Object.values(r).filter((function(e){return"plan"===e.type})).map((function(e){return e.name}));s(Object(A.a)(new Set(e))),console.log(c)}),[]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",marginBottom:"50px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",marginBottom:"15px",padding:"7px 0px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"history"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__activityHistory"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},a.a.createElement("div",{style:{width:"70%"}}),a.a.createElement("div",{style:{height:"100%",borderLeft:"1px solid #b9b9b9",padding:"0px 20px"}},a.a.createElement(_e.a,{id:"search",label:Object(S.w)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"search",InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"search"))},placeholder:Object(S.w)("$__search",1),autoFocus:!0}),null===c||void 0===c?void 0:c.map((function(e){return a.a.createElement("div",{style:{marginTop:"10px",display:"flex",gap:"5px",alignItems:"center"},key:e},a.a.createElement(at.a,null,e.slice(0,2)),a.a.createElement(Xr.a,{required:!0,control:a.a.createElement(zr.a,{color:"default"}),label:e}))}))))))},Eu=Object(u.b)((function(e){return{users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=l.a.getState(),t=e.db,r=e.session,n=function(e,n){return!!(t.users[n]&&t.users[n].groups&&t.users[n].groups.length>0&&t.users[n].groups.filter((function(t){return t.value===e.value})).length>0&&(null===r||void 0===r?void 0:r.groups.some((function(t){return t.label===e.label}))))},o="";return(null===r||void 0===r?void 0:r.groups.filter((function(e){return e.value})).length)>0&&r.groups.filter((function(e){return e.value})).sort((function(e,t){return e.label<t.label?-1:1})).forEach((function(e,t){o+="".concat(t>0?" / ":"").concat(e.label)})),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",flexDirection:"column",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("p",null,o),a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"row",flexWrap:"wrap"}},l.a.getState().db.userGroup.filter((function(e){return Object.keys(t.users).filter((function(t){return n(e,t)})).length>0})).map((function(e){var r=Object.keys(t.users).filter((function(t){return n(e,t)}));return a.a.createElement(a.a.Fragment,null,r.sort((function(e,t){var r=l.a.getState().db.users[e].name.toLowerCase(),n=l.a.getState().db.users[t].name.toLowerCase();return r<n?-1:r<n?1:0})).map((function(r){return a.a.createElement(Sn.a,{key:"".concat(e.value,"_").concat(r),xs:12,sm:4,md:2,lg:2,xl:2,style:{minWidth:"300px"}},a.a.createElement(Bl,{data:t.users[r]}))})))})))))})),ku=function(){var e=Object(n.useState)("Overview"),t=Object(m.a)(e,2),r=t[0],o=t[1],i=function(e){c.a.push("/profile#".concat(e)),o(e)};return a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),e[0]!==r&&o(e[0])}),[]),a.a.createElement("div",{style:{width:"100%",position:"relative",borderRadius:"5px",backgroundColor:"#eee",height:"auto",margin:"0px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{item:!0,xs:12,style:{backgroundColor:"#eee",height:"100%",display:"flex",justifyContent:"center",alignItems:"flex-start",flexDirection:"column",gap:"5px",marginBottom:"30px"}},a.a.createElement(mu,null),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"15px",padding:"10px",borderBottom:"1px solid #b9b9b9",width:"100%",justifyContent:"flex-start",marginTop:"0px",marginBottom:"20px",color:"rgb(83 83 83)",overflowX:"auto"}},a.a.createElement(Su,{value:"Overview",check:r,onClick:function(){return i("Overview")}},a.a.createElement(re.a,null,"grid_view")," ",Object(S.w)("$__overview",1)),a.a.createElement(Su,{value:"ApprovalHistoric",check:r,onClick:function(){return i("ApprovalHistoric")}},a.a.createElement(re.a,null,"approval")," ",Object(S.w)("$__approvalHistory",1)),a.a.createElement(Su,{value:"Department",check:r,onClick:function(){return i("Department")}},a.a.createElement(re.a,null,"group")," ",Object(S.w)("$__department/group",1))),"Overview"===r?a.a.createElement(Ou,null):"Notifications"===r?a.a.createElement(wu,null):"Historic"===r?a.a.createElement(ju,null):"ApprovalHistoric"===r?a.a.createElement(fu,null):"Department"===r?a.a.createElement(Eu,null):null)))};function Su(e){var t=e.children,r=e.value,o=e.check,i=e.onClick,c=Object(n.useState)(!1),l=Object(m.a)(c,2),s=l[0],u=l[1];return a.a.createElement("div",{onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},onClick:i,style:{textDecoration:"none",color:"rgb(83 83 83)",display:"flex",flexDirection:"row",gap:"5px",alignItems:"center",justifyContent:"center",fontSize:"15px",padding:"2px 7px",borderRadius:"3px",transition:"0.3s all",backgroundColor:s||r===o?"#cfcfcf":"transparent",cursor:s?"pointer":"default"}},t)}var Lu=function(){var e=l.a.getState().session;return console.log(e),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}},a.a.createElement("img",{src:null===e||void 0===e?void 0:e.custom.loginBackground,alt:"background",style:{height:"150px",width:"100%",objectFit:"cover"}}),a.a.createElement("div",{style:{height:"auto",backgroundColor:"none",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"0px",marginTop:"-110px",padding:"0 17px"}},a.a.createElement("img",{src:null===e||void 0===e?void 0:e.custom.customLogo,style:{borderRadius:"50%",border:"2px solid ".concat(Object(S.d)("color")),width:"110px",height:"110px",margin:"5px",zIndex:"998",cursor:"auto",objectFit:"contain",backgroundColor:null===e||void 0===e?void 0:e.custom.menu},alt:"Profile"}),a.a.createElement("div",{style:{backgroundColor:"rgb(238,238,238)",padding:"15px 20px 15px 50px",marginLeft:"-40px",zIndex:"0",borderRadius:"0px 10px 10px 0px",boxShadow:"rgba(0, 0, 0, 0.14) 0px 1px 4px 0px",border:"2px solid ".concat(Object(S.d)("color"))}},a.a.createElement("p",{style:{color:Object(S.d)("medium"),fontSize:"1.7rem",fontWeight:"bold",margin:"0px",display:"flex",textAlign:"left",justifyContent:"flex-start"}},null===e||void 0===e?void 0:e.GlobalData.fullName),a.a.createElement("p",{style:{fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:Object(S.d)("color"),margin:"0px",textAlign:"left"}},null===e||void 0===e?void 0:e.GlobalData.email)))))},Cu=r(406),Iu=Object(Y.a)({switch:{marginBottom:"10px","& + .MuiSwitch-track":{backgroundColor:Object(S.d)("color")},"& .MuiSwitch-thumb":{backgroundColor:"rgb(125, 125, 125)"},"& .Mui-checked":{"& + .MuiSwitch-track":{backgroundColor:Object(S.d)("color")},"& .MuiSwitch-thumb":{backgroundColor:Object(S.d)("color")},"& .MuiSvgIcon-root":{backgroundColor:Object(S.d)("color"),borderRadius:"50%",width:"20px",height:"20px",color:Object(S.d)("color")}},"& .Mui-disabled":{"& + .MuiSwitch-track":{opacity:.5},"& .MuiSvgIcon-root":{backgroundColor:Object(S.d)("color"),borderRadius:"50%",width:"20px !important",height:"20px !important",padding:"3px",color:"".concat(Object(S.d)("lightText")," !important"),transform:"translate(0, 0, 0, 0.2em)"}}},check:{"&":{display:"none"}},checkbox:{"&":{padding:"0px"}}}),Tu=function(e){var t=e.checked,r=e.setData,o=e.notificationType,i=e.notification,c=e.data,l=Object(n.useState)("block"===t||t),s=Object(m.a)(l,2),u=s[0],d=s[1],f=Object(n.useState)("block"===t),g=Object(m.a)(f,2),b=g[0],v=g[1],y=Iu(),x=function(e){var t=[];c.forEach((function(r){var n=r,a=[];n.notifications.forEach((function(t){var r=t;(null===i||void 0===i?void 0:i.title)===t.title&&(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},o,e))),a=[].concat(Object(A.a)(a),[r])})),n=Object(p.a)(Object(p.a)({},n),{},{notifications:a}),t=[].concat(Object(A.a)(t),[n])})),console.log(t),r(t)};return Object(n.useEffect)((function(){d("block"===t||t)}),[t]),a.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginRight:"0px"}},a.a.createElement(Xr.a,{control:a.a.createElement(a.a.Fragment,null,a.a.createElement(js.a,{className:y.switch,color:"default",checked:u,onChange:function(e){d(e.target.checked),x(e.target.checked)},disabled:"block"===t,checkedIcon:a.a.createElement(bu.a,null)}))}),a.a.createElement(Xr.a,{style:{marginTop:"-18px"},control:a.a.createElement(Ei.a,{color:"default",onChange:function(e){v(e.target.checked),x(!e.target.checked||"block")},checked:b,disabled:!0!==t&&"block"!==t,className:y.checkbox}),label:a.a.createElement(Cu.a,{style:{fontSize:"12px"}},Object(S.w)("$__required"))}))};function Du(){Du=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Fu=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=Object(n.useState)(t.GlobalData.notifications?t.GlobalData.notifications:[{notificationName:Object(S.w)("$__activities"),notifications:[{title:Object(S.w)("$__lateActivities"),machen:"block",email:null},{title:Object(S.w)("$__dayTasks"),machen:!0,email:null},{title:Object(S.w)("$__nextActivities"),machen:!1,email:null},{title:Object(S.w)("$__statusUpdate"),machen:!0,email:null},{title:Object(S.w)("$__youWasRemoved"),machen:!1,email:null}]},{notificationName:Object(S.w)("$__messages"),notifications:[{title:Object(S.w)("$__unreadMessages"),machen:"block",email:!0},{title:Object(S.w)("$__reactionsMyMessages"),machen:!1,email:null}]},{notificationName:"BRIGHT & CONNECTED",notifications:[{title:Object(S.w)("$__radar"),machen:!0,email:!1},{title:Object(S.w)("$__newInsights"),machen:"block",email:!0}]},{notificationName:Object(S.w)("$__approvals"),notifications:[{title:Object(S.w)("$__pendingApprovals"),machen:!0,email:"block"}]},{notificationName:Object(S.w)("$__myDay"),notifications:[{title:Object(S.w)("$__myDay"),machen:"block",email:null},{title:Object(S.w)("$__otherDays"),machen:!1,email:null}]}]),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object(n.useState)(),u=Object(m.a)(s,2),d=u[0],h=u[1];Object(n.useEffect)((function(){h(t.GlobalData.notifications?t.GlobalData.notifications:i)}),[]);var g=function(){var t=Object(f.a)(Du().mark((function t(){return Du().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(d),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),{},{notifications:d})}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"fit-content",minWidth:"65vw",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",margin:"0 auto",marginBottom:"50px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px 0px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"notifications_active"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__notificationManagement"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"0px 10px",alignItems:"flex-start",padding:"0px 20px",flexWrap:"nowrap",fontSize:"16px"}},a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",marginTop:"20px"}},a.a.createElement("div",{style:{color:Object(S.d)("darkText"),display:"flex",flexDirection:"row",width:"100%",fontWeight:"600"}},a.a.createElement("p",{style:{textAlign:"left",width:"60%",paddingLeft:"15px"}},Object(S.w)("$__notifyMe")),a.a.createElement("p",{style:{padding:"0 10px",width:"20%"}},"Machen"),a.a.createElement("p",{style:{padding:"0 10px",width:"25%"}},Object(S.w)("$__email"))),a.a.createElement("div",{style:{color:Object(S.d)("darkText"),display:"flex",flexDirection:"row",width:"100%",fontWeight:"600"}},a.a.createElement("p",{style:{textAlign:"left",width:"60%",paddingLeft:"15px"}},Object(S.w)("$__notifyMe")),a.a.createElement("p",{style:{padding:"0 10px",width:"20%"}},"Machen"),a.a.createElement("p",{style:{padding:"0 10px",width:"25%"}},Object(S.w)("$__email")))),a.a.createElement("div",{style:{display:"grid",width:"100%",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr 1fr",gap:"10px",flexWrap:"wrap",justifyContent:"center",marginBottom:"20px"}},null===d||void 0===d?void 0:d.map((function(e,t){return a.a.createElement("fieldset",{key:null===e||void 0===e?void 0:e.notificationName,style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"100%",paddingBottom:"0px",gridRow:0===t&&"1 / 3"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:Object(S.d)("colorText"),margin:"0px"}},null===e||void 0===e?void 0:e.notificationName),null===e||void 0===e?void 0:e.notifications.map((function(e){return a.a.createElement("div",{key:null===e||void 0===e?void 0:e.title,style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"baseline",gap:"30px"}},a.a.createElement("p",{style:{width:"60%"}},null===e||void 0===e?void 0:e.title),a.a.createElement("div",{style:{width:"20%"}},a.a.createElement(Tu,{checked:null===e||void 0===e?void 0:e.machen,setData:h,notificationType:"machen",data:d,notification:e})),a.a.createElement("div",{style:{width:"20%",marginRight:null===(null===e||void 0===e?void 0:e.email)?"20px":"0px"}},null!==(null===e||void 0===e?void 0:e.email)&&a.a.createElement(Tu,{checked:null===e||void 0===e?void 0:e.email,setData:h,notificationType:"email",data:d,notification:e})))})))})))))),JSON.stringify(d)!==JSON.stringify(i)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){g()}}))):a.a.createElement(a.a.Fragment,null))}));r(211).config();var Nu=function(){var e=l.a.getState(),t=e.session,r=e.db,n=a.a.useState(0),o=Object(m.a)(n,2),i=o[0];o[1];a.a.useEffect((function(){}),[]);var s=r.plans[0].settings.space,u=r.plans[0];t&&t.GlobalData&&String(t.GlobalData.plan)&&r.plans[t.GlobalData.plan]&&r.plans[t.GlobalData.plan].settings&&(s=r.plans[t.GlobalData.plan].settings.space,u=r.plans[t.GlobalData.plan]);var d=i*(100/parseInt(s));return a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",marginBottom:"50px"}},a.a.createElement("div",{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%"}},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(re.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.w)("$__subscriptionPlan","*"),":"," ",Object(S.w)(u.label,"*")),a.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.w)("$__adminLimit",1),":"," ",u.settings.admins)))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%"}},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(re.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.w)("$__usedStorage","*"),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.w)("$__upgradeSubscription"))),a.a.createElement(Rs,{value:Math.ceil(d),background:d>100?"red":null}),a.a.createElement("div",null,a.a.createElement("span",{style:{color:d>100?"red":"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.w)("$__used",1),": ",Object(S.a)(i))," ",a.a.createElement("span",{style:{color:"lightgray",fontSize:11}},Object(S.w)("$__of")," ",Object(S.w)("$__accountSpace",1),":"," ",Object(S.a)(s))))))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",gap:"20px"}},a.a.createElement("div",{style:{width:"50%",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"group"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__accountData"))),a.a.createElement("div",{style:{padding:"20px"}},a.a.createElement(Us,{data:t&&t.GlobalData?t.GlobalData:{}}))),a.a.createElement("div",{style:{width:"50%",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"manage_accounts"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__preffers"))),a.a.createElement("div",{style:{padding:"20px"}},a.a.createElement(Vs,{data:t&&t.GlobalData?t.GlobalData:{}}))),a.a.createElement("div",{style:{width:"50%",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"draw"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__subscriptionDetails"))),a.a.createElement("div",{style:{padding:"20px"}},a.a.createElement(Xs,{data:t&&t.GlobalData?t.GlobalData:{},planDetails:u})))))},Au=r(2034),Pu=function(e){var t=e.column,r=e.edit,n=e.handleDataChange,o=e.selected,i=e.setSelectUser,c=e.handleCheckboxChange,l=e.index,s=e.style,u=e.usuario,d={display:"flex",justifyContent:"flex-start",alignItems:"center",textAlign:"left",flex:1,border:"none",borderBottom:"1px solid #ebebeb",borderTop:"1px solid #ebebeb",alignSelf:"stretch"},f=function(e){var t,o=e.item;return a.a.createElement("div",{style:Object(p.a)({},d),onClick:function(){return function(e,t){"nomecompleto"!==e&&"nomedeexibi\xe7\xe3o"!==e||i(t)}(o,u)}},"nomecompleto"===o?a.a.createElement("div",{style:{marginLeft:"5px",cursor:"pointer"}},a.a.createElement(hu.a,{title:"Ver ".concat(null===u||void 0===u?void 0:u.nomecompleto)},a.a.createElement(Au.a,Object.assign({},Object(S.r)(null===u||void 0===u?void 0:u.nomecompleto),{src:null===u||void 0===u?void 0:u.image})))):null,a.a.createElement("input",{style:{border:"none",backgroundColor:"transparent",height:"100%",width:"100%",marginLeft:"5px",color:"#1C1C1C",fontWeight:"nomecompleto"===o?"bold":"normal",cursor:"nomecompleto"===o||"nomedeexibi\xe7\xe3o"===o?"pointer":"default"},type:"text",defaultValue:"departamento/grupo"===o?null===u||void 0===u||null===(t=u[o])||void 0===t?void 0:t.filter((function(e){return e.value})).sort((function(e,t){return e.label<t.label?-1:1})).map((function(e,t){return" ".concat(e.label)})):null===u||void 0===u?void 0:u[o],onMouseUp:function(e){return e.target.focus()},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onBlur:function(e){return n(l,e.target.value,[o])},disabled:!r}))};return a.a.createElement("div",{style:s},a.a.createElement("div",{style:{backgroundColor:o?"#aaaaaa63":"#fff",width:"100%",display:"flex",justifyContent:"center",height:"44px",overflowY:"hidden"}},r?a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},d),{},{width:"50px",borderBottom:"1px solid #ebebeb",borderTop:"1px solid #ebebeb",flex:"none",height:"100%",justifyContent:"center",display:"flex"})},a.a.createElement("input",{type:"checkbox",style:{width:"16px",height:"16px",borderRadius:"15px",cursor:"pointer",backgroundColor:"transparent"},onMouseUp:function(){c(l)},checked:o})):null,t.length>0&&t.map((function(e,t){return a.a.createElement(f,{item:e,key:t})})),r?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},d),{},{width:"60px",borderBottom:"1px solid #ebebeb",borderTop:"1px solid #ebebeb",flex:"none",display:"flex",alignItems:"center",justifyContent:"center"})},a.a.createElement("p",{style:{alignSelf:"center",padding:"0px",margin:"0px",display:"flex",color:"rgb(159 159 159)",alignItems:"center",justifyContent:"center",cursor:"pointer"}},a.a.createElement(re.a,null,"delete")))):null))},$u=function(e){var t=e.edit,r=e.setEdit,o=e.dataUser,i=e.columns,c=e.orderData,l=e.orderColumn,s=e.column,u=e.setSelectUser,d=Object(n.useState)([]),f=Object(m.a)(d,2),h=f[0],g=f[1],b=Object(n.useState)([]),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.createRef();Object(n.useEffect)((function(){g(o)}),[]);var _=function(e){x((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(Object(A.a)(t),[e])}))},O=function(e,t,r){var n=Object(A.a)(h);n[e][r]=t,n&&g(n)},j={display:"flex",justifyContent:"flex-start",alignItems:"center",textAlign:"left",flex:1,fontWeight:"bold",alignSelf:"stretch",overflow:"hidden"},E=function(e){var t=e.name,r="";switch(t){case"nomecompleto":r=Object(S.w)("$__completeName");break;case"nomedeexibi\xe7\xe3o":r=Object(S.w)("$__showName");break;case"email":r=Object(S.w)("$__email");break;case"departamento/grupo":r=Object(S.w)("$__department/group");break;case"ramal":r=Object(S.w)("$__branchLine");break;case"observa\xe7\xf5es":r=Object(S.w)("$__observation");break;case"celular":r=Object(S.w)("$__phone")}return a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},j),{},{cursor:"pointer"}),onClick:function(){return l(t)}},a.a.createElement("p",{style:{width:"auto",alignSelf:"center",padding:"0px",overflow:"auto",margin:"0px 5px 0px 10px"}},r),a.a.createElement("div",{style:{display:"flex",flexDirection:"column",color:s&&s===t?"rgb(192,178,131)":"rgb(0, 24, 54)",padding:"0px 5px"}},a.a.createElement(re.a,{style:{fontSize:"1.1rem",width:"0.9rem",height:"0.9rem"}},"arrow_drop_up"),a.a.createElement(re.a,{style:{fontSize:"1.1rem",width:"0.9rem",height:"0.9rem"}},"arrow_drop_down")))};return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{justifyContent:"center",padding:"10px",position:"relative",height:"100%",backgroundColor:"#fff",borderRadius:"5px",width:"100%"}},0===(null===h||void 0===h?void 0:h.length)&&null,a.a.createElement("div",null,(null===h||void 0===h?void 0:h.length)>0&&a.a.createElement("div",{id:"table-container",style:{marginBottom:"5px",height:"65vh",maxHeight:"600px",overflow:"hidden",border:"1px solid #ebebeb"}},a.a.createElement("div",{style:{overflowY:"hidden"}},a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",height:"50px",color:"#141414",backgroundColor:"rgb(241 241 241)"}},t?a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},j),{},{width:"50px",borderTop:"1px solid #ebebeb",borderBottom:"1px solid #ebebeb",flex:"none",justifyContent:"center",display:"flex"})},a.a.createElement("input",{type:"checkbox",style:{width:"16px",height:"16px",borderRadius:"15px",cursor:"pointer",backgroundColor:"transparent"},checked:y.length===h.length,indeterminate:y.length>0&&y.length<h.length,onChange:function(){if(y.length===h.length)x([]);else{var e=h.map((function(e,t){return t}));x(e)}}})):null,i.length>0&&i.map((function(e,t){return a.a.createElement(E,{name:e,key:t})})),t?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},j),{},{width:"60px",borderTop:"1px solid #ebebeb",borderBottom:"1px solid #ebebeb",flex:"none",display:"flex",color:"rgb(159 159 159)",alignItems:"center",justifyContent:"center"})},a.a.createElement("p",{style:{alignSelf:"center",padding:"0px",margin:"0px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.w)("$__action")))):null)),(null===h||void 0===h?void 0:h.length)>0&&a.a.createElement(Uo.a,null,(function(e){var r=e.height,n=e.width;return a.a.createElement(Wo.a,{itemData:c,height:r,itemCount:null===h||void 0===h?void 0:h.length,itemSize:44,width:n,ref:w},(function(e){var r=e.data,n=e.index,c=e.style;return a.a.createElement("div",{key:"a_".concat(n,"_").concat(Math.random(0,99999999))},a.a.createElement(Pu,{edit:t,selected:!(!y||!y.includes(n)),column:i,handleDataChange:function(e,t,r){return O(e,t,r)},handleCheckboxChange:_,style:c,data:r,usuario:o[n],index:n,isActive:r.length>0,setSelectUser:u}))}))})))),t?a.a.createElement("div",{style:{display:"flex",borderTop:"#e8e8e8 1px solid",alignItems:"center",justifyContent:"flex-end",gap:"20px",padding:"15px 20px"}},a.a.createElement("button",{style:{padding:"7px 30px",border:"rgb(1, 30, 65) 1px solid",background:"linear-gradient(90deg, rgb(1, 30, 65) 0%, rgb(0, 49, 112) 100%)",color:"rgb(192,178,131)",borderRadius:"4px",fontWeight:"600",cursor:"pointer"}},Object(S.w)("$__deleteSelected")),a.a.createElement("button",{style:{padding:"7px 30px",border:"rgb(1, 30, 65) 1px solid",background:"linear-gradient(90deg, rgb(1, 30, 65) 0%, rgb(0, 49, 112) 100%)",color:"rgb(192,178,131)",borderRadius:"4px",fontWeight:"600",cursor:"pointer"}},Object(S.w)("$__save")),a.a.createElement("button",{onClick:function(){return r(!t)},style:{padding:"7px 25px",border:"1px solid rgb(184 184 184)",backgroundColor:"#e8e8e8",color:"rgb(1, 30, 65)",borderRadius:"4px",fontWeight:"600",cursor:"pointer"}},Object(S.w)("$__cancel"))):null))},Mu=r(1931),Bu=Object(Y.a)({formControl:{width:"200px","& .MuiOutlinedInput-root":{backgroundColor:"#fff"},"& .Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(0, 0, 0, 0.23)"}},checkbox:{color:Object(S.d)("color"),"& .Mui-checked":{color:"".concat(Object(S.d)("color")," !important")}}}),zu=function(e){var t,r=e.setSelectUser,o=Bu(),i=Object(n.useState)(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=Object(n.useState)("All"),p=Object(m.a)(d,2),f=p[0],g=p[1],b=Object(n.useState)(""),v=Object(m.a)(b,2),y=v[0],x=v[1],w=Object(n.useState)(!0),_=Object(m.a)(w,2),O=_[0],j=_[1],E=Object(n.useState)(["nomecompleto","nomedeexibi\xe7\xe3o","email","departamento/grupo"]),k=Object(m.a)(E,2),L=k[0],C=(k[1],Object(n.useState)(["nomecompleto","nomedeexibi\xe7\xe3o","email"])),I=Object(m.a)(C,2),T=I[0],D=I[1],F=Object(n.useState)(null),N=Object(m.a)(F,2),P=N[0],$=N[1],M=Object(n.useState)([]),B=Object(m.a)(M,2),z=B[0],Y=B[1],R=Object(n.useState)([]),H=Object(m.a)(R,2),U=H[0],q=H[1],V=Object(n.useState)("asc"),J=Object(m.a)(V,2),X=J[0],K=J[1],Z=l.a.getState(),Q=Z.db,ee=(Z.session,Q.users);Object(n.useEffect)((function(){var e=Object.values(ee).map((function(e){return Object(h.a)({"nomedeexibi\xe7\xe3o":null===e||void 0===e?void 0:e.name,nomecompleto:null===e||void 0===e?void 0:e.fullName,email:null===e||void 0===e?void 0:e.email,image:null===e||void 0===e?void 0:e.image,_id:null===e||void 0===e?void 0:e._id},"departamento/grupo",null===e||void 0===e?void 0:e.groups)}));Y(e);var t=e.filter((function(e){var t,r="All"===f||(null===(t=e["departamento/grupo"])||void 0===t?void 0:t.some((function(e){return e.label===f}))),n=Object.values(e).some((function(e){return"string"===typeof e&&e.toLowerCase().includes(y.toLowerCase())}));return r&&n}));q(t),(null===e||void 0===e?void 0:e.length)>0&&j(!1)}),[f,y]);var te=function(e){switch(e){case"nomecompleto":return Object(S.w)("$__completeName");case"nomedeexibi\xe7\xe3o":return Object(S.w)("$__showName");case"email":return Object(S.w)("$__email");case"departamento/grupo":return Object(S.w)("$__department/group");case"ramal":return Object(S.w)("$__branchLine");case"observa\xe7\xf5es":return Object(S.w)("$__observation");case"celular":return Object(S.w)("$__phone")}},ne=U?null===(t=Object(A.a)(U))||void 0===t?void 0:t.sort((function(e,t){return P?"asc"===X?e[P]>t[P]?1:-1:e[P]<t[P]?1:-1:0})):[],ae=Object(A.a)(new Set(z.flatMap((function(e){var t;return null===(t=e["departamento/grupo"])||void 0===t?void 0:t.map((function(e){return(null===e||void 0===e?void 0:e.label)||[]}))}))));return a.a.createElement("div",{style:{width:"95%",position:"absolute",zIndex:"9",borderRadius:"5px",backgroundColor:"#eee",minHeight:"100vh",height:"auto",margin:"0px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("div",{style:{height:"100%",justifyContent:"center",margin:"0px",width:"100%",backgroundColor:"#eee"}},a.a.createElement("div",{style:{backgroundColor:"#eee",height:"100%",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",gap:"5px",marginBottom:"30px",width:"100%"}},a.a.createElement("div",{style:{backgroundColor:"#eee",height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",gap:"5px",marginBottom:"15px",width:"100%"}},a.a.createElement("div",{style:{display:"flex",alignItems:"flex-end",flexDirection:"row"}},a.a.createElement("div",{style:{height:"100%",width:"auto",display:"flex",alignItems:"flex-start",gap:"0px",flexDirection:"column",marginRight:"25px",marginLeft:"10px"}},a.a.createElement("p",{style:{margin:"5px 0"}},Object(S.w)("$__search"),":"),a.a.createElement(W.a,{className:o.formControl,variant:"standard",size:"small"},a.a.createElement(Mu.a,{id:"search",type:"text",placeholder:Object(S.w)("$__search"),onChange:function(e){return x(e.target.value)},endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"search"))}))),a.a.createElement("div",{style:{height:"100%",width:"auto",display:"flex",alignItems:"flex-start",gap:"0px",flexDirection:"column",marginRight:"25px"}},a.a.createElement("p",{style:{margin:"5px 0"}},Object(S.w)("$__filterByDepartment"),":"),a.a.createElement(W.a,{variant:"outlined",sx:{m:1,minWidth:220},className:o.formControl,size:"small"},a.a.createElement(Es.a,{defaultValue:"All",displayEmpty:!0,onChange:function(e){return g(e.target.value)}},a.a.createElement(G.a,{value:"All"},Object(S.w)("$__all")),ae.sort().map((function(e){return a.a.createElement(G.a,{value:e,key:e},e)}))))),a.a.createElement("div",{style:{height:"100%",width:"auto",display:"flex",alignItems:"flex-start",gap:"0px",flexDirection:"column",marginRight:"25px"}},a.a.createElement("p",{style:{margin:"5px 0"}},Object(S.w)("$__columnName"),":"),a.a.createElement(W.a,{sx:{m:1,width:300},className:o.formControl,size:"small"},a.a.createElement(Es.a,{labelId:"checkbox-label",id:"multiple-checkbox",multiple:!0,defaultValue:T,onChange:function(e){return D(e.target.value)},input:a.a.createElement(Mu.a,null),renderValue:function(e){return e.map(te).join(", ")}},L.map((function(e){return a.a.createElement(G.a,{key:e,value:e},a.a.createElement(Ei.a,{checked:T.indexOf(e)>-1,color:"default",className:o.checkbox}),a.a.createElement(cl.a,{primary:te(e)}))}))))),a.a.createElement("div",{style:{backgroundColor:"#fff",border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:"5px",padding:"10.5px 14px"}},null===ne||void 0===ne?void 0:ne.length," ",(null===ne||void 0===ne?void 0:ne.length)>1||0===(null===ne||void 0===ne?void 0:ne.length)?Object(S.w)("$__users"):Object(S.w)("$__user")))),O?a.a.createElement("p",null,Object(S.w)("$__loading"),"..."):a.a.createElement($u,{edit:s,setSelectUser:r,setEdit:u,dataUser:ne,columns:T,orderData:ne,orderColumn:function(e){e===P?K("asc"===X?"desc":"asc"):($(e),K("asc"))},column:P}))))};var Yu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o,i=e.selectUser,c=l.a.getState(),s=c.db,u=c.session;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{height:"fit-content",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",paddingBottom:"20px",width:"40vw"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"space-between",borderBottom:"#e8e8e8 1px solid",padding:"7px 15px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor"),width:"100%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"5px",alignItems:"center"}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"notes"),a.a.createElement("p",{style:{fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",fontWeight:"600",margin:"0px"}},Object(S.w)("$__userData"))),a.a.createElement(re.a,{style:{cursor:"pointer",color:Object(S.d)("color")},onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},s.sideModule),{},{id:null===u||void 0===u?void 0:u._id,activeModule:"userEdit",db:"users",data:Object(p.a)({type:"user"},l.a.getState().db.users[null===i||void 0===i?void 0:i._id])}))}},"edit")),a.a.createElement(at.a,Object.assign({src:null===i||void 0===i?void 0:i.image},Object(S.r)(null===i||void 0===i?void 0:i.nomecompleto),{style:{width:"80px",height:"80px",marginTop:"20px"}})),a.a.createElement("fieldset",{style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"80%",marginBottom:"10px"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:"rgb(192,178,131)",margin:"0px"}},Object(S.w)("$__completeName")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"center"}},a.a.createElement(Kt.a,{title:null===i||void 0===i?void 0:i.nomecompleto},a.a.createElement("p",null,Object(S.s)(null===i||void 0===i?void 0:i.nomecompleto,32))))),a.a.createElement("fieldset",{style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"80%",marginBottom:"10px"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:"rgb(192,178,131)",margin:"0px"}},Object(S.w)("$__email")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"center"}},a.a.createElement(Kt.a,{title:null===i||void 0===i?void 0:i.email},a.a.createElement("p",null,Object(S.s)(null===i||void 0===i?void 0:i.email,32))))),a.a.createElement("fieldset",{style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"80%",marginBottom:"10px"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:"rgb(192,178,131)",margin:"0px"}},Object(S.w)("$__company")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"center"}},a.a.createElement("p",null,null===u||void 0===u?void 0:u.GlobalData.fullName))),a.a.createElement("fieldset",{style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"80%",marginBottom:"10px"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:"rgb(192,178,131)",margin:"0px"}},Object(S.w)("$__department/group")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"center"}},a.a.createElement(Kt.a,{title:null===i||void 0===i||null===(t=i["departamento/grupo"])||void 0===t||null===(r=t.filter((function(e){return e.value})))||void 0===r?void 0:r.sort((function(e,t){return e.label<t.label?-1:1})).map((function(e,t){return"".concat(t>0?" / ":"").concat(e.label)}))},a.a.createElement("p",null,null===i||void 0===i||null===(n=i["departamento/grupo"])||void 0===n||null===(o=n.filter((function(e){return e.value})))||void 0===o?void 0:o.sort((function(e,t){return e.label<t.label?-1:1})).map((function(e,t){return"".concat(t>0?" / ":"").concat(e.label)})).map((function(e){return Object(S.s)(e,32)}))))))))})),Ru=function(){var e=Object(n.useState)(null),t=Object(m.a)(e,2),r=t[0],o=t[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",flexDirection:"column",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("div",{style:{display:"flex",gap:"5px",alignItems:"center"}},a.a.createElement("p",{style:{marginTop:"0px",color:"#7d7d7d",cursor:"pointer"},onClick:function(){return o(null)}},Object(S.w)("$__usersList")),a.a.createElement("p",{style:{marginTop:"0px",color:"#7d7d7d"}},null!==r?" - ":null),a.a.createElement("p",{style:{marginTop:"0px",color:"#7d7d7d",textDecoration:"underline"}},null!==r?"".concat(r.nomecompleto):null)),a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",flexWrap:"wrap"}},null===r?a.a.createElement(zu,{setSelectUser:o}):a.a.createElement("div",{style:{width:"82%",position:"absolute",zIndex:"9",height:"auto",margin:"0px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",display:"flex",minHeight:"100vh",backgroundColor:"#eee",gap:"20px"}},a.a.createElement(Yu,{selectUser:r})))))};function Gu(){Gu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Hu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=l.a.getState().session,r=t.custom,n=a.a.useState(t.custom||{}),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState({}),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState({}),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(null),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useState(null),L=Object(m.a)(E,2),C=L[0],I=L[1],T=a.a.useState(!1),D=Object(m.a)(T,2),F=D[0],A=D[1],P=a.a.useState(!1),$=Object(m.a)(P,2),M=$[0],B=$[1];a.a.useEffect((function(){g(t.custom||{})}),[]),a.a.useEffect((function(){F&&setTimeout((function(){A(!1)}),500)}),[F]);var z=function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{custom:Object(p.a)(Object(p.a)({},l.a.getState().session.custom),{},Object(h.a)({},t.name,t.value))})),x(Object(p.a)(Object(p.a)({},y),{},Object(h.a)({},t.name,t.value))),c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.name,t.value)))},Y=function(){var t=Object(f.a)(Gu().mark((function t(){return Gu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(d),x({}),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{custom:d}));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var e=Object(f.a)(Gu().mark((function e(){var n,a,o;return Gu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B(!0),n=Object(p.a)(Object(p.a)({},(null===r||void 0===r?void 0:r.custom)?JSON.parse(null===r||void 0===r?void 0:r.custom):{}),y),c(n),g(n),e.prev=4,!O){e.next=11;break}return e.next=8,Object(Hs.a)(t.account,O);case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=!0;case 12:if(a=e.t0,!C){e.next=19;break}return e.next=16,Object(Hs.a)(t.account,C);case 16:e.t1=e.sent,e.next=20;break;case 19:e.t1=!0;case 20:o=e.t1,a&&o&&(O&&(n=Object(p.a)(Object(p.a)({},n),{},{customLogo:a})),C&&(n=Object(p.a)(Object(p.a)({},n),{},{loginBackground:o})),l.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},{custom:JSON.stringify(n)},(function(e){B(!1),x({})}))),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 a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d"}},Object(S.w)("$__logo")),a.a.createElement(we.a,{maxWidthOrHeight:600,img:r.customLogo,onChange:function(e,t){j(t),z({name:"customLogo",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".png",checkOrientation:!0}))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d"}},Object(S.w)("$__loginBackground")),a.a.createElement("div",{style:{width:"200px",display:"flex",margin:"10px auto"}},a.a.createElement(we.a,{maxWidthOrHeight:2e3,img:r.loginBackground,onChange:function(e,t){I(t),z({name:"loginBackground",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".jpg, .jpeg",checkOrientation:!0})))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d",marginBottom:"10px"}},Object(S.w)("$__backgroundColumnsTitle")),a.a.createElement(Or.a,{title:Object(S.w)("$__backgroundColumnsTitle",1),icon:"gradient",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px",margin:"10px auto",width:"90%"}}),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"flex-start",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"flex-start",margin:"-15px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__background")),a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.ColumnTitleColor},style:{padding:"0"},onChange:function(e){z({name:"ColumnTitleColor",value:e.css})}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement(N.a,null,a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__text")),a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.colorText||null,mode:"RGB",onChange:function(e){z({name:"colorText",value:e.color})}})))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d",marginBottom:"10px"}},Object(S.w)("$__menu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"flex-start",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"flex-start",margin:"-15px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__background")),a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.menuColor},onChange:function(e){z({name:"menuColor",value:e.css})}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement(N.a,null,a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__menuText")),a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.menuButtonColor,mode:"RGB",onChange:function(e){z({name:"menuButtonColor",value:e.color})}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement(N.a,null,a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__menuActiveText")),a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.active,mode:"RGB",onChange:function(e){z({name:"active",value:e.color})}})))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d",marginBottom:"10px"}},Object(S.w)("$__submenu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"flex-start",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"flex-start",margin:"-15px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__background")),a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.subMenuColor},onChange:function(e){z({name:"subMenuColor",value:e.css})}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__menuTextIconColor")),a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColor,mode:"RGB",onChange:function(e){z({name:"subMenuTextColor",value:e.color})}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__subMenuActiveText")),a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColorActive,mode:"RGB",onChange:function(e){z({name:"subMenuTextColorActive",value:e.color})}})))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d",marginBottom:"10px"}},Object(S.w)("$__complement")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"flex-start",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"flex-start",margin:"-15px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__progress")),a.a.createElement(N.a,null,a.a.createElement(au,{value:{css:r.linearProgress},onChange:function(e){z({name:"linearProgress",value:e.css})}})),a.a.createElement(ct.a,{customColor:r.linearProgress})),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__borderColor")),a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.color,mode:"RGB",onChange:function(e){z({name:"color",value:e.color})}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement("div",{style:{marginRight:7,fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.w)("$__primaryText")),a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.menu,mode:"RGB",onChange:function(e){z({name:"menu",value:e.color})}})))))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",margin:"0px",borderBottom:"1px solid #eee",color:"#6d6d6d",marginBottom:"10px"}},Object(S.w)("$__cardImageCover")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"flex-start"}},a.a.createElement("p",{style:{display:"flex",alignItems:"center",margin:"-25px 10px"}},Object(S.w)("$__cardImageCover"),a.a.createElement(au,{value:{css:r.AvatarBackground},onChange:function(e){z({name:"AvatarBackground",value:e.css})},type:"radial"}),a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.avatarIconColor,mode:"RGB",onChange:function(e){z({name:"avatarIconColor",value:e.color})}}))),a.a.createElement("div",{style:{padding:"10px"}},a.a.createElement(Fc.a,{backgroundColor:r.AvatarBackground,avatarIconColor:r.avatarIconColor,responsive:!0})))),a.a.createElement(Sn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,width:"300px",height:"220px"}},a.a.createElement("p",{style:{textAlign:"center",width:"100%",padding:"10px",marginBottom:"10px",borderBottom:"1px solid #eee",color:"#6d6d6d"}},Object(S.w)("$__fields")),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__line")),a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.line,mode:"RGB",onChange:function(e){z({name:"line",value:e.color}),A(!0)}}))),a.a.createElement("div",{style:{display:"flex",alignItems:"flex-start",width:"100%",justifyContent:"flex-start",margin:"0px 10px"}},a.a.createElement("div",{style:{marginRight:7}},Object(S.w)("$__inputAdorment")),a.a.createElement(N.a,null,a.a.createElement(eu.a,{enableAlpha:!1,animation:"slide-up",color:r.medium,mode:"RGB",onChange:function(e){z({name:"medium",value:e.color}),A(!0)}}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},F?a.a.createElement(_e.a,{label:Object(S.w)("$__field",1),variant:r.fieldVariant,name:"field",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"format_color_fill"}))},style:{width:"90%",margin:"0 auto"}}):a.a.createElement(_e.a,{label:Object(S.w)("$__field",1),variant:r.fieldVariant,name:"field",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"format_color_fill",color:r.medium}))},style:{width:"90%",margin:"0 auto"}})))),JSON.stringify(i)!==JSON.stringify(d)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.w)("$__reset"),text:Object(S.w)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){Y()},load:M})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){R()},load:M}))):a.a.createElement(a.a.Fragment,null))})));function Wu(){Wu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Uu=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(n.useState)([]),r=Object(m.a)(t,2),o=r[0],i=r[1],c=Object(n.useState)({}),s=Object(m.a)(c,2),u=(s[0],s[1],Object(n.useState)("add_reaction")),d=Object(m.a)(u,2),h=(d[0],d[1],l.a.getState().session),g=Object(n.useState)(),b=Object(m.a)(g,2),v=b[0],y=b[1];Object(n.useEffect)((function(){if(h.GlobalData.messages)i(Object(A.a)(h.GlobalData.messages)),y(Object(A.a)(h.GlobalData.messages));else{var e=B.EditorState.createEmpty(),t=B.EditorState.createEmpty(),r=B.EditorState.createEmpty(),n=B.EditorState.createEmpty(),a=B.EditorState.createEmpty(),o=B.EditorState.createEmpty();h.GlobalData.history&&(e=Bs()("<div>".concat(h.GlobalData.history,"</div>")),e=B.ContentState.createFromBlockArray(e.contentBlocks),e=B.EditorState.createWithContent(e)),h.GlobalData.strategicStatement&&(a=Bs()("<div>".concat(h.GlobalData.strategicStatement,"</div>")),a=B.ContentState.createFromBlockArray(a.contentBlocks),a=B.EditorState.createWithContent(a)),h.GlobalData.values&&(o=Bs()("<div>".concat(h.GlobalData.values,"</div>")),o=B.ContentState.createFromBlockArray(o.contentBlocks),o=B.EditorState.createWithContent(o)),h.GlobalData.vocation&&(t=Bs()("<div>".concat(h.GlobalData.vocation,"</div>")),t=B.ContentState.createFromBlockArray(t.contentBlocks),t=B.EditorState.createWithContent(t)),h.GlobalData.legacy&&(r=Bs()("<div>".concat(h.GlobalData.legacy,"</div>")),r=B.ContentState.createFromBlockArray(r.contentBlocks),r=B.EditorState.createWithContent(r)),h.GlobalData.message&&(n=Bs()("<div>".concat(h.GlobalData.message,"</div>")),n=B.ContentState.createFromBlockArray(n.contentBlocks),n=B.EditorState.createWithContent(n));var c=[{messageD:e,id:1,title:Object(S.w)("$__history"),icon:"menu_book",message:h.GlobalData.history},{messageD:t,id:2,title:Object(S.w)("$__vocation"),icon:"spoke",message:h.GlobalData.vocation},{messageD:r,id:3,title:Object(S.w)("$__legacy"),icon:"subtitles",message:h.GlobalData.legacy},{messageD:n,id:4,title:Object(S.w)("$__presidentMessage"),icon:"account_box",message:h.GlobalData.message},{messageD:o,id:5,title:Object(S.w)("$__values"),icon:"join_inner",message:h.GlobalData.values},{messageD:a,id:6,title:Object(S.w)("$__strategicStatement"),icon:"history_edu",message:h.GlobalData.strategicStatement}];y(c),i(c)}}),[]);var x=function(e,t,r){var n=o.map((function(n){return n.id===r?Object(p.a)(Object(p.a)({},n),{},{messageD:t,message:e}):n}));i(n)},w=function(){var t=Object(f.a)(Wu().mark((function t(){var r;return Wu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={messages:o},y(o),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"fit-content",marginBottom:"10px"}},a.a.createElement("div",{style:{boxShadow:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px",backgroundColor:"white",color:"#b0b0b0",display:"flex",gap:"10px",alignItems:"center",justifyContent:"center",padding:"5px 10px",borderRadius:"5px",cursor:"pointer",margin:"0 auto"},onClick:function(){var e=o.length+1;if(o.some((function(t){return t.id===e}))){for(var t=e+1;o.some((function(t){return t.id===e}));)t++;i([{messageD:null,id:t,title:null,message:null,icon:"add_reaction"}].concat(Object(A.a)(o)))}else i([{messageD:null,id:e,title:null,message:null,icon:"add_reaction"}].concat(Object(A.a)(o)))}},a.a.createElement("div",{style:{padding:"2px",border:"1px dotted #b0b0b0",borderRadius:"5px",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(re.a,{style:{fontSize:"1rem"}},"add")),a.a.createElement("p",{style:{margin:"0"}},Object(S.w)("$__newMessage")))),a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"}},null===o||void 0===o?void 0:o.map((function(e){return a.a.createElement("div",{style:{width:"45%",padding:"5px",backgroundColor:"#fff",borderRadius:"5px",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)"},key:null===e||void 0===e?void 0:e.id},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"10px"}},a.a.createElement("input",{type:"text",placeholder:Object(S.w)("$__addTitle"),style:{border:"none",borderBottom:"1px solid #eee",outline:"none",padding:"5px",margin:"5px",fontSize:"0.9rem",width:"85%"},defaultValue:null===e||void 0===e?void 0:e.title,onChange:function(t){return function(e,t){var r=o.map((function(r){return r.id===t?Object(p.a)(Object(p.a)({},r),{},{title:e}):r}));i(r)}(t.target.value,null===e||void 0===e?void 0:e.id)}}),a.a.createElement(br.a,{icon:null===e||void 0===e?void 0:e.icon,onChange:function(t){!function(e,t){var r=o.map((function(r){return r.id===t?Object(p.a)(Object(p.a)({},r),{},{icon:e}):r}));i(r)}(t,null===e||void 0===e?void 0:e.id)}}),a.a.createElement(re.a,{style:{color:"#d6d6d6",cursor:"pointer"},onClick:function(){return function(e){var t=o.filter((function(t){return t!==e})).map((function(e){return e}));i(t)}(e)}},"delete")),a.a.createElement(_u,{data:e,edit:!0,id:null===e||void 0===e?void 0:e.id,changeData:x}))})),JSON.stringify(o)!==JSON.stringify(v)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end",zIndex:999}},a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.w)("$__save"),text:Object(S.w)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){w()}}))):a.a.createElement(a.a.Fragment,null)))}));function qu(){qu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Vu=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!0),d=Object(m.a)(u,2),p=d[0],h=d[1];a.a.useEffect((function(){g()}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var g=function(){var e=Object(f.a)(qu().mark((function e(){var t,r,n,a,i,c=arguments;return qu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>0&&void 0!==c[0]&&c[0],n=r,e.next=4,Pe.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}o({secretKey:"Bearer ".concat(a.data.token)}),e.next=13;break;case 9:return e.next=11,Fe.a.post("/api/token");case 11:(i=e.sent)&&o({secretKey:"Bearer ".concat(i.data.token)});case 13:h(!1);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)",paddingBottom:"15px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,{style:{color:Object(S.d)("color")}},"integration_instructions"),a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.w)("$__integrations"))),a.a.createElement(N.a,null,p?a.a.createElement(ct.a,null):a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",margin:"15px"}},a.a.createElement("legend",null,Object(S.w)("$__authorizationToken")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(_e.a,{label:Object(S.w)("$__authorizationToken",1),variant:Object(S.d)("fieldVariant"),name:"secretKey",InputLabelProps:{shrink:!0},InputProps:{multiline:!0,minRows:3,autoComplete:"new-password",type:l?"text":"password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement("div",{style:{cursor:"pointer",marginRight:7},onClick:function(){navigator.clipboard.writeText(n.secretKey)}},a.a.createElement(re.a,{icon:"content_copy"})),a.a.createElement(re.a,{icon:l?"visibility_off":"visibility",onClick:function(){s((function(e){return!e}))}}))},value:"".concat(n&&n.secretKey?n.secretKey:""),placeholder:Object(S.w)("$__secretKey",1),autoFocus:!0,disabled:!0})),a.a.createElement("i",null,Object(S.w)("$__secretKeyDescription"))),a.a.createElement("div",{style:{display:"none",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.w)("$__newToken"),text:Object(S.w)("$__newToken"),color:"green",icon:"refresh",size:"25px",onClick:function(){Object(S.c)({message:Object(S.w)("$__confirmApiTokenRevokeAndRecreate",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){}})}})))))))}))),Ju=function(){var e=Object(n.useState)("Overview"),t=Object(m.a)(e,2),r=t[0],o=t[1],i=function(e){o(e)};return a.a.createElement("div",{style:{width:"calc(100% - 15px)",position:"absolute",zIndex:"9",borderRadius:"5px",backgroundColor:"#eee",margin:"0px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",minHeight:"100vh",height:"auto"}},a.a.createElement(Rr.a,{style:{height:"100%",justifyContent:"flex-end",margin:"0px",width:"100%"}},a.a.createElement(Sn.a,{item:!0,xs:12,style:{backgroundColor:"#eee",height:"100%",display:"flex",justifyContent:"center",alignItems:"flex-start",flexDirection:"column",gap:"5px",marginBottom:"30px"}},a.a.createElement(Lu,null),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"15px",padding:"10px",borderBottom:"1px solid #b9b9b9",width:"100%",justifyContent:"flex-start",marginTop:"0px",marginBottom:"20px",color:"rgb(83 83 83)",overflowX:"auto"}},a.a.createElement(Xu,{value:"Overview",check:r,onClick:function(){return i("Overview")}},a.a.createElement(re.a,null,"grid_view")," ",Object(S.w)("$__overview")),a.a.createElement(Xu,{value:"Notifications",check:r,onClick:function(){return i("Notifications")}},a.a.createElement(re.a,null,"notifications_active")," ",Object(S.w)("$__notificationManagement")),a.a.createElement(Xu,{value:"Department",check:r,onClick:function(){return i("Department")}},a.a.createElement(re.a,null,"group")," ",Object(S.w)("$__users")),a.a.createElement(Xu,{value:"Message",check:r,onClick:function(){return i("Message")}},a.a.createElement(re.a,null,"sticky_note_2")," ",Object(S.w)("$__profileMessages")),a.a.createElement(Xu,{value:"WhiteLabel",check:r,onClick:function(){return i("WhiteLabel")}},a.a.createElement(re.a,null,"palette")," ",Object(S.w)("$__whiteLabel")),a.a.createElement(Xu,{value:"Integrations",check:r,onClick:function(){return i("Integrations")}},a.a.createElement(re.a,null,"integration_instructions")," ",Object(S.w)("$__integrations"))),"Overview"===r?a.a.createElement(Nu,null):"Notifications"===r?a.a.createElement(Fu,null):"WhiteLabel"===r?a.a.createElement(Hu,null):"Message"===r?a.a.createElement(Uu,null):"Integrations"===r?a.a.createElement(Vu,null):"Department"===r?a.a.createElement(Ru,null):null)))};function Xu(e){var t=e.children,r=e.value,o=e.check,i=e.onClick,c=Object(n.useState)(!1),l=Object(m.a)(c,2),s=l[0],u=l[1];return a.a.createElement("div",{onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},onClick:i,style:{textDecoration:"none",color:"rgb(83 83 83)",display:"flex",flexDirection:"row",gap:"5px",alignItems:"center",justifyContent:"center",fontSize:"15px",padding:"2px 7px",borderRadius:"3px",transition:"0.3s all",backgroundColor:s||r===o?"#cfcfcf":"transparent",cursor:s?"pointer":"default"}},t)}var Ku=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:jo,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:La.a,component:Ua,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:go.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:Os,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:"/forms",name:"Forms",alias:"forms",icon:"ballot",component:Ts,show:!0,auth:!0,search:!0,subMenu:!0,tabs:[{path:"resume",name:"resume",alias:"resume",icon:"ballot",show:!0,auth:!0}]},{path:"/sp",name:"Strategy & Plans",alias:"plan",icon:"view_comfy",component:Gl,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:!1,hashId:!0,templates:!0},{path:"board",name:"board",alias:"board",icon:"view_week",show:!0,auth:!0,permission:3,search:!1,hashId:!0,templates:!0},{path:"matrix",name:"MATRIX SWOT",alias:"matrix",icon:Ht.a,show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"guidelines",name:"guidelines",alias:"guidelines",icon:"alt_route",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"objectives",name:"objectives",alias:"objectives",icon:"gps_fixed",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"goals",name:"goals",alias:"goals",icon:"flag",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"actions",name:"ACTIONS",alias:"actions",icon:"playlist_play",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"bright-and-connected",name:"feeds",alias:"feeds",icon:"menu_book",show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:go.a,show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"library",name:"library",alias:"library",icon:"folder",show:!0,auth:!0,permission:3,hashId:!0}]},{path:"/t",name:"Tasks",alias:"tasks",component:ti,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:"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:ls,icon:"turned_in",show:!0,auth:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:aa,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:ui,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:xi,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(m.a)(r,2),o=n[0],i=n[1],l=Mn(),s=function(){var e=Object(f.a)($n().mark((function e(){return $n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/PasswordTokenValidation",{token:t.get("token")});case 2:e.sent.data.result||c.a.push("/");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();a.a.useEffect((function(){s()}),[]),t.get("token")&&36===t.get("token").length||c.a.push("/");var u=function(){var r=Object(f.a)($n().mark((function r(){var n;return $n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Fe.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(){c.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.w)("$__invalidRequest",1)," | ").concat(Object(S.w)("$__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(Rr.a,{style:{justifyContent:"center",overflow:"auto"}},a.a.createElement(Sn.a,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement("form",null,a.a.createElement(Gr.a,{db:"cards",login:!0},a.a.createElement(Wr.a,{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.w)("$__createPassword",1))),a.a.createElement(Hr.a,null,a.a.createElement(Ie,{onConfirmed:function(e){i(Object(p.a)(Object(p.a)({},o),{},{password:e}))}})),a.a.createElement(An,{className:l.justifyContentCenter},o&&o.password&&a.a.createElement(Tn,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return u()}},Object(S.w)("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:Yo,show:!0,auth:!1},{path:"/register",name:"Register Page",mini:"R",component:function(e){var t=a.a.useState([]),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(m.a)(i,2),s=l[0],u=l[1],d=a.a.useState(""),p=Object(m.a)(d,2),h=p[0],g=p[1],b=a.a.useState(""),v=Object(m.a)(b,2),y=v[0],x=v[1],w=a.a.useState(!1),_=Object(m.a)(w,2),O=_[0],j=_[1],E=a.a.useState(""),k=Object(m.a)(E,2),L=k[0],C=k[1],I=a.a.useState(""),T=Object(m.a)(I,2),D=T[0],F=T[1],N=a.a.useState(!1),P=Object(m.a)(N,2),$=P[0],M=P[1],B=a.a.useState(!1),z=Object(m.a)(B,2),Y=z[0],R=z[1],G=a.a.useState(0),H=Object(m.a)(G,2),W=H[0],U=H[1],q=a.a.useState(null),V=Object(m.a)(q,2),J=V[0],X=V[1],K=function(e,t){var r=n.indexOf(e),a=Object(A.a)(n);-1===r?a.push(e):a.splice(r,1),o(a)},Z=Ci(),Q=function(){var e=Object(f.a)(Li().mark((function e(t){return Li().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!Object(S.x)(t)){e.next=8;break}return e.next=4,Object(ke.f)(t);case 4:e.sent?(C(Object(S.w)("$__emailAlreadyExists",1)),x(""),j(!1)):(C(null),j(!0),Object(ke.h)(h,t)),e.next=10;break;case 8:C(Object(S.w)("$__invalidEmail",1)),x("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=Object(f.a)(Li().mark((function e(){return Li().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(D.length>=6)){e.next=9;break}return u(!0),e.next=4,Object(ke.r)(D,y);case 4:e.sent?(R(!0),M(!1)):M(!0),u(!1),e.next=10;break;case 9:M(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var t=Object(f.a)(Li().mark((function t(){var r;return Li().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,Fe.a.post("user/register-final-step/",{name:h,email:y,token:D,password:J,login:!0});case 4:(r=t.sent)&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&setTimeout((function(){c.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:Z.container,style:{overflow:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",overflow:"auto"}},a.a.createElement(Sn.a,{xs:12,sm:10,md:6},a.a.createElement(Gr.a,{db:"cards",className:Z.cardSignup},a.a.createElement("h2",{className:Z.cardTitle},Object(S.w)("$__register",1)),a.a.createElement(Hr.a,null,a.a.createElement("div",null,a.a.createElement(_e.a,{className:Z.textFields,label:Object(S.w)("$__fullName",1),variant:"standard",name:Object(S.w)("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{className:Z.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){g(e.target.value)}},value:h||"Cristofer Odair",disabled:O}),a.a.createElement(_e.a,{label:Object(S.w)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:!L&&y&&Object(S.x)(y)?"":"invalid",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"alternate_email"})),onChange:function(e){j(!1),C(null),x(e.target.value)},onBlur:function(){var e=Object(f.a)(Li().mark((function e(t){return Li().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Q(t.target.value);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:y,placeholder:"email@domain.com",disabled:O}),!O&&a.a.createElement(Ce.a,{icon:"navigate_next",text:Object(S.w)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){Q(y)}}),O&&y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(_e.a,{label:Object(S.w)("$__emailToken",1),variant:Object(S.d)("fieldVariant"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:$?"invalid":"",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"keyboard"})),onChange:function(e){C(null),F(e.target.value)}},value:D,placeholder:"****"}),a.a.createElement(Ce.a,{icon:"reply_all",text:Object(S.w)("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){Object(ke.h)(h,y)}}),!Y&&a.a.createElement(Ce.a,{icon:"navigate_next",text:Object(S.w)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){ee()}})),O&&Y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ie,{onConfirmed:function(e){X(e)}}),a.a.createElement(ji.a,{open:W,onClose:function(){return U(0)},"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",height:"80vh",overflowY:"auto",backgroundColor:"#FFFFFF",padding:"15px",margin:"auto"}},a.a.createElement("iframe",{title:"outModule",id:"policy",style:{position:"relative",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",onScroll:function(){console.log("scroll")},src:1===W?"https://sonne.global/SONNE-Politica-de-Privacidade-2022-01-07.pdf":"https://sonne.global/SONNE-Termos-de-Servicos-2022-01-07.pdf"}),a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(Tn,{round:!0,color:"custom_color",onClick:function(){return U(0)}},"J\xe1 li"))))),a.a.createElement(Xr.a,{classes:{root:Z.checkboxLabelControl,label:Z.checkboxLabel},control:a.a.createElement(Ei.a,{tabIndex:-1,onClick:function(){return K(1)},checkedIcon:a.a.createElement("div",{className:Z.checkedIcon},a.a.createElement(re.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:Z.uncheckedIcon},a.a.createElement(re.a,{size:"16px",color:"red"},"remove")),classes:{checked:Z.checked,root:Z.checkRoot}}),label:a.a.createElement("span",null,Object(S.w)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return U(1)},style:{color:"blue"}},Object(S.w)("$__privacyPolicy")),".")}),a.a.createElement(Xr.a,{classes:{root:Z.checkboxLabelControl,label:Z.checkboxLabel},control:a.a.createElement(Ei.a,{tabIndex:-1,onClick:function(){return K(2)},checkedIcon:a.a.createElement("div",{className:Z.checkedIcon},a.a.createElement(re.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:Z.uncheckedIcon},a.a.createElement(re.a,{size:"16px",color:"red"},"remove")),classes:{checked:Z.checked,root:Z.checkRoot}}),label:a.a.createElement("span",null,Object(S.w)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return U(2)},style:{color:"blue"}},Object(S.w)("$__servicesTerms")),".")}),a.a.createElement("div",{className:Z.center},n.indexOf(1)>-1&&J&&a.a.createElement(Tn,{round:!0,color:"custom_color",onClick:function(){return te()}},Object(S.w)("$__completeRegistration")))))),s&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},a.a.createElement(Oi,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=ko();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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=Ro();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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=Go();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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:no,show:!0,auth:!0,search:!0,subMenu:!0,permission:1,searchFields:["text","tags","users","priority","risk","complexity","impact","groups","status"]},{path:"/profile",name:"Profile",icon:"date_range",component:ku,show:!0,auth:!0,permission:0},{path:"/enterprise",name:"Enterprise",icon:"date_range",component:Ju,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:cu,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:Lo,icon:"folder",show:!0,auth:!0,permission:1,hashId:!1},{path:"/subscriptionUpgrade",name:"subscriptionUpgrade",alias:"subscriptionUpgrade",component:function(){var e=lu();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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=uu();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{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.w)("$__accessDenied","*")),a.a.createElement("h4",{className:e.description,style:{color:Object(S.d)("menu")}},Object(S.w)("$__accessDeniedDescription","*")))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],Zu=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{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 Qu(){Qu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ed=function(e){var t=l.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(et.t)(r[0]):null,i=r&&r.length>0&&36===r[0].length&&t.cards[r[0]]&&t.cards[r[0]].image?t.cards[r[0]].image:ca.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})).forEach((function(e){s.push(Object(p.a)(Object(p.a)({name:t.cards[e].name},t.cards[e].image?{avatar:t.cards[e].image}:{icon:"view_comfy"}),{},{onClick:function(){c.a.push("sp#".concat(t.cards[e]._id,"/dashboard"))}}))})),a.a.createElement(ka.a,{title:a.a.createElement(a.a.Fragment,null,t.cards[r[0]].name)},a.a.createElement("div",{style:Object(p.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(p.a)(Object(p.a)({},l.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(i,'")'),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(V.a,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:s})))))},td=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.search,o=t.session,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],v=g[1],y=Object(Y.a)(Zu)(),x=window.location.pathname.split("/"),w="/".concat(x[1]),_=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(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminViewLoader:!1,adminView:!1})})),function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{viewList:!1}))}}),[n.users.selected]);var O=window.location.hash.split("/");O[0]=O[0].replace("#","");var j="".concat(w,"#").concat(O[0]?O[0]:"tab"),E=Object(S.j)(),k=function(t){d(t);var r=l.a.getState().db.cards;Object.keys(r).forEach((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(p.a)(Object(p.a)({},l.a.getState().db),{},{cardsExpanded:t,cards:r}))},L=function(){var t=Object(f.a)(Qu().mark((function t(r){var n;return Qu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v(!0),l.a.getState().session.cards.adminViewLoader){t.next=8;break}return t.next=4,Object(Rt.a)(e,null,!0);case 4:n=t.sent,(l.a.getState().session.cards.adminViewLoader||n)&&(v(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!l.a.getState().session.cards.adminView})}))),t.next=10;break;case 8:v(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!l.a.getState().session.cards.adminView})}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(e){c.a.push(e)};return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:_?y.menuExpanded:y.menu},a.a.createElement("div",{className:_?y.buttonExpanded:y.button},a.a.createElement(Ce.a,{icon:_?"menu_open":"read_more",text:_?Object(S.w)("$__collapsingMenu",1):null,title:_?null:Object(S.w)("$__expandingMenu",1),iconColor:Object(S.d)("subMenuTextColor"),textColor:Object(S.d)("subMenuTextColor"),onClick:function(){e.subMenuExpanded(!_)},size:"21px"})),("/files"===window.location.pathname||"/t"===window.location.pathname||"/d"===window.location.pathname||"/sp"===window.location.pathname&&O[0]&&36===O[0].length)&&a.a.createElement(a.a.Fragment,null,u?a.a.createElement("div",{className:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_collapseCards"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__collapseCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:_?null:Object(S.w)("$__collapseCards",1),icon:"close_fullscreen",iconColor:Object(S.d)("subMenuTextColor"),onClick:function(){k(!1)},size:"21px"})):a.a.createElement("div",{className:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_expandingCards"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__expandingCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:_?null:Object(S.w)("$__expandingCards",1),icon:"open_in_full",iconColor:Object(S.d)("subMenuTextColor"),onClick:function(){k(!0)},size:"21px"}))),("/d"===w&&"dayTasks"===O[1]||"/t"===w&&n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||"/sp"===w&&!O[0])&&E&&(E.owner||E.plan&&(E.planAdmin||E.planModerate))&&a.a.createElement("div",{className:_?y.buttonExpanded:y.button,style:{display:"flex"}},b?a.a.createElement(ce.a,{size:25,style:{margin:"auto",display:"flex"}}):a.a.createElement(Ce.a,{text:_?Object(S.w)("$__adminViewDescription",1):null,title:_?null:Object(S.w)("$__adminViewDescription",1),textColor:l.a.getState().session.cards.adminView?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),iconColor:l.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:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_setAdminView"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__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:_?null:Object(S.w)("$__viewInColumns",1),icon:"view_column",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{viewList:!1}))},size:"21px"})),a.a.createElement("div",{className:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_viewInList"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__viewInList",1):null,title:_?null:Object(S.w)("$__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(p.a)(Object(p.a)({},l.a.getState().db),{},{viewList:!0}))},size:"21px"}))),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:y.separator}),O[0]&&36===O[0].length&&r.cards[O[0]]&&a.a.createElement("div",{style:{zIndex:1},id:"sideBar_subMenu_plan_infos"},a.a.createElement(ed,Object.assign({expanded:_},e))),Ku.filter((function(e){return e.path===w})).length>0&&Ku.filter((function(e){return e.path===w}))[0].tabs&&Ku.filter((function(e){return e.path===w}))[0].tabs.length>0&&(Ku.filter((function(e){return e.path===w}))[0].hashId&&O[0]&&36===O[0].length||!Ku.filter((function(e){return e.path===w}))[0].hashId)&&a.a.createElement(a.a.Fragment,null,Ku.filter((function(e){return e.path===w}))[0].tabs.filter((function(e){return!e.hashId&&(!O[0]||O[0]&&O[0].length<36)||e.hashId&&O[0]&&36===O[0].length})).filter((function(e,t){var n=!1,a=O[0]&&36===O[0].length?r.cards[O[0]]:null;return e&&e.AppAccess&&e.AppAccess.length>0?e.AppAccess.forEach((function(e){E[e]&&(n=!0)})):e&&!e.AppAccess&&(n=!0),a&&a.isTemplate&&!e.templates&&(n=!1),e&&e.AppAccess&&e.AppAccess.planAdmin&&!(E&&E.plan&&E.planAdmin)&&(n=!1),a&&a.planType&&("matrix"===e.alias||"guidelines"===e.alias||"objectives"===e.alias||"goals"===e.alias)&&(n=!1),a&&"board"===e.alias&&(!a.planType||a.planType&&"operational"!==a.planType)&&(n=!1),a&&"matrix"===e.alias&&a.planType&&(n=!1),a&&"operational"===a.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)})).map((function(e,t){return a.a.createElement("div",{className:_?y.buttonExpanded:y.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},a.a.createElement(Ce.a,{text:_?"matrix"===e.alias?"MATRIX SWOT":Object(S.w)("$__".concat(e.alias),1):null,title:_?null:"matrix"===e.alias?"MATRIX SWOT":Object(S.w)("$__".concat(e.alias),1),icon:e.icon,iconColor:O[1]===e.path?Object(S.d)("subMenuTextColorActive"):Object(S.d)("subMenuTextColor"),textColor:O[1]===e.path?Object(S.d)("subMenuTextColorActive"):Object(S.d)("subMenuTextColor"),onClick:function(){C("".concat(j,"/").concat(e.path))},size:"21px"}))}))),O[0]&&36===O[0].length&&r.cards[O[0]]&&r.cards[O[0]].miroBoard&&a.a.createElement("div",{className:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_plan_miroBoard"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__planningBoard",1):null,title:_?null:Object(S.w)("$__planningBoard",1),icon:"developer_board",iconColor:"planningBoard"===O[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"planningBoard"===O[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:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_lastTasks"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__lateTasks",1):null,title:_?null:Object(S.w)("$__lateTasks",1),icon:"event_busy",iconColor:"late"===O[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"late"===O[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){c.a.push("t#tab/lateTasks")},size:"21px"})),a.a.createElement("div",{className:_?y.buttonExpanded:y.button,id:"sideBar_subMenu_nextTasks"},a.a.createElement(Ce.a,{text:_?Object(S.w)("$__nextTasks",1):null,title:_?null:Object(S.w)("$__nextTasks",1),icon:"date_range",iconColor:"nextTasks"===O[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"nextTasks"===O[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){c.a.push("t#tab/nextTasks")},size:"21px"}))))))})),rd=r(671);function nd(){nd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var ad=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(vi)((function(e){var t=e.classes,r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=function(){var t=Object(f.a)(nd().mark((function t(r,n){return nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.subMenuExpanded&&e.setSubMenuExpanded(!1),!r||window.location.pathname===r&&n!==o||c.a.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!0})):(i(n),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.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(N.a,{info:{path:"components/Sidebar/Index"}},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(){u("/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(re.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(){u("/d#tab/resume","dashboard")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__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(){u("/bright-and-connected#tab/home","bright-and-connected")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:La.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(){u("/sp#tab/home","StrategyAndPlans")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__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(){u("/t#tab/myTasks","myTasks")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__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(){u("/library","library")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__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(){u("/tags","tags")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__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(){u("/calendar","calendar")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__calendar","*"))),a.a.createElement("div",{className:t.separator}),a.a.createElement("div",{className:t.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:l.a.getState().chat.open?t.itemButtomActive:t.itemButtom,onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!l.a.getState().chat.open}))},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(kn,null,a.a.createElement(re.a,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),Object(S.w)("$__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(re.a,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.w)("$__support","*")))),e.subMenu&&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(td,{hashs:s,subMenuExpanded:function(t){e.setSubMenuExpanded(t)},expanded:e.subMenuExpanded})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:15,color:"#c0b283",fontSize:"10px"}},"V:",rd.version))))})));var od=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().chat;return a.a.createElement("div",{id:"chatNotificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{"aria-haspopup":"true",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!t.open}))}},a.a.createElement(kn,null,a.a.createElement(re.a,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))))}));var id=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=l.a.getState(),t=e.db,r=e.session,n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useRef(null),u=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),d=function(e){s.current&&s.current.contains(e.target)||c(!1)},p=Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&t.cards[e]._users&&t.cards[e]._users[r._id]&&t.cards[e]._users[r._id].myDay&&_()(new Date(1e3*t.cards[e]._users[r._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===u})).map((function(e){return t.cards[e]}));return 0===p.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:s,"aria-controls":i?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){c((function(e){return!e}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:p.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(re.a,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),p.length>0&&a.a.createElement(It.a,{open:i,anchorEl:s.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:d},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"}},a.a.createElement("p",{style:{margin:"0px",marginLeft:"10px",alignSelf:"center",padding:"0px",fontSize:"14px",fontWeight:"bolder"}},Object(S.w)("$__myDay"))),a.a.createElement(lr.a,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))}));var cd=Object(u.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState([]),d=Object(m.a)(u,2),p=d[0],f=d[1],h=a.a.useRef(null),g=Object.keys(l.a.getState().db.cards).filter((function(e){return!!(r.cards[e]&&!r.cards[e].deleted&&"chatGroup"!==r.cards[e].type&&r.cards[e]._parent&&l.a.getState().db.cards[l.a.getState().db.cards[e]._parent]&&l.a.getState().db.cards[l.a.getState().db.cards[e]._parent].requireApproval&&(l.a.getState().db.cards[l.a.getState().db.cards[e]._parent]._users[n._id]&&l.a.getState().db.cards[l.a.getState().db.cards[e]._parent]._users[n._id].approvalResponsible||r.cards[e]._users&&1===Object.keys(r.cards[e]._users).length&&r.cards[e]._users[n._id]))})).map((function(e){return r.cards[e]}));a.a.useEffect((function(){0===g.length&&s(!1)}),[e.cards]);var b=function(e){h.current&&h.current.contains(e.target)||s(!1)};return 0===g.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsApprovalBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:h,"aria-controls":c?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:null===g||void 0===g?void 0:g.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(re.a,{icon:"approval",color:"parent",title:"$__forApproval"}))),g.length>0&&a.a.createElement(It.a,{open:c,anchorEl:h.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom",padding:11}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:b},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.w)("$__attention",1),": ",a.a.createElement("span",{style:{color:Object(S.d)("menu")}},Object(S.w)("$__thisActivityRequireApproval",1))),g.filter((function(e){return-1===p.indexOf(e._id)})).sort((function(e,t){var r=e.updated_at&&e.updated_at.low?e.updated_at.low:e.updated_at,n=t.updated_at&&t.updated_at.low?t.updated_at.low:t.updated_at;return r<n?-1:r>n?1:0})).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(ut.a,{db:"cards",cardId:e._id,onlyOption:!0}),a.a.createElement(st,{nodeId:e._id,onAction:function(){var t=Array.from(p);-1===t.indexOf(e._id)&&t.push(e._id),f(t)}}))}))))))})))})),ld=Object(Y.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 sd=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users,timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,c=e.data,s=e.type,u=a.a.useState(!1),d=Object(m.a)(u,2),f=d[0],g=d[1],b=ld();a.a.useEffect((function(){return function(){}}),[]);var v="cards";c&&c.cardId&&l.a.getState().db.users[c.cardId]&&(v="users");var y=function(){var t=Object(et.j)(c.cardId);e.reduxFunction("IMMEDIATE","SET_NOTIFICATIONS",Object(p.a)(Object(p.a)({},l.a.getState().notifications),{},{total:l.a.getState().notifications.total-t.total})),Object(Ar.a)(e,{readedBy:o._id,id:e.cardId,db:"cards",type:"all"===s||"mentions"===s||"completed"===s||"deleted"===s?"all":s}),l.a.getState().db&&l.a.getState().db.cards&&l.a.getState().db.cards[c.cardId]&&e.reduxFunction("IMMEDIATE","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},c.cardId,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[c.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),i.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:c.cardId,db:"cards",type:"all"===s||"mentions"===s||"completed"===s||"deleted"===s?"all":s},(function(){})),e.onRead&&setTimeout((function(){e.onRead()}),500)},x=Object.keys(r[c.cardId]).filter((function(e){var t;return"all"===s||"deleted"===s&&(null===(t=l.a.getState().db.cards[c.cardId])||void 0===t?void 0:t.deleted)||"deleted"!==s&&l.a.getState().db.cards[c.cardId]&&!l.a.getState().db.cards[c.cardId].deleted&&("comment"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"comment"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"log"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"log"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"timer"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"timer"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"kpi"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"kpi"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"mentions"===s&&Object.keys(r[c.cardId]).filter((function(t){var n,a;return(null===(n=r[c.cardId][e])||void 0===n||null===(a=n.message)||void 0===a?void 0:a.indexOf(o._id))>-1&&!r[c.cardId][e].deleted})).length>0||"completed"===s&&"completed"===l.a.getState().db.cards[c.cardId].status)})).filter((function(e){return o&&o._id&&r[c.cardId]&&r[c.cardId][e]&&!r[c.cardId][e].deleted&&r[c.cardId][e].user&&r[c.cardId][e].user._id&&r[c.cardId][e].user._id!==o._id&&(!r[c.cardId][e].readedBy||r[c.cardId][e].readedBy&&!r[c.cardId][e].readedBy[o._id])}));return a.a.createElement("div",{className:c.readed?b.Readed:b.unReaded,style:{width:"100%",overflow:"auto"}},c.cardId&&l.a.getState().db.cards[c.cardId]&&a.a.createElement("div",{style:l.a.getState().db.cards[c.cardId]&&"chatGroup"===l.a.getState().db.cards[c.cardId].type?{cursor:"pointer"}:{}},a.a.createElement(ut.a,{setPrivate:function(e){g(e)},db:"cards",data:l.a.getState().db.cards[c.cardId],onlyOption:!(!l.a.getState().db.cards[c.cardId]||"chatGroup"!==l.a.getState().db.cards[c.cardId].type),onOpen:e.onClick||null})),x.length>0&&(!l.a.getState().db.cards[c.cardId].private||l.a.getState().db.cards[c.cardId].private&&(l.a.getState().controls.lockPrivate||f))?a.a.createElement(a.a.Fragment,null,x.sort((function(e,t){return parseInt(r[c.cardId][e].created_at)>parseInt(r[c.cardId][t].created_at)?-1:parseInt(r[c.cardId][e].created_at)<parseInt(r[c.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(_r.a,{storie:Object(p.a)(Object(p.a)({},l.a.getState().timeline&&l.a.getState().timeline[c.cardId]&&l.a.getState().timeline[c.cardId][t]?l.a.getState().timeline[c.cardId][t]:{}),{},{idRel:t}),boxStyle:{width:"calc(100% - 10px) !important",maxWidth:"285px"},db:v,noReactions:!0,noReply:!0,openLightBox:function(r){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:l.a.getState().timeline[c.cardId][t].files?l.a.getState().timeline[c.cardId][t].files:[],file:r})}}),r+1===x.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(k.a,{title:Object(S.w)("$__open",1),text:Object(S.w)("$__open",1),color:Object(S.d)("color"),icon:"launch",onClick:function(){e.onClick&&e.onClick(),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:c.cardId,module:"cardEdit",activeModule:"cardEdit",data:l.a.getState().db.cards[c.cardId]})),y()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}),a.a.createElement(k.a,{title:Object(S.w)("$__markAsRead",1),text:Object(S.w)("$__markAsRead",1),color:Object(S.d)("color"),icon:"mark_chat_read",onClick:function(){y()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}))):a.a.createElement(a.a.Fragment,null))}))):a.a.createElement(a.a.Fragment,null))}));function ud(){ud=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var dd=Object(u.b)((function(e){return{notifications:e.notifications,timeline:e.timeline,session:e.session,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.session,n=t.timeline,o=t.functions.socket,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState("comment"),h=Object(m.a)(d,2),g=h[0],b=h[1],v=a.a.useRef(),y=function(){var t=Object(f.a)(ud().mark((function t(){return ud().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.w)("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){u(!1);var t=Object(p.a)({},l.a.getState().timeline);Object.keys(t).forEach((function(e){t&&t[e]&&Object.keys(t[e]).filter((function(n){return l.a.getState().db.cards&&l.a.getState().db.cards[e]&&"chatGroup"!==l.a.getState().db.cards[e].type&&(!t[e][n].readedBy||t[e][n].readedBy&&!t[e][n].readedBy[r._id])})).forEach((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{o.emit("data",{module:"notifications",method:"put",action:"readedAll"},{})}catch(n){console.log(n)}}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(e){var t,r;(null===e||void 0===e||null===(t=e.target)||void 0===t||null===(r=t.className)||void 0===r?void 0:r.indexOf("ignoreClickAway"))>-1||v.current&&v.current.contains(e.target)||setTimeout((function(){u(!1)}),100)},w=0,_={comment:0,log:0,mentions:0,deleted:0,kpi:0,timer:0,completed:0},O=r._id&&l.a.getState().db.users&&l.a.getState().db.users[r._id]||{};if(Object.keys(l.a.getState().db.cards).filter((function(e){var t=l.a.getState().db.cards[e];return console.log(),!!("chatGroup"!==t.type&&"step"!==t.type&&r&&r._id&&(t._users&&t._users[r._id]||(!t._users||t._users&&!t._users[r._id])&&t._groups&&O&&O.groups&&O.groups.length>0&&Object.keys(t._groups).length>0&&Object.keys(t._groups).filter((function(e){return O&&O.groups&&O.groups.filter((function(t){return t.value===e})).length>0})).length>0)&&n[e]&&Object.keys(n[e]).filter((function(t){return r&&r._id&&n&&n[e]&&n[e][t]&&!n[e][t].deleted&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).length>0)})).filter((function(e){return n[e]})).forEach((function(e,t){Object.keys(n[e]).filter((function(t){return r&&r._id&&n[e]&&n[e][t]&&!n[e][t].deleted&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).forEach((function(t){var a,o,i,c;(null===(a=l.a.getState().db.cards[e])||void 0===a?void 0:a.deleted)&&(_.deleted=_.deleted+1),"completed"===(null===(o=l.a.getState().db.cards[e])||void 0===o?void 0:o.status)&&(_.completed=_.completed+1),(null===(i=n[e][t])||void 0===i||null===(c=i.message)||void 0===c?void 0:c.indexOf(r._id))>-1&&l.a.getState().db.cards[e]&&!l.a.getState().db.cards[e].deleted&&(_.mentions=_.mentions+1),_[n[e][t].type]=parseInt(_[n[e][t].type])+1,w+=1}))})),0===w&&s&&u(!1),0===w)return a.a.createElement(a.a.Fragment,null);var j=g;return"comment"!==j||_.comment||(j="mentions"),"mentions"!==j||_.mentions||(j="timers"),"timers"!==j||_.mentions||(j="kpi"),"kpi"!==j||_.mentions||(j="log"),"log"!==j||_.log||(j="completed"),"completed"!==j||_.completed||(j="deleted"),"deleted"!==j||_.deleted||(j="all"),a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:v,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){u((function(e){return!e}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:w,color:"secondary"},a.a.createElement(re.a,{icon:0===w?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),a.a.createElement(It.a,{open:s,anchorEl:v.current,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,o=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===o?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:x},a.a.createElement("div",{style:{width:"800px",overflowY:"auto"}},a.a.createElement("div",{style:{position:"relative",display:"flex"}},a.a.createElement("div",{style:{height:"auto",width:"300px",overflowY:"auto",display:"table"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px",width:"-webkit-fill-available",fontSize:18,color:Object(S.d)("color"),fontWeight:"bold"}},a.a.createElement("div",null,Object(S.w)("$__notifications"))),a.a.createElement("ul",{style:{listStyle:"none",padding:0}},_.comment?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__timeline","*"),text:Object(S.w)("$__timeline","*"),color:"comment"===j?Object(S.d)("menu"):"lightGray",icon:"timeline",onClick:function(){b("comment")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.comment})):a.a.createElement(a.a.Fragment,null),_.mentions?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__mentioned","*"),text:Object(S.w)("$__mentioned","*"),color:"mentions"===j?Object(S.d)("menu"):"lightGray",icon:"person_pin_circle",onClick:function(){b("mentions")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.mentions})):a.a.createElement(a.a.Fragment,null),_.kpi?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__kpi","*"),text:Object(S.w)("$__kpi","*"),color:"kpi"===j?Object(S.d)("menu"):"lightGray",icon:"analytics",onClick:function(){b("kpi")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.kpi})):a.a.createElement(a.a.Fragment,null),_.timer?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__timeSheet","*"),text:Object(S.w)("$__timeSheet","*"),color:"timer"===j?Object(S.d)("menu"):"lightGray",icon:"timer",onClick:function(){b("timer")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.timer})):a.a.createElement(a.a.Fragment,null),_.log?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__update","*"),text:Object(S.w)("$__update","*"),color:"log"===j?Object(S.d)("menu"):"lightGray",icon:"update",onClick:function(){b("log")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.log})):a.a.createElement(a.a.Fragment,null),_.completed?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__completed","*"),text:Object(S.w)("$__completed","*"),color:"completed"===j?Object(S.d)("menu"):"lightGray",icon:"verified",onClick:function(){b("completed")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.completed})):a.a.createElement(a.a.Fragment,null),_.deleted?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__deletedItems","*"),text:Object(S.w)("$__deletedItems","*"),color:"deleted"===j?Object(S.d)("menu"):"lightGray",icon:"delete_sweep",onClick:function(){b("deleted")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:_.deleted})):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.w)("$__all","*"),text:Object(S.w)("$__all","*"),color:"all"===j?Object(S.d)("menu"):"lightGray",icon:"all_inbox",onClick:function(){b("all")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0}))),a.a.createElement("div",null,a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(k.a,{title:Object(S.w)("$__clearNotifications",1),text:Object(S.w)("$__clearNotifications",1),color:Object(S.d)("color"),icon:"clear_all",onClick:function(){y()},size:"21px",style:{padding:"0px !important"}})))),a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"600px",backgroundColor:"rgba(247,247,247,1)",overflowY:"auto"}},Object.keys(l.a.getState().db.cards).filter((function(e){var t=l.a.getState().db.cards[e],a=l.a.getState().db.users[r._id];return!!("chatGroup"!==t.type&&r&&r._id&&t._users&&(t._users[r._id]||t&&t._groups&&Object.keys(t._groups).length>0&&Object.keys(t._groups).filter((function(e){return a&&a.groups&&a.groups.filter((function(t){return t.value===e})).length>0})))&&n[e]&&Object.keys(n[e]).filter((function(t){return n&&n[e]&&n[e][t]&&!n[e][t].deleted&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).length>0)})).filter((function(e){var t;return"all"===j||"deleted"===j&&(null===(t=l.a.getState().db.cards[e])||void 0===t?void 0:t.deleted)||"deleted"!==j&&l.a.getState().db.cards[e]&&!l.a.getState().db.cards[e].deleted&&("comment"===j&&Object.keys(n[e]).filter((function(t){var r;return"comment"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"log"===j&&Object.keys(n[e]).filter((function(t){var r;return"log"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"kpi"===j&&Object.keys(n[e]).filter((function(t){var r;return"kpi"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"timer"===j&&Object.keys(n[e]).filter((function(t){var r;return"timer"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"mentions"===j&&Object.keys(n[e]).filter((function(t){var a,o;return(null===(a=n[e][t])||void 0===a||null===(o=a.message)||void 0===o?void 0:o.indexOf(r._id))>-1})).length>0||"completed"===j&&"completed"===l.a.getState().db.cards[e].status)})).sort((function(e,t){var a=0,o=0;return n[e]&&Object.keys(n[e]).filter((function(t){return r&&r._id&&n&&n[e]&&n[e][t]&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).forEach((function(t){parseInt(n[e][t].created_at)>a&&(a=parseInt(n[e][t].created_at))})),n[t]&&Object.keys(n[t]).filter((function(e){return n[t][e].user._id!==r._id&&(!n[t][e].readedBy||n[t][e].readedBy&&!n[t][e].readedBy[r._id])})).forEach((function(e){parseInt(n[t][e].created_at)>a&&(o=parseInt(n[t][e].created_at))})),a>o?-1:a<o?1:0})).map((function(e){return a.a.createElement("div",{key:"".concat(e)},a.a.createElement(sd,{type:j,data:{cardId:e},onClick:function(){u(!1)}}))}))))))))})))})),pd=function(e){var t=e.handlePrevScreen,r=e.name,n=e.prev,o=e.handleClose;return a.a.createElement("div",null,a.a.createElement("p",{style:{marginTop:"2px",height:"80px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",borderBottom:"1px solid #d1d1cf",fontSize:"16px"}},a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"view_comfy"),r),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",right:"20px",top:"18px",color:"grey"},size:"30px",onClick:o?function(){o()}:null},"close")),n&&a.a.createElement("div",{id:"getElements_58"}," ",a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",left:"20px",top:"18px",color:"grey"},onClick:t,size:"30px"},"arrow_back")))},fd=function(e){var t=e.name,r=e.handleEvent,o=e.style,i=e.disabled,c=e.id,l=Object(n.useState)(!1),s=Object(m.a)(l,2),u=s[0],d=s[1],f=u?"rgba(0, 0, 0,0.05)":"white";return a.a.createElement("button",{id:c,onMouseEnter:function(){d(!0)},onMouseLeave:function(){d(!1)},onClick:r,disabled:i,style:Object(p.a)(Object(p.a)({},o),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:f})},t)},hd=function(e){var t=e.children;return a.a.createElement("div",{style:{height:"100.4vh",width:"100vw",backgroundColor:"rgba(0, 0, 0, 0.5)",position:"absolute",left:"0% !important",right:"0%",top:"0%",bottom:"0%",zIndex:"9999",display:"flex",justifyContent:"center",overflowY:"scroll",overflowX:"hidden"}},t)},md=function(e){var t=e.children,r=e.widthSize,o=e.id,i=Object(n.useState)({top:"10%",resize:"0.9"}),c=Object(m.a)(i,2),l=c[0],s=c[1];return Object(n.useEffect)((function(){var e=window.innerWidth<1500;s({resize:e?"0.9":"1"})}),[]),a.a.createElement("div",{style:{width:r||"900px",position:"absolute",borderRadius:"5px",backgroundColor:"#fafbfc",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",transform:"scale(".concat(l.resize,")"),alignSelf:"center"},id:o},t)},gd=function(e){var t=e.tittle,r=e.text;return a.a.createElement("div",{style:{border:"1px solid #ebebeb",marginLeft:"25px",minHeight:"50px",backgroundColor:"white",marginTop:"22px",width:"92%",height:"100px",position:"relative",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},a.a.createElement("p",{style:{margin:"0px",marginLeft:"22px",marginTop:"16px",fontSize:"16px",fontWeight:"bold"}},t),a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",color:"#757380",marginRight:"10px",position:"absolute",top:"-14px",left:"-14px"}},"info"),a.a.createElement("p",{style:{marginLeft:"22px",marginTop:"0px",display:"flex",position:"relative",fontSize:"14px",color:"#7c828d",maxWidth:"370px"}},r))},bd=function(e){var t=e.item,r=e.index,o=e.handleItemClick,i=e.selectedPlan,c=Object(n.useState)(null),l=Object(m.a)(c,2),s=l[0],u=l[1],d=function(e){u(e)};return a.a.createElement("li",{id:t.id,onClick:function(){return o(r,t)},onMouseEnter:function(){return d(r)},onMouseLeave:function(){return d(null)},style:{filter:"brightness(".concat((null===i||void 0===i||i.index,"100%"),")"),opacity:(null===i||void 0===i?void 0:i.index)===r?"1":"0.7",border:"2px solid ".concat((null===i||void 0===i||i.index,"#ebebeb")),width:"90%",height:"65px",marginTop:0===r?"15px":"12px",marginLeft:"17px",display:"flex",alignItems:"center",boxShadow:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px",backgroundColor:(null===i||void 0===i?void 0:i.index)===r?"#ebebeb":"white",cursor:"pointer",transform:"scale(".concat(s===r?"1.03":"1",")")}},a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",color:"#757380",marginLeft:"10px",marginRight:"10px"},icon:t.icon}),a.a.createElement("p",{style:{alignSelf:"center",marginTop:"9px",color:"black",fontWeight:"bold"}},Object(S.w)(t.label)))},vd=[{label:"$__strategic",value:null,gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gif.gif",description:"$__planStrategicDescription",icon:Ht.a,id:"SelectPlan",index:0},{label:"$__tacticAndOrOperational",value:"flow",gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gifEstrategico.gif",description:"$__planTaticAndOperationalDescription",icon:"account_tree",id:"c"},{label:"$__flowOrProcess",value:"operational",gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gif2.gif",description:"$__planFlowOrProcessDescription",icon:"view_week",id:"a"},{label:"$__crm",value:"crm",gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gif3.gif",description:"$__planCrmDescription",icon:"filter_alt",id:"b"}],yd=function(e){var t=e.handleNextScreen,r=e.handleName,o=e.handleClose,i=Object(n.useState)(!0),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(pd,{prev:!1,name:Object(S.w)("$__insertThePlanName"),handleClose:o}),a.a.createElement(Rr.a,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(Sn.a,{item:!0,xs:12,style:{marginTop:"30px"}},a.a.createElement("p",{style:{outline:"none",alignSelf:"center",fontWeight:"bold",width:"99.3%",backgroundColor:"transparent",border:"none",fontSize:"12px",marginBottom:"4px",marginLeft:"2px",marginTop:"6px"}},Object(S.w)("$__planName")),a.a.createElement("input",{onChange:function(e){var t=e.target.value.slice(-1);s(!t)},onBlur:function(e){return r(e.target.value)},placeholder:Object(S.w)("$__insertThePlanNamePlaceholder"),style:{height:"35px",color:"#7c828d",marginBottom:"5px",outline:"none",alignSelf:"center",width:"99.3%",backgroundColor:"transparent",border:"none",borderBottom:"1px solid #d1d1cf",fontSize:"16px"}})),a.a.createElement(Sn.a,{item:!0,xs:12,style:{marginTop:"45px"}},a.a.createElement(fd,{handleEvent:t,id:"intro_45",name:Object(S.w)("$__next"),disabled:l,style:{width:"40%",marginLeft:"30%",marginBottom:"45px",border:"2px solid #ebebeb"}}))))};function xd(){xd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var wd=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=l.a.getState(),n=r.session,a=r.db,o=Object(p.a)({},e),i=Object(p.a)({},e._parent&&l.a.getState().db.cards[e._parent]?l.a.getState().db.cards[e._parent]:{});Object.keys(o).forEach((function(e){o[e]||delete o[e]}));var c=o.name.trim().split("\n"),s=t,u={},d={};(null===o||void 0===o?void 0:o.users)&&o.users.forEach((function(e,t){var r=Object(p.a)({},0===t?Object(p.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];d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({_id:e,name:n.name,image:n.image||null},r),{},{myDay:null})))}));var m=[];return c.map(function(){var e=Object(f.a)(xd().mark((function e(t,r){var a,c;return xd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.trim()&&(c=Object(Nr.a)(),m.push(c),Fe.a.post("card/add",Object(p.a)(Object(p.a)(Object(p.a)({_id:c},o),i.showInPanel?{channel:!0}:{}),{},{name:t},"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)})),o.channel&&delete o.channel,u=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},c,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({_id:c},o),{},{name:t,_users:d,_createdBy:{name:l.a.getState().db.users[n._id].name,image:l.a.getState().db.users[n._id].image,_id:n._id,channel:!!(null===i||void 0===i?void 0:i.showInPanel)}},i._planId?{_planId:i._planId}:{}),"plan"===i.type?{_planId:i._id}:{}),"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)}))),(null===(a=u[c])||void 0===a?void 0:a.users)&&delete u[c].users,s+=1);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),u};function _d(){_d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Od=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.handleClose,r=l.a.getState().session,o=Object(n.useState)(vd[0]),i=Object(m.a)(o,2),s=i[0],u=i[1],d=Object(n.useState)({intro:!0,type:!1,article:!1}),h=Object(m.a)(d,2),g=h[0],b=h[1],v=Object(n.useState)(!1),y=Object(m.a)(v,2),x=y[0],w=y[1],_=function(e,t){u(Object(p.a)(Object(p.a)(Object(p.a)({},s.name?{name:s.name}:{}),t),{},{index:e}))},O=function(){return a.a.createElement("ul",{id:"testId11",style:{width:"100%",height:"344px",listStyle:"none",marginTop:"13px",padding:"5px 10px 10px 0px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px",paddingLeft:"0",border:"1px solid #ebebeb"}},vd.map((function(e,t){return a.a.createElement(bd,{key:e.id,item:e,index:t,handleItemClick:_,selectedPlan:s})})))},j=function(){var n=Object(f.a)(_d().mark((function n(){var a;return _d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return w(!0),a=Object(Nr.a)(),n.next=4,wd({_id:a,name:s.name,type:"plan",planType:s.value,users:[r._id]},0);case 4:if(!n.sent){n.next=10;break}return n.next=8,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:a});case 8:n.sent&&(c.a.push("sp#".concat(a,"/dashboard")),w(!1),t());case 10:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return a.a.createElement(hd,null,g.intro&&a.a.createElement(a.a.Fragment,null,a.a.createElement(md,{id:"Plantype_67",widthSize:"700px"},a.a.createElement(yd,{handleNextScreen:function(){return b(Object(p.a)(Object(p.a)({},g),{},{intro:!1,type:!0}))},handleName:function(e){u(Object(p.a)(Object(p.a)({},s),{},{name:e}))},handleClose:t}))),a.a.createElement(md,null,g.type&&a.a.createElement("div",{id:"Plantype_672"},a.a.createElement(pd,{prev:!0,name:Object(S.w)("$__selectPlanType"),handlePrevScreen:function(){return b(Object(p.a)(Object(p.a)({},g),{},{type:!1,intro:!0}))},handleClose:t}),a.a.createElement(Rr.a,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(Sn.a,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",overflow:"hidden"}},a.a.createElement(Sn.a,{item:!0,xs:5,style:{marginBottom:"10px",marginTop:"10px"}},a.a.createElement(O,{style:{transition:"0.7s"}})),a.a.createElement(Sn.a,{item:!0,xs:7,style:{display:"flex",marginTop:"10px",flexDirection:"column"}},a.a.createElement("div",{style:{padding:"20px",marginLeft:"25px",width:"400px",display:"flex",justifyContent:"center",border:"1px solid #ebebeb",marginTop:"14px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:s.gif,style:{width:"350px",boxShadow:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px",alignSelf:"center",height:"180px",zIndex:"100"}})),a.a.createElement(gd,{tittle:s.type,text:Object(S.w)(s.description?s.description:vd[0].description,1)}))),a.a.createElement(Sn.a,{item:!0,xs:12},x?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(fe.a,null)):a.a.createElement(fd,{id:"Plantype_110",name:Object(S.w)("$__create"),handleEvent:function(){j()},style:{width:"50%",marginLeft:"25%",marginTop:"35px",marginBottom:"45px",border:"2px solid #ebebeb"}}))),"  ")))}));var jd=Object(u.b)((function(e){return{users:e.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useRef(null),f=l.a.getState().db,h=Object(S.j)(),g=window.location.hash.split("/");g[0]=g[0].replace("#","");var b=null;36===g[0].length||g[2]&&36===g[2].length?36===g[0].length?b=g[0]:36===g[2].length&&(b=g[2]):b=null;var v=window.location.pathname.replace("/","").toLowerCase(),y=f.dataType.filter((function(e){return!!(("sp"===v||!e.hash&&!b||e.hash&&b)&&e.view&&Object.keys(e.view).filter((function(e){return e===v})).length>0&&(!e.view[v].pages||g[1]&&e.view[v].pages.indexOf(g[1])>-1||!g[1]&&e.view[v].pages.indexOf("none")>-1))})),x=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(p.a)({type:t.name,_parent:g[0]&&f.cards[g[0]]?g[0]:null},"user"===t.data.type?{}:Object(p.a)({status:"notStarted"},r?{isTemplate:!0}:{}))}))};function w(e){"Tab"===e.key&&(e.preventDefault(),u(!1))}return g&&g[1]&&"users"===g[1]&&h.user&&h.userAdmin&&y.push({name:"importUsers",icon:"import_contacts",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{importUsers:!0}))}}),0===y.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"QuickAddBt"},a.a.createElement(rt.a,{ref:d,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){1!==y.length||"plan"!==y[0].name?1===y.length?x(y[0],!(!g[1]||"template"!==g[1])):y.length>1&&u((function(e){return!e})):o(!0)}},a.a.createElement(re.a,{usePropagation:!0,size:"27px",color:Object(S.d)("menu")},"add_box")),n&&a.a.createElement(Od,{handleClose:function(){return o(!1)}}),a.a.createElement(It.a,{open:s,anchorEl:d.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:function(e){var t;t=e,d.current&&d.current.contains(t.target)||u(!1)}},a.a.createElement(Tt.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:w},y.sort((function(e,t){return e.name>t.name?-1:0})).map((function(e,t){return a.a.createElement(G.a,{key:t,style:{color:Object(S.d)("menu")},onClick:function(){e.onClick?e.onClick():x(e),u(!1)}},a.a.createElement(re.a,{icon:e.icon,style:{margin:"none !important"},color:Object(S.d)("menu")}),a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.w)("$__".concat(e.name),1)))}))))))})))}));function Ed(){Ed=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var kd=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=l.a.getState(),t=e.db,r=e.timeline,n=e.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState({}),d=Object(m.a)(u,2),p=d[0],h=d[1],g=a.a.useState("users"),b=Object(m.a)(g,2),v=b[0],y=b[1],x=a.a.useRef(null);a.a.useEffect((function(){w()}),[r]);var w=function(){var e=Object(f.a)(Ed().mark((function e(){var t;return Ed().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(Ar.b)(),h(t),p.total>0&&0===p.users&&y("groups"),"groups"===v&&p.total>0&&0===p.groups&&y("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(e){x.current&&x.current.contains(e.target)||s(!1)},O=Object.keys(t.cards).filter((function(e){return t.cards[e]&&t.cards[e]._kpiTimer&&t.cards[e]&&t.cards[e]._users&&Object.keys(t.cards[e]._kpiTimer).filter((function(r){return t.cards[e]._kpiTimer&&t.cards[e]._kpiTimer[r]&&t.cards[e]._kpiTimer[r].userId&&n&&n._id&&t.cards[e]._kpiTimer[r].userId===n._id})).length>0&&Object.keys(t.cards[e]._users).filter((function(e){return n&&n._id&&e===n._id})).length>0})).map((function(e){return t.cards[e]}));return 0===O.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:x,"aria-controls":c?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(J.a,{badgeContent:O.length,color:"secondary",overlap:"rectangular"},a.a.createElement(re.a,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),O.length>0&&a.a.createElement(It.a,{open:c,anchorEl:x.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:_},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.w)("$__timersInProgress")),O.map((function(e,t){return a.a.createElement(ut.a,{db:"cards",key:t,cardId:e._id,notGlobalExpanded:!0,viewTimer:!0})}))))))})))})),Sd=r(275);function Ld(){Ld=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Cd=Object(u.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Sd.a)((function(e){var t=a.a.useState(""),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState([]),h=Object(m.a)(d,2),g=h[0],b=h[1],v=a.a.useState(!1),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(!1),O=Object(m.a)(_,2),j=O[0],E=O[1],L=a.a.useState("all"),C=Object(m.a)(L,2),I=C[0],T=C[1],D=l.a.getState(),F=D.db,N=D.session,A=Object(S.j)(),P=window.location.hash.split("/");P[0]=P[0].replace("#",""),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),w(!x),E(!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),E(!j),w(!0),t=setTimeout((function(){return $()}),500)),function(){return clearTimeout(t)}}),[e.deleted]);var $=function(){var t=Object(f.a)(Ld().mark((function t(){var r;return Ld().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(e,{search:e.text,ignoreLoader:!0,deleted:e.deleted,completed:e.completed,cardLoad:"search"});case 2:(r=t.sent)&&setTimeout((function(){M(r)}),1e3);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=Object(f.a)(Ld().mark((function t(r){var n,a,o,i;return Ld().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=l.a.getState().db.users[N._id]||{},a=Object(p.a)(Object(p.a)({},l.a.getState().db.cards),r),o=new Promise((function(t,r){a&&Object.keys(a).length>0&&t(Object.keys(a).filter((function(t){if(a[t]&&"chatGroup"!==a[t].type&&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].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(et.A)(t))||N._id&&a[t]._users&&a[t]._users[N._id]||a[t]&&a[t]._groups&&Object.keys(a[t]._groups).length>0&&Object.keys(a[t]._groups).filter((function(e){return n&&n.groups&&n.groups.filter((function(t){return t.value===e})).length>0})))&&(!a[t].private||a[t].private&&a[t]._users&&a[t]._users[N._id]))return!0}))),t([])})),t.next=5,o.then((function(e){return e}));case 5:(i=t.sent)&&(b(i),u(!1),e.onFinish&&e.onFinish(i.length));case 7: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(Rr.a,null,a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ct.a,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(k.a,{title:Object(S.w)("$__allResults","*"),text:Object(S.w)("$__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),F.type.filter((function(e){return g.filter((function(t){return F.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(k.a,{title:Object(S.w)("".concat(e.label),"*"),text:Object(S.w)("".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 F.cards[t].type===e.value})).length))}))),a.a.createElement("div",{style:{width:"calc(100% - 177px)",padding:7,display:"flex",flexDirection:"column"}},a.a.createElement(Rr.a,null,F.type.filter((function(e){return"all"!==I&&e.value===I||"all"===I&&g.filter((function(t){return F.cards[t].type===e.value})).length>0})).map((function(t,r){return a.a.createElement("div",{key:"".concat(t,"-").concat(r)},a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)(t.label,1),icon:t.icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),g.filter((function(e){return F.cards[e].type===t.value})).sort((function(e,t){return F.cards[e].name<F.cards[t].name?-1:F.cards[e].name>F.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(Sn.a,{key:t,md:12,style:{minWidth:"300px"}},a.a.createElement(ut.a,{cardId:t,db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));function Id(){Id=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Td=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.timeline,n=t.functions.socket,o=l.a.getState().db,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(e.data),h=Object(m.a)(d,2),g=h[0],b=h[1],v=g.name.split("."),y=v[v.length-1],x=a.a.useState(!1),w=Object(m.a)(x,2),O=w[0],j=w[1],E=a.a.useState(v[0]),k=Object(m.a)(E,2),L=k[0],C=k[1],I=a.a.useRef(!0);a.a.useEffect((function(){return function(){I.current=!1}}),[]),"blob"===g.name&&(g.name="".concat(Object(S.w)("$__coverImage","*"),".jpg"),y="jpg");var T="attachment";l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(y.toLowerCase())>-1})).length>0&&(T=l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(y.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(g.file));var D=function(){var e=Object(f.a)(Id().mark((function e(t){return Id().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.emit("data",{module:"node",method:"put",action:"update"},Object(p.a)({_id:g._id},t),Object(f.a)(Id().mark((function e(){return Id().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b(Object(p.a)(Object(p.a)({},g),t)),j(!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)}}(),F=Object(p.a)({},o.cards[g.cardId]&&r[g.cardId]&&r[g.cardId][g.timelineId]?r[g.cardId][g.timelineId]:g.message);return F&&!F.message&&(F=Object(p.a)(Object(p.a)({},F),{},{message:Object(S.w)("$__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 T&&-1===T.indexOf("https")&&-1===T.indexOf("svg")?a.a.createElement(re.a,{icon:T,size:"33px"}):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:T,width:"100%",style:{width:"auto",height:"auto",maxHeight:"77%"},onError:function(e){return e.target.src=T}})),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)(g.name,e.searchText)),o.users[g.createdBy]&&a.a.createElement("div",{style:{position:"absolute",right:"10px",top:"7px",zIndex:"10"}},a.a.createElement(Jr.a,{max:7},a.a.createElement(Kt.a,{title:o.users[g.createdBy].displayName?o.users[g.createdBy].displayName:o.users[g.createdBy].name},a.a.createElement(Er,{alt:o.users[g.createdBy].displayName?o.users[g.createdBy].displayName:o.users[g.createdBy].name,src:"".concat(o.users[g.createdBy].image),style:{width:"15px",height:"15px"}},o.users[g.createdBy].name.substr(0,1)))))),e.showParent&&(g.timelineId||g.message)&&(o.cards[g.cardId]&&r[g.cardId]&&r[g.cardId][g.timelineId]||g.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(_r.a,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:F,db:"cards",nodeId:g.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&g.cardId&&o.cards[g.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(ut.a,{db:"cards",cardId:g.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(){j(!0)}},O?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(_e.a,{label:Object(S.w)("$__taskTitle"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){C(e.target.value)},onBlur:function(e){""===e.target.value&&j(!O)},onKeyDown:function(e){13===e.keyCode&&L&&D({name:"".concat(L,".").concat(y)}),27===e.keyCode&&(j(!O),C())}},autoFocus:!0,value:L,placeholder:Object(S.w)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return D({name:"".concat(L,".").concat(y)})}},a.a.createElement(re.a,{color:"green",icon:"save",title:Object(S.w)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){j(!O),C("")}},a.a.createElement(re.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.w)("$__cancel","*"),size:e.actionsSize||"25px"}))))):a.a.createElement("div",{style:{width:"100%"}},g.in&&g.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===g.in.db?a.a.createElement(Kt.a,{title:g.in.name},a.a.createElement(Er,{alt:g.in.name,src:g.in.image,style:{width:"15px",height:"15px"}},g.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(Or.a,{title:g.in.name,icon:"User"===g.in.db?null:g.in.type&&o&&o.dataType&&o.dataType.filter((function(e){return e.name===g.in.type}))[0]&&o.dataType.filter((function(e){return e.name===g.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:{position:"relative",float:"left",width:"33px",marginRight:"7px",alignItems:"center",height:"50px",display:"flex",justifyContent:"center"}},"string"===typeof T&&-1===T.indexOf("https")&&-1===T.indexOf("svg")?a.a.createElement(re.a,{icon:T,size:"33px"}):a.a.createElement("div",{style:{position:"absolute",width:"33px",height:"33px",margin:"7px",borderRadius:"50%",overflow:"hidden",backgroundImage:'url("'.concat(T,'")'),backgroundPosition:"center center",backgroundSize:"cover"}})),g.name),g.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(Er,{alt:g.createdBy.name,src:g.createdBy.image,style:{width:"15px",height:"15px"}},g.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},g.createdBy.name," - (",Object(S.k)(g.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*g.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"}},o.users[g.createdBy]&&a.a.createElement(Kt.a,{title:o.users[g.createdBy].name},a.a.createElement(a.a.Fragment,null,a.a.createElement(Er,{size:"sm",src:"".concat(o.users[g.createdBy].image)},o.users[g.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(Kt.a,{title:Object(S.w)("$__showFile")},a.a.createElement(re.a,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(g.timelineId||g.message)&&a.a.createElement(Kt.a,{title:Object(S.w)("$__viewMessage")},a.a.createElement(re.a,{size:"20px",onClick:function(){u(!s)}},"feedback")))))),(g.timelineId||g.message)&&s&&(o.cards[g.cardId]&&r[g.cardId]&&r[g.cardId][g.timelineId]||g.message)&&a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(_r.a,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:F,db:"cards",nodeId:g.cardId})))}));function Dd(){Dd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Fd=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Sd.a)((function(e){var t=a.a.useState(""),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState([]),g=Object(m.a)(d,2),b=g[0],v=g[1],y=l.a.getState().db.dataType,x=[],w=window.location.hash.split("/");w[0]=w[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return _()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var _=function(){var t=Object(f.a)(Dd().mark((function t(){var r,n;return Dd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Pe.a.get("/Files_Search/?text=".concat(e.text));case 2:(r=t.sent)&&r.data&&(n=Object(p.a)({},b),r.data.forEach((function(e){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.file._id,Object(p.a)(Object(p.a)(Object(p.a)({},n[e.file._id]||{}),e.file),{},{cardId:e.cardId||null,createdBy:e.createdBy||null,user:e.user,message:e.message,timelineId:e.timelineId})))})),e.onFinish&&e.onFinish(r.data.length),v(n),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(ct.a,null)),a.a.createElement(Rr.a,null,Object.keys(b).length>0&&a.a.createElement(Sn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.w)("$__files",1),icon:y.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(S.d)("menu"),filterText:e.text,style:{padding:"7px"}}),Object.keys(b).map((function(t,r){return x.push(b[t]),a.a.createElement(Sn.a,{key:t,md:12},a.a.createElement(Td,{data:b[t],searchText:e.text,resume:!0,showParent:!0,openLightBox:function(){var r;r=b[t]._id,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:x,file:r}),e.onAction&&e.onAction()}}))}))))))}))),Nd=r(1207),Ad=r.n(Nd),Pd=function(e){return{avatar:{width:"30px",height:"30px",backgroundSize:"cover",borderRadius:"50%"},component:{zIndex:"10",display:"flex",alignItems:"center",justifyContent:"center"},selectedName:{display:"inline-flex",cursor:"pointer"},selectedNameText:{textDecoration:"none",fontSize:"12px",fontFamily:"Soleto"}}};function $d(){$d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Md=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Ad()(Pd)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=l.a.getState().functions.socket,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],h=a.a.useRef(null),g=function(e){h.current&&h.current.contains(e.target)||d(!1)};function b(e){"Tab"===e.key&&(e.preventDefault(),d(!1))}var v=a.a.useRef(u);a.a.useEffect((function(){!0===v.current&&!1===u&&h.current.focus(),v.current=u}),[u]);var y=function(){var e=Object(f.a)($d().mark((function e(){return $d().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)}}(),x=e.classes,w={name:(null===n||void 0===n?void 0:n.name)||null,_id:(null===n||void 0===n?void 0:n._id)||null,image:(null===n||void 0===n?void 0:n.image)||null};return w&&w.name?a.a.createElement("div",{className:x.component},a.a.createElement("div",{className:x.selectedName,onClick:function(e){d((function(e){return!e}))}},a.a.createElement("div",{ref:h,className:x.selectedNameText,style:{color:Object(S.d)("light")||"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(ka.a,{title:a.a.createElement(a.a.Fragment,null,w.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"))}},w.image?a.a.createElement("div",{style:{display:"flex",width:"90%",height:"90%",backgroundImage:'url("'.concat(w.image,'")'),backgroundColro:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%"}}):a.a.createElement(re.a,{icon:"user",color:Object(S.d)("menu")})))))),a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(It.a,{open:u,anchorEl:h.current,role:void 0,transition:!0,disablePortal:!0},(function(t){var o=t.TransitionProps,i=t.placement;return a.a.createElement(Lt.a,Object.assign({},o,{style:{transformOrigin:"bottom"===i?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:g},a.a.createElement(Tt.a,{autoFocusItem:u,id:"menu-list-grow",onKeyDown:b},a.a.createElement(G.a,{onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(p.a)({type:"user"},r.users[n._id])}))}},Object(S.w)("$__myProfile",1)),a.a.createElement(G.a,{onClick:function(){c.a.push("profile")}},Object(S.w)("$__profileUser",1)),a.a.createElement(G.a,{onClick:function(){return y()}},Object(S.w)("$__logout",1))))))})))):null})));var Bd=Object(u.b)((function(e){return{controls:e.controls,chatNotifications:e.chat.notifications}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Sd.a)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=t.chat,i=a.a.useState(""),s=Object(m.a)(i,2),u=s[0],d=s[1],f=a.a.useState(0),h=Object(m.a)(f,2),g=h[0],b=h[1],v=a.a.useState(0),y=Object(m.a)(v,2),x=y[0],w=y[1],_=a.a.useState(!1),O=Object(m.a)(_,2),j=O[0],E=O[1],L=a.a.useState(!1),C=Object(m.a)(L,2),I=C[0],T=C[1],D=a.a.useState("asset"),F=Object(m.a)(D,2),P=F[0],$=F[1],M=Object(S.j)(),B=a.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),z=Object(m.a)(B,2),Y=z[0],G=z[1],H=a.a.useRef(null),W=window.location.hash.split("/");W[0]=W[0].replace("#",""),a.a.useEffect((function(){return U(),function(){}}),[e]);var U=function(){var e={};Ku.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=Ku.filter((function(e){return e.path===window.location.pathname}))[0]);var t=Object(S.w)("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&W[0]&&r.cards[W[0]]&&(t="".concat(Object(S.w)("$__".concat(e.alias),1),": ").concat(r.cards[W[0]].name)),e.tabs&&e.tabs.length>0&&e.tabs.filter((function(e){return e.path===W[1]})).length>0&&(a=Object(S.w)("$__".concat(e.tabs.filter((function(e){return e.path===W[1]}))[0].alias),1),n=e.tabs.filter((function(e){return e.path===W[1]}))[0].icon),G({title:t,icon:n,sTitle:a,sIcon:null})};return a.a.createElement("div",{style:{position:"absolute",top:"-4px",right:0,left:e.expanded?30:0,display:"flex",alignItems:"center",zIndex:"10 !important"},id:"top_"},a.a.createElement(Rr.a,null,a.a.createElement(Sn.a,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&a.a.createElement(rt.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},a.a.createElement(re.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"}},Y.sTitle?"".concat(Y.title," - ").concat("matrix"===Y.sTitle.toLowerCase()?"MATRIX SWOT":Y.sTitle):Y.title)),a.a.createElement(N.a,null,a.a.createElement(Sn.a,{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(_e.a,{ref:H,label:Object(S.w)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==u?a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"close",onClick:function(){d(""),E(!1),T(!1)}})):null,onChange:function(e){d(e.target.value),E(!0),T(!0)}},value:u,placeholder:Object(S.w)("$__searchInMachen")}),""!==u&&u.length>1&&a.a.createElement(R.a,{onClickAway:function(e){var t,r;(null===e||void 0===e||null===(t=e.target)||void 0===t||null===(r=t.className)||void 0===r?void 0:r.indexOf("ignoreClickAway"))>-1||H.current&&H.current.contains(e.target)||setTimeout((function(){d(""),E(!1),T(!1)}),100)}},a.a.createElement(It.a,{open:!!u,anchorEl:H.current,role:void 0,transition:!0,disablePortal:!0,style:{position:"absolute",zIndex:10,bottom:0,left:"5px",right:"5px",width:"100%",minWidth:"400px",maxWidth:"800px"}},(function(e){var t=e.TransitionProps;e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),a.a.createElement(Ct.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"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.w)("$__asset","*"),text:Object(S.w)("$__asset","*"),color:"asset"===P?Object(S.d)("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){$("asset"),E(!0),T(!0),b(0),w(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"completed"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.w)("$__completed","*"),text:Object(S.w)("$__completed","*"),color:"completed"===P?Object(S.d)("menu"):"lightGray",icon:"verified",onClick:function(){$("completed"),E(!0),T(!0),b(0),w(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"deleted"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.w)("$__deleted","*"),text:Object(S.w)("$__deleted","*"),color:"deleted"===P?Object(S.d)("menu"):"lightGray",icon:"delete_forever",onClick:function(){$("deleted"),E(!0),T(!0),b(0),w(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}))),"0"!==String(g)||"0"!==String(x)||j||I?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{textAlign:"center",fontSize:"16px",color:"red",marginTop:33,marginBottom:33}},Object(S.w)("$__noResultsFound")),u?a.a.createElement(a.a.Fragment,null,a.a.createElement(N.a,null,a.a.createElement(Cd,{text:u||"",onFinish:function(e){b(e),E(!1)},onAction:function(){d(""),E(!1),b(0),w(0)},completed:"completed"===P,deleted:"deleted"===P})),a.a.createElement(N.a,null,a.a.createElement(Fd,{text:u||"",onFinish:function(e){w(e),T(!1)},onAction:function(){d(""),b(0),w(0)}}))):a.a.createElement(a.a.Fragment,null))))})))))),a.a.createElement(Sn.a,{xs:5,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginBottom:"15px",marginTop:"15px"}},a.a.createElement("div",{id:"top_quickAdd"},a.a.createElement(N.a,null,a.a.createElement(jd,{hashs:W}))),a.a.createElement(N.a,null,a.a.createElement(od,null)),a.a.createElement("div",{id:"top_notifications"},a.a.createElement(N.a,null,a.a.createElement(dd,{loader:!(!e.loaders||!e.loaders.notifications)}))),a.a.createElement("div",{id:"top_timers"},a.a.createElement(N.a,null,a.a.createElement(kd,null))),a.a.createElement("div",{id:"top_requireApproval"},a.a.createElement(N.a,null,a.a.createElement(cd,null))),a.a.createElement("div",{id:"top_myDay"},a.a.createElement(N.a,null,a.a.createElement(id,null))),a.a.createElement("div",{id:"top_moreOptions"},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:Object.keys(l.a.getState().controls.unlockedPrivates).filter((function(e){return l.a.getState().controls.unlockedPrivates[e]})).length,color:"secondary"},a.a.createElement(V.a,{transparent:!0,count:50,size:"27px",icon:"settings",title:Object(S.w)("$__settings"),btColor:"lightgray",options:[].concat(Object(A.a)(M&&M.user&&(M.userAdmin||M.userModerate)?[{name:"$__usersAndContacts",icon:"account_box",onClick:function(){c.a.push("c#tab/users")}},{name:"$__customersCompaniesAndDivisions",icon:"business",onClick:function(){c.a.push("c#tab/units")}}]:[]),Object(A.a)(M&&M.user&&M.userAdmin&&M.plan&&M.planAdmin?[{name:"$__forms",icon:"ballot",onClick:function(){c.a.push("forms")}}]:[]),[{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(){c.a.push("plataformAdministrator")},show:"hover"}],Object(A.a)(l.a.getState().controls.hidePrivate?[]:[{name:Object(S.w)(l.a.getState().controls.lockPrivate?"$__lockMyPrivateActivities":"$__unlockMyPrivateActivities",1),icon:l.a.getState().controls.lockPrivate?"private_connectivity":"lock_open",color:l.a.getState().controls.lockPrivate?"lightgray":null,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{lockPrivate:!l.a.getState().controls.lockPrivate},l.a.getState().controls.lockPrivate?{}:{unlockedPrivates:{}}))},show:"hover"}]),[{name:Object(S.w)(l.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),icon:l.a.getState().chat.notifications?"notifications_active":"notifications_off",color:l.a.getState().chat.notifications?"green":"lightgray",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},o),{},{notifications:!l.a.getState().chat.notifications}))},show:"hover"}],Object(A.a)(Object.keys(l.a.getState().controls.unlockedPrivates).filter((function(e){return l.a.getState().controls.unlockedPrivates[e]})).length>0?[{name:Object(S.w)("$__lockMyPrivateActivities",1),icon:"private_connectivity",color:"red",count:Object.keys(l.a.getState().controls.unlockedPrivates).filter((function(e){return l.a.getState().controls.unlockedPrivates[e]})).length,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:Object.keys(l.a.getState().controls.unlockedPrivates).filter((function(e){return l.a.getState().controls.unlockedPrivates[e]})).length,lockPrivate:!1}))},show:"hover"}]:[]),Object(A.a)(l.a.getState().session&&l.a.getState().session._access&&l.a.getState().session._access.masterAdmin>0?[{name:Object(S.w)("$__accountSettings",1),icon:"settings_applications",color:"lightgray",onClick:function(){c.a.push("acc#tab/resume")},show:"hover"}]:[]))}))),a.a.createElement("div",{style:{width:"33px",height:"33px",marginLeft:"15px",backgroundColor:"#cccccc",minWidth:"33px",borderRadius:"50%"},id:"top_user"},a.a.createElement(Md,null)))))}))),zd=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:{display:"inherit",height:"37px",alignItems:"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"}}}},Yd=r(556);var Rd=Object(u.b)((function(e){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(T.b)(I,e)}))(Object(le.a)(zd)((function(e){var t=e.classes,r=e.store,n=r.chat,o=r.session,i=r.timeline,c=r.usersStatus,s=!!e.expanded,u=Object(S.j)(),d=Object(p.a)({},l.a.getState().db.users),f={};d=(d=Object.keys(d).filter((function(e){return e!==o._id&&"user"===d[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(p.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(A.a)(r),Object(A.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?(f=Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},t._id,Object(p.a)(Object(p.a)({},e.store.users[t._id]),{},{type:"user",_lastMessage:a[a.length-1]?a[a.length-1]:null,unReadedCount:r.filter((function(e){return e.user._id!==o._id&&"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 e.user._id!==o._id&&"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(l.a.getState().db.cards).filter((function(t){return"chatGroup"===l.a.getState().db.cards[t].type&&!l.a.getState().db.cards[t].deleted&&(l.a.getState().db.cards[t]._users&&l.a.getState().db.cards[t]._users[o._id]||!l.a.getState().db.cards[t].private&&e.store.adminView&&u&&(u.owner||u.admin))})).map((function(e){return l.a.getState().db.cards[e]}));m&&m.length>0&&m.filter((function(e){return!(!e._users||!e._users[o._id])})).forEach((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}))),f=e&&e._id&&t&&t.length>0&&i[e._id]&&i[e._id][t[0]]&&i[e._id][t[0]].created_at?Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e._id]),{},{type:"group",_lastMessage:i[e._id][t[0]]}))):Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e._id]),{},{type:"group"})))}));var g=Object.keys(f).filter((function(t){return(!l.a.getState().db.cards[t]||l.a.getState().db.cards[t]&&!l.a.getState().db.cards[t].deleted)&&(!e.find||""===e.find||e.find&&(f[t].name.toLowerCase().indexOf(e.find.toLowerCase())>-1||f[t]._parent&&l.a.getState().db.users[f[t]._parent]&&l.a.getState().db.users[f[t]._parent].name&&l.a.getState().db.users[f[t]._parent].name.toLowerCase().indexOf(e.find.toLowerCase())>-1))&&(s||!s&&f[t]&&f[t]._lastMessage)&&(!e.onLine||e.onLine&&c.users&&c.users[t])})).sort((function(e,t){var r=f[e]._lastMessage&&String(f[e]._lastMessage.created_at)?Math.ceil(f[e]._lastMessage.created_at):0,n=f[t]._lastMessage&&String(f[t]._lastMessage.created_at)?Math.ceil(f[t]._lastMessage.created_at):0;return s?f[e].name.toLowerCase()<f[t].name.toLowerCase()?-1:f[e].name.toLowerCase()>f[t].name.toLowerCase()?1:0:r>n?-1:r<n?1:0})).map((function(e,t){var r=f[e];return{_id:e,name:r.name,image:r.image||null,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(p.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(ka.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(J.a,{overlap:"rectangular",badgeContent:Object(Yd.a)(c._id),color:"secondary",style:{width:"37px",display:"flex",alignItems:"center"}},a.a.createElement(Fl.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement(at.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(J.a,{overlap:"rectangular",badgeContent:Object(Yd.a)(c._id),color:"secondary",style:{display:"flex",alignItems:"center",padding:0,width:"80%",marginTop:"16px"}},a.a.createElement(Fl.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:Object(p.a)(Object(p.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(Uo.a,{style:{width:"100%",height:"100%"}},(function(e){var t=e.height;e.width;return a.a.createElement(Wo.a,{height:t,itemCount:g.length,itemSize:55,width:s?295:58,itemData:g,style:{height:"100%"}},b)}))}))),Gd=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{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 Hd(){Hd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Wd=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().chat,r=a.a.useState("chats"),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(""),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],v=g[1],y=Object(Y.a)(Gd)(),x=window.location.hash.split("/");x[0]=x[0].replace("#",""),a.a.useEffect((function(){i("chats"),v(e.expanded)}),[e.expanded]);var w=function(){var r=Object(f.a)(Hd().mark((function r(n,a){var o;return Hd().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=l.a.getState().db.cards[n]?"cards":"users",d(""),l.a.getState().db[o]&&l.a.getState().db[o][n]&&!l.a.getState().db[o][n]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{db:a,nodeId:n,loading:"users"!==a})):e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{db:a,nodeId:n,loading:!1})),e.subMenuExpanded(!1),i("chats");case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:b?y.menuExpanded:y.menu,style:{paddingTop:5}},b&&("internalGroups"===o||"externalGroups"===o)&&a.a.createElement("div",{className:b?y.buttonColorExpanded:y.buttonColor,style:{marginTop:"-15px"}},a.a.createElement(Ce.a,{text:b?Object(S.w)("$__newGroup","*"):null,title:b?null:Object(S.w)("$__newGroup","*"),icon:"add_box",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))}})),a.a.createElement("div",{className:y.button,style:{display:"flex",height:"46px",marginBottom:"7px",width:"100%"}},b?a.a.createElement("div",{className:y.textField,style:{width:"100%"}},a.a.createElement(_e.a,{className:y.noLabelLight,label:Object(S.w)("$__search","*"),variant:"standard",autoFocus:!0,value:u,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("colorText")},"search")),onChange:function(e){d(e.target.value)}}})):a.a.createElement(Ce.a,{title:b?null:Object(S.w)("$__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:b?50:40,bottom:7,overflowY:"auto",overflowX:"hidden",left:b?7:0,paddingLeft:b?5:0,right:0,paddingTop:7}},a.a.createElement(Rd,{expanded:b,openChat:function(e){return w(e,"cards")},find:u,onLine:e.onLine}))))}));var Ud=Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState({}),n=Object(m.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.w)("$__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(l.a.getState().db.cards[e.nodeId]._users[t].name)n=l.a.getState().db.cards[e.nodeId]._users[t].name;else if(l.a.getState().db.cards[e.nodeId]._users[t].name){var o=l.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(Kt.a,{title:n,key:t},a.a.createElement(at.a,{style:{width:22,height:22,border:"none"},alt:n,src:l.a.getState().db.cards[e.nodeId]._users[t].image||null},n.substr(0,1)))})),a.a.createElement("span",{style:{marginLeft:7}},Object(S.w)("$__typing"),"...")):a.a.createElement(a.a.Fragment,null)})),qd=r(1208),Vd=r.n(qd),Jd=r(1209),Xd=r.n(Jd),Kd=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{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 Zd=Object(u.b)((function(e){return{usersStatus:e.usersStatus&&e.usersStatus?e.usersStatus:{}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState(e.usersStatus),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(!1),s=Object(m.a)(c,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(k.a,{id:"chat_menu",title:"".concat(Object(S.w)("$__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.w)("$__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}))}));function Qd(){Qd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ep=new Audio(Vd.a),tp=new Audio(Xd.a);var rp=Object(u.b)((function(e){var t=e.chat;return{nodeId:t.nodeId,chatOpen:t.open,notifications:t.notifications}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Kd)((function(e){var t=e.classes,r=e.nodeId,n=e.chatOpen,o=l.a.getState().functions.socket,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),g=Object(m.a)(d,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(m.a)(y,2),w=x[0],_=x[1],O=a.a.useRef(!0),j=a.a.useRef(!1);a.a.useEffect((function(){return O.current=!0,function(){O.current=!1}}),[]);var E=Object(S.j)();a.a.useEffect((function(){var t=function(){var t=Object(f.a)(Qd().mark((function t(){var r,n,i;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=l.a.getState(),n=r.session,o.on("timeline.COMMENT",function(){var t=Object(f.a)(Qd().mark((function t(r){var o,i,c,s,u;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"cards"===r.db&&r.comment.message.indexOf(n._id)>-1&&r.comment.user._id!==n._id&&tp.play(),"users"===r.db&&r.idRel===l.a.getState().session._id&&r.comment&&"comment"===r.comment.type&&r.comment.user&&r.comment.user._id&&!l.a.getState().db.users[r.comment.user._id]&&Object(ke.m)(e,r.comment.user._id),("users"===r.db||"users"!==r.db&&"comment"===r.comment.type&&l.a.getState().db.cards[r.idRel]&&"chatGroup"===l.a.getState().db.cards[r.idRel].type)&&(o=null,r.filesCount&&r.files&&r.files.length===r.filesCount&&(o=parseInt(r.comment.created_at)-30),r.comment.user._id!==l.a.getState().session._id&&L(o)),Object(Ar.h)(e,r),l.a.getState().chat.notifications&&(r.comment.idRel===l.a.getState().session._id||l.a.getState().db.users[r.comment.idRel]||l.a.getState().db.cards[r.comment.idRel]&&"chatGroup"===l.a.getState().db.cards[r.comment.idRel].type&&l.a.getState().db.cards[r.comment.idRel]._users[l.a.getState().session._id])&&l.a.getState().db.users[r.comment.user._id]&&"comment"===r.comment.type&&((null===r||void 0===r||null===(i=r.comment)||void 0===i||null===(c=i.user)||void 0===c?void 0:c._id)!==l.a.getState().session._id&&ep.play(),r.comment.nodeId=r.node,s=Object(p.a)(Object(p.a)({},r.comment),{},{nodeId:r.comment._parent,idRel:r.node}),r.comment.idRel!==l.a.getState().session._id||l.a.getState().chat.open||((u=new Notification("".concat(r.comment.user.name," ").concat(Object(S.w)("$__sendedANewMessage",1)),{body:r.comment.message?r.comment.message:Object(S.w)("$__".concat(r.comment.type),1)})).onclick=function(e){e.preventDefault(),window.focus(),u.close()},Object(S.c)({message:Object(S.w)("$__newMessage",1),content:a.a.createElement("div",{style:{display:"flex",cursor:"pointer",backgroundColor:"#none"},onClick:function(e){C(s.user._id,"users"),e.stopPropagation()}},a.a.createElement(_r.a,{storie:s,noReactions:!0,inverted:!0})),hideiconvariant:!0,variant:"info",persist:!1,horizontal:"right",confirm:null})));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),i={},o.on("timeline.TYPING",(function(e){i[e.typingUser]&&clearTimeout(i[e.typingUser]),i=Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e.typingUser,setTimeout((function(){}),3e3)))})),o.on("stream",(function(e){document.getElementById("#streamVideo")&&document.getElementById("#streamVideo").attr("src",e)})),o.on("timeline.DEL",(function(t){var r=l.a.getState().session,n=l.a.getState().timeline[t.idRel]&&l.a.getState().timeline[t.idRel][t.id]?t.idRel:r._id;l.a.getState().timeline&&l.a.getState().timeline[n]&&l.a.getState().timeline[n][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)(Object(p.a)({},l.a.getState().timeline),{},Object(h.a)({},n,Object(p.a)(Object(p.a)({},l.a.getState().timeline[n]),{},Object(h.a)({},t.id,Object(p.a)(Object(p.a)({},l.a.getState().timeline[n][t.id]),{},{deleted:!0},t.deletedReason?{deletedReason:t.deletedReason}:{}))))))}));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();!j.current&&o&&o.connected&&(j.current=!0,t())}),[o]);var L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},C=function(){var t=Object(f.a)(Qd().mark((function t(r,n){return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{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)}}();if(!n)return a.a.createElement(a.a.Fragment,null);var I=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||!l.a.getState()||!(l.a.getState().lightBox&&l.a.getState().lightBox.open||l.a.getState().sideModule&&l.a.getState().sideModule.id)){var r=document.getElementsByClassName("Toastify__toast").length,n=document.getElementsByClassName("forwardMessage").length;0===r&&0===n&&e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!1}))}};if(!n)return a.a.createElement(a.a.Fragment,null);var T=r&&l.a.getState().db.cards&&l.a.getState().db.cards[r]?"cards":"users",D=l.a.getState().db[T][r]?l.a.getState().db[T][r]: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(R.a,{onClickAway:function(){I()}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.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(k.a,{id:"chat_menu",title:Object(S.w)("$__menu","*"),color:Object(S.d)("colorText"),icon:"menu",onClick:function(){u((function(e){return!e})),s&&_(!1)},size:"25px",transparent:!0})),s?a.a.createElement("div",{style:{position:"absolute",left:45,color:Object(S.d)("colorText")}},a.a.createElement(k.a,{id:"addGroup",title:Object(S.w)("$__createChatGroup","*"),icon:"add_circle_outline",onClick:function(){I(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.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),s?a.a.createElement("div",{style:{position:"absolute",left:80}},a.a.createElement(Zd,{onClick:function(e){_(e)}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"absolute",left:s?320:53,right:80,color:Object(S.d)("colorText"),fontSize:"12px",fontWeight:"bold"}},r&&D?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Fl.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:r},a.a.createElement(at.a,{alt:D.displayName?D.displayName:D.name,src:D.image?"".concat(D.image):null,style:{width:"30px",height:"30px"}})),a.a.createElement("div",{style:{fontSize:"14px"}},D.name," ",a.a.createElement("span",{style:{fontSize:10,fontWeight:"normal"}},l.a.getState().usersStatus&&l.a.getState().usersStatus.users&&l.a.getState().usersStatus.users[r]&&"away"===l.a.getState().usersStatus.users[r].status&&l.a.getState().usersStatus.users[r].updatedAt?"(".concat(Object(S.w)("$__lastSeeTime"),": ").concat(Object(S.k)(l.a.getState().usersStatus.users[r].updatedAt),")"):"")),r&&l.a.getState().db.cards[r]&&"chatGroup"===l.a.getState().db.cards[r].type&&l.a.getState().db.cards[r]._users&&Object.keys(l.a.getState().db.cards[r]._users).length>0&&a.a.createElement("div",{classes:t.avatarGroup,style:{marginLeft:15}},a.a.createElement(Jr.a,{max:150},Object.keys(l.a.getState().db.cards[r]._users).length>0&&Object.keys(l.a.getState().db.cards[r]._users).filter((function(e,t){return t<18})).map((function(e,t){var n="";if(l.a.getState().db.cards[r]._users[e].name)n=l.a.getState().db.cards[r]._users[e].name;else if(l.a.getState().db.cards[r]._users[e].name){var o=l.a.getState().db.cards[r]._users[e].name.split(" ");n="".concat(o[0]).concat(o.length>1?" ".concat(o[o.length-1]):"")}if(t<17)return a.a.createElement(Kt.a,{title:n,key:t},a.a.createElement(at.a,{style:{width:22,height:22,border:"none"},alt:n,src:l.a.getState().db.cards[r]._users[e].image||null},n.substr(0,1)));if(17===t){var i=Object.keys(l.a.getState().db.cards[r]._users).length-17;return a.a.createElement(Kt.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(l.a.getState().db.cards[r]._users).filter((function(e,t){return t>16&&l.a.getState().db.cards[r]._users[e]&&l.a.getState().db.cards[r]._users[e].name})).map((function(e,t){return a.a.createElement("li",null,l.a.getState().db.cards[r]._users[e].name)}))),key:t},a.a.createElement(at.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(i)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}return a.a.createElement(a.a.Fragment,null)})))),a.a.createElement(Ud,{nodeId:r})):a.a.createElement("div",null,Object(S.w)("$__chats",1))),a.a.createElement("div",{style:{position:"absolute",right:5,display:"flex"}},r?a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{id:"chat_files",title:Object(S.w)("$__files","*"),color:Object(S.d)("colorText"),icon:"folder_special",onClick:function(){v((function(e){return!e}))},size:"25px",transparent:!0})):a.a.createElement(a.a.Fragment,null),a.a.createElement(k.a,{id:"chat_settings",title:Object(S.w)(l.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),color:Object(S.d)("colorText"),icon:l.a.getState().chat.notifications?"notifications_active":"notifications_off",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{notifications:!l.a.getState().chat.notifications}))},size:"25px",transparent:!0}),r&&l.a.getState().db.cards[r]&&"chatGroup"===l.a.getState().db.cards[r].type&&l.a.getState().db.cards[r]._users&&l.a.getState().db.cards[r]._users[l.a.getState().session._id]&&(parseInt(l.a.getState().db.cards[r]._users[l.a.getState().session._id].access)>4||E&&E.user&&E.plan&&E.userAdmin&&E.planAdmin)&&a.a.createElement(k.a,{id:"chat_settings",title:Object(S.w)("$__preffers","*"),color:Object(S.d)("colorText"),icon:"settings",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:r,activeModule:"cardEdit",db:"cards",data:Object(p.a)({},l.a.getState().db.cards[r]?l.a.getState().db.cards[r]:{})})),I(!0)},size:"25px",transparent:!0}),a.a.createElement(k.a,{id:"chat615_closeButton",title:Object(S.w)("$__close","*"),color:Object(S.d)("colorText"),icon:"close",onClick:function(){I(!0),_(!1)},size:"25px",transparent:!0}))),a.a.createElement("div",{style:Object(p.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"},s?{width:"311px"}:{width:"60px"})},a.a.createElement(Wd,{closeButton:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!1})),_(!1)},chat:!0,subMenuExpanded:function(e){u(e),_(!1)},expanded:s,onLine:w})),a.a.createElement("div",{style:{position:"absolute",left:s?312:55,top:40,right:b&&r?333:0,bottom:0,backgroundColor:"white"}},r?a.a.createElement(xe.a,{types:["comment"],nodeId:r,db:l.a.getState().db.cards[r]?"cards":"users",confirmRead:!0,hideCards:!0,chat:!0}):a.a.createElement(a.a.Fragment,null)),b&&r?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(Ir,{nodeId:r,dark:!1})):a.a.createElement(a.a.Fragment,null)))))}))),np=r(552),ap=r.n(np),op=function(e){var t;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:{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",cursor:"pointer"},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:(t={},Object(h.a)(t,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(h.a)(t,e.breakpoints.down("sm"),{left:"0  !important",right:"auto !important"}),t),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 ip(){ip=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(op)((function(e){var t=l.a.getState().chat,r=e.classes,n=a.a.useState(null),o=Object(m.a)(n,2),i=o[0],s=o[1],u=window.location.hash.split("/");u[0]=u[0].replace("#","");var d=function(){var r=Object(f.a)(ip().mark((function r(n,a,o){var l,u=arguments;return ip().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:l=u.length>3&&void 0!==u[3]?u[3]:"users",!n||window.location.pathname===n&&a!==i||c.a.push(n),"chat"===a?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!0,db:l,nodeId:o})):(s(a),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!1}))),e.menuExpand&&e.menuExpand();case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),h=Object(Ar.b)();return e.expanded?a.a.createElement("div",{className:r.root},a.a.createElement("div",{className:r.bar},a.a.createElement("div",{className:r.topLogo,id:"sideBar_logoMini"},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:ap.a,className:r.logoImg,style:{width:"111px",marginLeft:"15px"}}),a.a.createElement(k.a,{title:Object(S.w)("$__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:r.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/d","dashboard")}},a.a.createElement(re.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.w)("$__dashboard","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:t.open?r.itemButtomActive:r.itemButtom,onClick:function(){e.menuExpand&&e.menuExpand(),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!t.open}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:h&&h.total?h.total:0,color:"secondary"},a.a.createElement(re.a,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),Object(S.w)("$__chat","*"))),a.a.createElement("div",{className:r.separator}),a.a.createElement("div",{className:r.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/sp","StrategyAndPlans")}},a.a.createElement(re.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.w)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/t","myTasks")}},a.a.createElement(re.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.w)("$__mytasks","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/library","library")}},a.a.createElement(re.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.w)("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.w)("$__library","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_brightandconnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/bright-and-connected","bright-and-connected")}},a.a.createElement(re.a,{icon:La.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):a.a.createElement("div",{className:r.rootHide},a.a.createElement("div",{className:r.mainButton,id:"sideBar_logoMini"},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:ap.a,className:r.logoImg,style:{width:"111px",marginLeft:"15px"},onClick:function(){e.menuExpand()}}),a.a.createElement(k.a,{title:Object(S.w)("$__showMenu",1),color:Object(S.d)("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))})));function cp(){cp=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var lp=Object(u.b)((function(e){return{selectedCards:e.controls.selectedCards,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),o=r[0],i=r[1],c=a.a.useState({}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useState(!1),b=Object(m.a)(g,2),v=b[0],y=b[1],x=a.a.useState({}),w=Object(m.a)(x,2),_=(w[0],w[1]);if(a.a.useEffect((function(){return console.log(e.selectedCards),e.selectedCards?i(e.selectedCards):i({}),function(){i({})}}),[e.selectedCards]),Object(n.useEffect)((function(){console.log(l.a.getState().db.cards[u._id])}),[u]),"{}"===JSON.stringify(o)||!o)return a.a.createElement(a.a.Fragment,null);var O=function(e){switch(e){case"plan":return 0;case"guideline":return 1;case"objective":return 2;case"goal":return 3;case"iniciative":return 4;case"task":return 5;default:return 4}},j=function(){var t=Object(f.a)(cp().mark((function t(){var r,n,a;return cp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=["plan","guideline","objective","goal","iniciative","task"],n=cp().mark((function t(n){var a,i,c,s,d,m,g,b,v,x,w;return cp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=l.a.getState().db.cards[o[n]],t.prev=1,{},s={cardId:a._id,newRel:u._id,oldRel:a._parent,planId:(null===(i=l.a.getState().db.cards[u._id])||void 0===i?void 0:i._planId)?l.a.getState().db.cards[u._id]._planId:"plan"===(null===(c=l.a.getState().db.cards[u._id])||void 0===c?void 0:c.type)?u._id:null},!(d=Object(et.d)(e,s))||O(a.type)===O(u.type)+1){t.next=21;break}return b={},t.next=9,Object(et.s)(a._id);case 9:return v=t.sent,v=Object.keys(v)||[],x=O(u.type)+1-O(a.type),v.length>0&&(v=v.map(function(){var e=Object(f.a)(cp().mark((function e(t){var n,a;return cp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.a.getState().db.cards[t],a=r[O(n.type)+x],4===O(u.type)&&(a=r[4]),3===O(u.type)&&(a=r[4]),5===O(u.type)&&(a=r[5]),e.abrupt("return",{_id:t,type:a});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),console.log(l.a.getState().db.cards[u._id]),b=Object(h.a)({},a._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[a._id]),{},{_parent:u._id,_planId:(null===(m=l.a.getState().db.cards[u._id])||void 0===m?void 0:m._planId)?l.a.getState().db.cards[u._id]._planId:"plan"===(null===(g=l.a.getState().db.cards[u._id])||void 0===g?void 0:g.type)?u._id:null})),t.next=17,Promise.all(v);case 17:return w=t.sent,t.next=20,Object(et.P)(e,[{_id:a._id,type:r[O(u.type)+1]}].concat(Object(A.a)(w)));case 20:e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),b)}));case 21:d&&(!0,setTimeout(Object(f.a)(cp().mark((function t(){return cp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_({}),n===o.length-1&&(y(!1),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{selectedCards:null})));case 2:case"end":return t.stop()}}),t)}))),2e3)),t.next=27;break;case 24:t.prev=24,t.t0=t.catch(1),console.log("ERROR",t.t0);case 27:case"end":return t.stop()}}),t,null,[[1,24]])})),a=0;case 3:if(!(a<o.length)){t.next=8;break}return t.delegateYield(n(a),"t0",5);case 5:a++,t.next=3;break;case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(ji.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{selectedCards:null}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement(R.a,{onClickAway:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{selectedCards: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.w)("$__send")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(k.a,{id:"close_duplicate",title:Object(S.w)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{selectedCards:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},a.a.createElement(gr,{onSelect:function(e){console.log(e),d(e)},ignoreCards:o,ignoreTypes:["chatGroup"]}),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},v?a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:40}},a.a.createElement(be.a,null)):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(k.a,{title:Object(S.w)("$__cancel",1),text:Object(S.w)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{selectedCards:null}))},size:"12px",textSize:"12px"}),Object.keys(u).length>0&&a.a.createElement(k.a,{title:Object(S.w)("$__send",1),text:Object(S.w)("$__send",1),color:Object(S.d)("menu"),icon:"send",onClick:function(){y(!0),setTimeout((function(){j()}),200)},size:"12px",textSize:"12px"}))))))))}));var sp=Object(u.b)((function(e){return{card:e.card}}),(function(e){return Object(T.b)(I,e)}))((function(e){return console.log("AQUI PRECISA SER CRIADO O PAINEL DE MODELOS DE FLUXOS"),a.a.createElement(sl.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(Or.a,{title:Object(S.w)("$__".concat(e.card.action),1),icon:"label",onCancel:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)}))}})))})),up=r(874);function dp(){dp=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var pp=Object(u.b)((function(e){return{toCopyMove:e.controls.toCopyMove}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState((null===n||void 0===n?void 0:n.name)||""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState({}),g=Object(m.a)(d,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(m.a)(y,2),w=x[0],_=x[1],O=a.a.useState(!1),j=Object(m.a)(O,2),E=j[0],L=j[1],C=a.a.useState({}),I=Object(m.a)(C,2),T=I[0],D=I[1];if(a.a.useEffect((function(){return e.toCopyMove&&l.a.getState().db.cards[e.toCopyMove]?(o(l.a.getState().db.cards[e.toCopyMove]),u("".concat(l.a.getState().db.cards[e.toCopyMove].name," (").concat(Object(S.w)("$__copy","*"),")")||!1)):(o({}),u("")),function(){o({}),u("")}}),[e.toCopyMove]),"{}"===JSON.stringify(n)||!n)return a.a.createElement(a.a.Fragment,null);var F=function(){var t=Object(f.a)(dp().mark((function t(){var r,a;return dp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(!0),r={},Object.keys(n).forEach((function(e){-1===e.indexOf("_")&&"created_at"!==e&&"updated_at"!==e&&(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,n[e])))})),console.log(r),r=Object(p.a)(Object(p.a)(Object(p.a)({},n),r),{},{idRel:b&&b._id?b._id:n._parent?n._parent:null,name:s,status:"notStarted"}),console.log(r),Object.keys(r).forEach((function(e){0===e.indexOf("_")&&delete r[e],"string"!==typeof r[e]&&"boolean"!==typeof r[e]&&delete r[e]})),r._oldId=n._id,t.prev=8,t.next=11,Object(et.F)(e,!0,Object(p.a)(Object(p.a)({},r),{},{_oldId:n._id}),r.idRel);case 11:if(!(a=t.sent)||!a._id){t.next=17;break}return t.next=15,Object(et.i)(e,n._id,a._id,T);case 15:t.sent&&setTimeout(Object(f.a)(dp().mark((function t(){return dp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:a._id});case 2:return t.next=4,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:n._id});case 4:D({}),_(!1),L(!1),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}));case 8:case"end":return t.stop()}}),t)}))),1e3);case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(8),console.log("ERROR",t.t0);case 22:case"end":return t.stop()}}),t,null,[[8,19]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(ji.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement(R.a,{onClickAway:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.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.w)("$__duplicate")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(k.a,{id:"close_duplicate",title:Object(S.w)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},w?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(gr,{onSelect:function(e){v(e)},ignoreTypes:["chatGroup"]})):a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.w)("$__selectTarget",1),text:Object(S.w)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){_(!0)},size:"14px",textSize:"14px"})),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},a.a.createElement(a.a.Fragment,null,b&&b.type&&["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal"].indexOf(b.type)>-1&&(b.type.indexOf(n.type)>-1||n.type.indexOf(b.type)>-1)?a.a.createElement("div",{style:{color:"red",fontSize:12,marginBottom:15,textTransform:"uppercase",textAlign:"center"}},Object(S.w)("$__youAreDuplicating"),": ",Object(S.w)("$__".concat(b.type))," ",Object(S.w)("$__for"),": ",Object(S.w)("$__".concat(b.type)),".",Object(S.w)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null),a.a.createElement(_e.a,{label:Object(S.w)("$__copyAs",1),variant:Object(S.d)("fieldVariant"),name:"copyAs",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"clear",onClick:function(){u(n.name)}})),onChange:function(e){u(e.target.value)}},value:s,placeholder:Object(S.w)("$__copyAs_placeholder",1)}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.w)("$__options")),a.a.createElement("div",null,a.a.createElement(Te.a,{checked:!!T.copyUsers,onClick:function(e){D(Object(p.a)(Object(p.a)({},T),{},{copyUsers:!T.copyUsers}))},name:"copyUsers",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__copyUsersAccess")),a.a.createElement("div",null,a.a.createElement(Te.a,{checked:!!T.copyTimeline,onClick:function(e){D(Object(p.a)(Object(p.a)({},T),{},{copyTimeline:!T.copyTimeline}))},name:"copyTimeline",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__copyTimelineIfExists")),a.a.createElement("div",null,a.a.createElement(Te.a,{checked:!!T.copyTags,onClick:function(e){D(Object(p.a)(Object(p.a)({},T),{},{copyTags:!T.copyTags}))},name:"copyTags",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.w)("$__copyTagsIfExists")))),E?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(ct.a,null)):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(k.a,{title:Object(S.w)("$__cancel",1),text:Object(S.w)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))},size:"12px",textSize:"12px"}),a.a.createElement(k.a,{title:Object(S.w)("$__duplicateAllLinkedItems",1),text:Object(S.w)("$__duplicateAllLinkedItems",1),color:Object(S.d)("menu"),icon:"dynamic_feed",onClick:function(){F(!0)},size:"12px",textSize:"12px",transparent:!0}))))))))})),fp=r(1220);function hp(){hp=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var mp=Object(u.b)((function(e){return{addCard:e.controls.addCard}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),g=Object(m.a)(d,2),b=g[0],v=g[1],y=a.a.useState(null),x=Object(m.a)(y,2),w=x[0],O=x[1],j=a.a.useState([l.a.getState().session._id]),E=Object(m.a)(j,2),L=E[0],C=E[1],I=l.a.getState().db,T=a.a.createRef(),D=a.a.createRef(),F=a.a.useRef({}),N=a.a.createRef(),A=a.a.useRef({});a.a.useEffect((function(){return"{}"!==JSON.stringify(e.addCard)&&e.addCard._parent&&l.a.getState().db.cards[e.addCard._parent]?o(l.a.getState().db.cards[e.addCard._parent]):(o({}),v(!1),u(!1)),function(){o({}),v(!1),u(!1)}}),[e.addCard]);a.a.useEffect((function(){!function(){if(n.automationUsers&&"doNotChange"!==n.automationUsers&&"remove"!==n.automationUsers&&n._users&&Object.keys(n._users).length>0){var e=l.a.getState().db.users[l.a.getState().session._id]||{},t=Object(p.a)(Object(p.a)({},"add"===n.automationUsers?Object(h.a)({},e._id,{_id:e._id,name:e.name,image:e.image||null}):{}),n._users),r=[];Object.keys(t).sort((function(e,r){return t[e].isResponsible?-1:1})).filter((function(e){return e})).forEach((function(e,t){e&&-1===r.indexOf(e)&&r.push(e)})),JSON.stringify(r)!==JSON.stringify(L)&&C(r)}}()}),[n]);var P=function(){var t=Object(f.a)(hp().mark((function t(r){var a,o,i,c,s,u,d,f,h,m,g,b;return hp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(F&&F.current&&F.current.error)){t.next=3;break}return O(F.current.error),t.abrupt("return");case 3:(a=F.current||{}).error&&delete a.error,Object.keys(a).length>0&&(a.formId=n.form),v(!0),A&&(!A.current||A.current&&!A.current.loading)&&(A.current=Object(p.a)(Object(p.a)({},A.current),{},{loading:!0}),g=Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({name:T.current.value,_parent:n._id,myDay:!!(e.myDay||(null===(o=e.addCard)||void 0===o||null===(i=o.initialData)||void 0===i?void 0:i.myDay)||(null===(c=e.addCard)||void 0===c?void 0:c.myDay)),type:(null===(s=e.addCard)||void 0===s||null===(u=s.initialData)||void 0===u?void 0:u.type)||e.type||"task",status:e.status?e.status:"notStarted",users:L},a),r?{checklist:!0}:{}),D&&D.current&&D.current.value?{description:D.current.value}:{}),N&&N.current&&N.current.getValue()?{value:N.current.getValue()}:{}),(null===n||void 0===n?void 0:n.childrenAutoTag)&&(null===n||void 0===n?void 0:n._tags)&&(null===n||void 0===n?void 0:n._tags.length)>0?{_tags:n._tags}:{}),(null===n||void 0===n?void 0:n.setIcon)?{icon:null===n||void 0===n?void 0:n.setIcon}:{}),(null===(d=e.addCard)||void 0===d?void 0:d.initialData)||{}),n&&n.automationDueDateType&&"add"===n.automationDueDateType&&(g=Object(p.a)(Object(p.a)({},g),{},{startDate:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X"),endDate:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add((null===n||void 0===n?void 0:n.automationDueDate)||1,"days").unix("X")})),n&&n.automationStatusType&&"replace"===n.automationStatusType&&(g=Object(p.a)(Object(p.a)({},g),{},{status:n.automationStatus||(null===(f=e.addCard)||void 0===f||null===(h=f.initialData)||void 0===h?void 0:h.status)||"notStarted"},n.automationStatus&&"completed"===n.automationStatus?{completed_at:_()().unix("x")}:{})),(b=wd(g,(null===(m=e.addCard)||void 0===m?void 0:m.rows)||0,e))&&(F.current={},e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),b)})),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}})))),A.current=Object(p.a)(Object(p.a)({},A.current),{},{loading:!1});case 9: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(ji.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.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)("colorText")}},n.shortCutTitle?n.shortCutTitle:Object(S.w)("$__new")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5,display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"assistant_navigation",title:Object(S.w)("$__selectTarget","*"),color:Object(S.d)("colorText"),icon:"assistant_navigation",onClick:function(){u((function(e){return!e}))},size:"20px",transparent:!0}),a.a.createElement(k.a,{id:"close_addCard",title:Object(S.w)("$__close","*"),color:Object(S.d)("colorText"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},s?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(gr,{onSelect:function(e){o(l.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",{id:"addCard_321",style:{width:"calc(100% - 0px)",maxHeight:"70vh",overflowY:"auto"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3}},n.shortCutTitle?n.shortCutTitle:e.placeHolder?e.placeHolder:Object(S.w)(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(fp.a,{ref:T,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,o=t.which||t.keyCode;return 13!==o||t.shiftKey?13===o&&t.shiftKey&&T.current&&T.current.value&&0===T.current.value.trim().length?(t.preventDefault(),void(T.current.value="")):void(27===o&&e.onCancel&&e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))):(t.preventDefault(),void(T.current&&T.current.value&&T.current.value.trim().length>0&&P(!((!e.checklist&&!(null===(r=e.addCard)||void 0===r?void 0:r.checklist)||e.myDay)&&!(null===(n=e.addCard)||void 0===n||null===(a=n.initialData)||void 0===a?void 0:a.checklist)))))},autoFocus:!0}),n.requireDescription&&a.a.createElement(_e.a,{inputRef:D,label:Object(S.w)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"description",color:"lightgray"}))},placeholder:Object(S.w)("$__description",1)}),n&&("plan"===n.type||n._planId&&I.cards[n._planId]&&I.cards[n._planId].refs)?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.w)("$__references")),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{width:"46%"}},a.a.createElement(_e.a,{label:n._planId&&I.cards[n._planId]&&I.cards[n._planId].refs&&I.cards[n._planId].ref1||Object(S.w)("$__ref1Title",1),variant:Object(S.d)("fieldVariant"),name:"ref1Title",id:"edit_ref_1",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){F.current=Object(p.a)(Object(p.a)({},F.current),{},{ref1:e.target.value})}},placeholder:n._planId&&I.cards[n._planId]&&I.cards[n._planId].refs&&I.cards[n._planId].ref1||Object(S.w)("$__ref1Title_placeholder",1)})),a.a.createElement("div",{style:{width:"8%",textAlign:"center",justifyContent:"center",alignItems:"center",fontSize:"24px",display:"flex",color:Object(S.d)("menu")}},"|"),a.a.createElement("div",{style:{width:"46%"}},a.a.createElement(_e.a,{label:n._planId&&I.cards[n._planId]&&I.cards[n._planId].refs&&I.cards[n._planId].ref2||Object(S.w)("$__ref2Title",1),variant:Object(S.d)("fieldVariant"),name:"ref2Title",id:"edit_ref_2",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){F.current=Object(p.a)(Object(p.a)({},F.current),{},{ref2:e.target.value})}},placeholder:n._planId&&I.cards[n._planId]&&I.cards[n._planId].refs&&I.cards[n._planId].ref2||Object(S.w)("$__ref2Title_placeholder",1)})))):a.a.createElement(a.a.Fragment,null),n&&n.form&&l.a.getState().forms[n.form]?a.a.createElement("div",{style:Object(p.a)({},w?{border:"solid 1px red",padding:7}:{})},a.a.createElement(jt,{formId:n.form,boardId:n._parent,onLoad:function(e){},columnChange:function(e){e&&(F.current=Object(p.a)(Object(p.a)({},F.current),{},{_parent:e}))},onChange:function(e,t){F.current=Object(p.a)(Object(p.a)(Object(p.a)({},F.current),e),{},{error:t}),O(null)}}),w?a.a.createElement("span",{style:{color:"red"}},Object(S.w)(w)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),n.requireValue&&a.a.createElement(Ot,{label:Object(S.w)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:N,ref:N}),!n.showInPanel&&a.a.createElement(Ec.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:n,noLimit:!0,multiple:!0,onSelect:function(e){C(e)},selected:L,transparent:!0})),b?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(ct.a,null)):a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:33}},a.a.createElement(k.a,{id:"addModal_cancelButton",title:Object(S.w)("$__cancel",1),text:e.placeHolder||Object(S.w)("$__cancel",1),color:Object(S.d)("medium"),icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))},size:"25px"}),a.a.createElement("div",{id:"addCard_441"},a.a.createElement(k.a,{id:"sideModule_saveButton",title:n.shortCutButtonToAdd?n.shortCutButtonToAdd:e.placeHolder||Object(S.w)("$__save",1),text:n.shortCutButtonToAdd?n.shortCutButtonToAdd:e.placeHolder||Object(S.w)("$__save",1),color:"green",icon:"save",onClick:function(){var t,r,n;!T.current.value||T.current.value&&""===T.current.value.trim()?T.current.focus():P(!((!e.checklist&&!(null===(t=e.addCard)||void 0===t?void 0:t.checklist)||e.myDay)&&!(null===(r=e.addCard)||void 0===r||null===(n=r.initialData)||void 0===n?void 0:n.checklist)))},size:"25px"}))))))))):a.a.createElement(a.a.Fragment,null)})),gp=[{id:"top_user",tittle:"$__tour_step1_name",text:["$__tour_step1_line1","$__tour_step1_line2","$__tour_step1_line3"]},{id:"chatNotificationsBt",tittle:"$__tour_step2_name",text:["$__tour_step2_line1","$__tour_step2_line2","$__tour_step2_line3"]},{id:"sideBar_button_dashboard",tittle:"$__tour_step3_name",text:["$__tour_step3_line1","$__tour_step3_line2","$__tour_step3_line3"]},{id:"sideBar_button_brightAndConnected",tittle:"$__tour_step4_name",text:["$__tour_step4_line1","$__tour_step4_line2","$__tour_step4_line3"]},{id:"sideBar_button_myTasks",tittle:"$__tour_step5_name",text:["$__tour_step5_line1","$__tour_step5_line2","$__tour_step5_line3"]},{id:"sideBar_button_library",tittle:"$__tour_step6_name",text:["$__tour_step6_line1","$__tour_step6_line2","$__tour_step6_line3"]},{id:"sideBar_button_tags",tittle:"$__tour_step7_name",text:["$__tour_step7_line1","$__tour_step7_line2","$__tour_step7_line3"]},{id:"sideBar_button_calendar",tittle:"$__tour_step8_name",text:["$__tour_step8_line1","$__tour_step8_line2","$__tour_step8_line3"]},{id:"sideBar_button_StrategyAndPlans",tittle:"$__tour_step9_name",text:["$__tour_step9_line1","$__tour_step9_line2","$__tour_step9_line3"],show:!1,click:!0},{id:"QuickAddBt",tittle:"$__tour_step10_name",show:!1,click:!0},{id:"Plantype_67",tittle:"$__tour_step11_name",fake:!0,buttonId:"intro_45",handleClose:"getElements_40",click:!0,position:"left",margin:"-10px"},{id:"Plantype_672",tittle:"$__tour_step12_name",text:["$__tour_step12_line1","$__tour_step12_line2"],fake:!0,handleBack:"getElements_58",handleClose:"getElements_40",buttonId:"Plantype_110",click:!0,position:"left",scale:"0.9",margin:"-10px",change:!0,test:!0}],bp=[{id:"quick_388",tittle:"$__tour_step13_name",show:!1,click:!0,wait:!0,position:"left"},{id:"quick_417",tittle:"$__tour_step14_name",text:["$__tour_step14_line1","$__tour_step14_line2","$__tour_step14_line3"],click:!0,position:"right"},{id:"sideBar_subMenu_plan_overview",tittle:"$__tour_stepStrategic1_name",text:["$__tour_stepStrategic1_line1","$__tour_stepStrategic1_line2","$__tour_stepStrategic1_line3"],show:!1,click:!0,maskValue:5,position:"right"},{id:"Agilev2_Column_552",tittle:"$__tour_stepStrategic2_name",click:!0,show:!1,position:"top",margin:"0px 0px 50px 0px"},{id:"addCard_321",tittle:"$__tour_stepStrategic3_name",click:!0,input:!0,maskValue:5},{id:"addCard_441",tittle:"$__tour_stepStrategic4_name",click:!0,show:!1,maskValue:0,last:!0}],vp=[{id:"quick_388",tittle:"$__tour_step13_name",show:!1,click:!0,wait:!0,position:"left"},{id:"quick_417",tittle:"$__tour_step14_name",text:["$__tour_step14_line1","$__tour_step14_line2","$__tour_step14_line3"],click:!0,position:"right"},{id:"sideBar_subMenu_plan_board",tittle:"$__tour_stepFlux1",text:["$__tour_stepFlux_line1","$__tour_stepFlux_line2","$__tour_stepFlux_line3"],show:!1,click:!0},{id:"AgileKanbanIndex_256",tittle:"$__tour_stepFlux2",show:!1,click:!0},{id:"AgileKanbanIndex_282",tittle:"$__tour_stepFlux3",show:!1,click:!0},{id:"AgileKanbanColumn_304",tittle:"$__tour_stepFlux4",show:!1,click:!0},{id:"addCard_321",tittle:"$__tour_stepFlux5",click:!0,input:!0,maskValue:5},{id:"addCard_441",tittle:"$__tour_stepFlux6",click:!0,show:!1,maskValue:0,last:!0}],yp=r(1216),xp=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){return a.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"block",zIndex:9999}},a.a.createElement("div",{style:{backgroundColor:"#fff",position:"relative",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",margin:"15% auto",padding:"20px",border:"1px solid #888",width:"80%",TextAlign:"center",borderRadius:"5px",maxWidth:"400px"}},a.a.createElement("h2",{style:{display:"flex",fontSize:"23px",fontWeight:"bold",justifyContent:"center"}},Object(S.w)("$__tourTitleIntro")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement("p",{style:{width:"320px",fontWeight:"bolder",textAlign:"center",fontSize:"17px"}},Object(S.w)("$__endTourDesc"))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement("button",{onClick:function(){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{disabledTour:!0})),e.handleEnd()},style:{padding:"10px 20px",backgroundColor:"#2ea44f",color:"#fff",borderRadius:"5px",border:"none",marginTop:"30px",cursor:"pointer",boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"}},Object(S.w)("$__letsStart")))))})),wp=function(e){var t=e.handleStart,r=e.handleEnd,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)(!1),u=Object(m.a)(s,2),d=u[0],f=u[1],h={width:"90%",height:"50px",backgroundColor:Object(S.d)("menu"),color:Object(S.d)("color"),fontWeight:"bold",borderRadius:"5px",filter:c?"brightness(0.90)":"brightness(1)",marginRight:"10px",cursor:"pointer",border:"1px solid grey"},g=Object(p.a)(Object(p.a)({},h),{},{backgroundColor:"white",filter:d?"brightness(0.98)":"brightness(1)",color:"black"});return a.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"block",zIndex:9999}},a.a.createElement("div",{style:{backgroundColor:"#fff",position:"relative",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",margin:"10% auto",padding:"20px",border:"1px solid #888",width:"80%",TextAlign:"center",borderRadius:"5px",maxWidth:"400px"}},a.a.createElement("div",{style:{display:"flex",flexFlow:"column",alignItems:"center",marginBottom:"20px"}},a.a.createElement("h2",{style:{display:"flex",fontSize:"26px",fontWeight:"bold",justifyContent:"center"}}," ",Object(S.w)("$__tourTitleIntro")),a.a.createElement("p",{style:{width:"240px",fontWeight:"bolder",textAlign:"center",fontSize:"19px",marginBottom:"30px"}},Object(S.w)("$__tourIntro")),a.a.createElement("button",{onMouseEnter:function(){l(!0)},onMouseLeave:function(){l(!1)},onClick:t,style:h},Object(S.w)("$__letsStart")),a.a.createElement("div",{style:{width:"90%",borderBottom:"1px solid grey",display:"flex",justifyContent:"center",marginBottom:"25px",marginTop:"25px",position:"relative"}},a.a.createElement("span",{style:{top:"-10px",position:"absolute",backgroundColor:"white",paddingRight:"10px",paddingLeft:"10px"}}," ",Object(S.w)("$__or"))),a.a.createElement("button",{onMouseEnter:function(){f(!0)},onMouseLeave:function(){f(!1)},onClick:r,style:g},a.a.createElement("p",{style:{marginTop:"10px"}},Object(S.w)("$__skipTour","*"))))))},_p=(r(1873),function(){var e=l.a.getState().session,t=Object(n.useState)([]),r=Object(m.a)(t,2),o=r[0],i=r[1],c=Object(n.useState)(!0),s=Object(m.a)(c,2),u=s[0],d=s[1],f=Object(n.useState)([]),h=Object(m.a)(f,2),g=h[0],b=h[1],v=Object(n.useState)(0),y=Object(m.a)(v,2),x=y[0],w=y[1],_=Object(n.useState)(!1),O=Object(m.a)(_,2),j=O[0],E=O[1],k=Object(n.useState)(!0),L=Object(m.a)(k,2),C=L[0],I=L[1],T=Object(n.useState)(!0),D=Object(m.a)(T,2),F=D[0],N=D[1],A=Object(n.useState)(0),P=Object(m.a)(A,2),$=P[0],M=P[1],B=Object(n.useState)(!1),z=Object(m.a)(B,2),Y=z[0],R=z[1],G=Object(n.useState)(""),H=Object(m.a)(G,2),W=H[0],U=H[1],q=Object(n.useState)("mask"),V=Object(m.a)(q,2),J=V[0],X=V[1],K=a.a.useRef({});Object(n.useEffect)((function(){e.disabledTour&&-1===window.location.hostname.indexOf("a1b2c")&&(K.current={disabledTour:!0});var t=document.getElementById("sideBar_subMenu_plan_overview"),r=document.getElementById("sideBar_subMenu_plan_board");t?(i(bp),E(!0)):r?(i(vp),E(!0)):i(gp)}),[]);var Z=function(e){var t=e.text,r=e.children,n=e.tittle;return a.a.createElement("div",null,a.a.createElement("h1",{style:{fontWeight:"bolder",fontSize:"22px"}},Object(S.w)(n,1)),void 0!==t&&t.map((function(e,t){return a.a.createElement("div",{key:t},console.log(e,Object(S.w)(e)),a.a.createElement("h1",{style:{fontSize:"18px",display:"flex",fontWeight:"bolder",marginTop:"25px",color:"grey"}},Object(S.w)(e.trim(),1)),r)})))},Q=a.a.useCallback((function(){var e;!function(){var e=document.getElementById(o[x].id);e&&e.removeEventListener("click",Q),e&&e.removeEventListener("change",Q)}();var t=document.getElementById(null===(e=o[x+1])||void 0===e?void 0:e.id),r=o[x+1];if(t)te(r),w((function(e){return e+1}));else{if(x===o.length-1)return;setTimeout((function(){Q(x)}),300)}}),[x,o]),ee=function(){var e=setInterval((function(){var t=document.getElementById("sideBar_subMenu_plan_overview"),r=document.getElementById("sideBar_subMenu_plan_board");t?(w(0),i(bp),clearInterval(e)):r&&(w(0),i(vp),clearInterval(e))}),200)};function te(e){"undefined"!==typeof e.show||"undefined"!==typeof e.fake?d(!1):(d(!0),M(0)),"undefined"!==typeof e.maskValue&&M(e.maskValue),"undefined"!==typeof e.click&&N(!1)}Object(n.useEffect)((function(){K.current.disabledTour||o&&function e(){if(o.length>0){var t=document.getElementById(o[0].id);if(t&&0===x)te(o[x]),t.addEventListener("click",Q);else setTimeout((function(){e()}),300)}}()}),[o]),Object(n.useEffect)((function(){if(!K.current.disabledTour){if(0===x)return;if(x<o.length)document.getElementById(o[x].id)&&function(){if(o.length>0){var e,t=document.getElementById(o[x].id);if(void 0!==(null===(e=o[x])||void 0===e?void 0:e.input))t.addEventListener("change",Q);else{var r,n,a,i,c,l;if(void 0!==(null===(r=o[x])||void 0===r?void 0:r.show))t.addEventListener("click",Q);else if(void 0!==(null===(n=o[x])||void 0===n?void 0:n.fake)){var s=document.getElementById(o[x].buttonId);s&&s.addEventListener("click",Q)}else t.addEventListener("click",Q);if(void 0!==(null===(a=o[x])||void 0===a?void 0:a.last)&&t.addEventListener("click",(function(){return re(!0)})),void 0!==(null===(i=o[x])||void 0===i?void 0:i.change)){var u=document.getElementById(o[x].buttonId);u&&u.addEventListener("click",ee),u&&u.addEventListener("click",X("maskHide"))}if(void 0!==(null===(c=o[x])||void 0===c?void 0:c.handleClose)){var d=document.getElementById(o[x].handleClose);d&&d.addEventListener("click",(function(){return re()}))}if(void 0!==(null===(l=o[x])||void 0===l?void 0:l.handleBack)){var p=document.getElementById(o[x].handleBack);p&&p.addEventListener("click",(function(){return re()}))}}}}()}}),[x]);var re=function(e){I(!1),e&&R(!0),Fe.a.post("/user/preffers",{disabledTour:!0})};return Object(n.useEffect)((function(){if(!K.current.disabledTour){var e;if(0===x&&"quick_388"===(null===(e=o[x])||void 0===e?void 0:e.id))var t=setInterval((function(){var e=document.getElementById("loadBar"),r=setInterval((function(){document.contains(e)||(clearInterval(r),setTimeout((function(){X("mask"),U("upd")}),900))}),100);clearInterval(t)}),1e3);o&&b(function(e,t,r){var n={padding:"10px 20px",boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px",backgroundColor:Object(S.d)("menu"),color:Object(S.d)("color"),borderRadius:"5px",border:"none",marginRight:"10px",cursor:"pointer",position:"absolute",right:"20px",bottom:"20px"},o=Object(p.a)(Object(p.a)({},n),{},{boxShadow:"none",backgroundColor:"transparent",color:"black",border:"none",right:"none",bottom:"7px",left:"10px"});return e.map((function(e){var i=e.text,c=e.id,l=e.tittle,s=e.margin,u=e.position;e.scale;return{selector:"#"+c,content:a.a.createElement(a.a.Fragment,null,0===r&&"maskHide"===J?null:a.a.createElement(a.a.Fragment,null,a.a.createElement(Z,{text:Object(S.w)(i),tittle:l}),a.a.createElement("div",{style:{paddingTop:i?"50px":"25px"}},t&&a.a.createElement("button",{id:"Tour_173",onClick:function(){return Q()},style:n},"  ",Object(S.w)("$__next")," "),a.a.createElement("button",{onClick:function(){return re()},style:o},a.a.createElement("p",{style:{borderBottom:"1px solid black",marginTop:"20px"}},Object(S.w)("$__skipTour","*")))))),style:{fontSize:"12px",fontWeight:"bolder",borderRadius:"5px",color:"#333",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",fontFamily:"Helvetica, Arial, sans-serif",margin:s||"10px",display:0===r&&"maskHide"===J||window.innerWidth<1480&&11===r?"none":"block"},position:u||"bottom"}}))}(o,u,x))}}),[o,u,x,J]),K.current.disabledTour?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,j?a.a.createElement(yp.a,{maskClassName:J,disableFocusLock:!0,rounded:5,update:W,disableDotsNavigation:!0,showNavigation:!1,showNumber:!1,disableInteraction:F,closeWithMask:!1,goToStep:x,steps:g,isOpen:C,showButtons:!1,maskSpace:$,onRequestClose:function(){return re()}}):a.a.createElement(wp,{handleEnd:function(){E(!0),re()},handleStart:function(){return E(!0)}}),Y&&a.a.createElement(xp,{handleEnd:function(){re(),R(!1)}}))});function Op(){Op=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var jp=function(){var e=Object(f.a)(Op().mark((function e(t,r){var n,a,o;return Op().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=l.a.getState(),a=n.db,o="cards",a.cards[r._id]?o="cards":a.users[r._id]&&(o="users"),l.a.getState().db&&l.a.getState().db[o]&&l.a.getState().db[o][r._id]&&t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},Object(h.a)({},o,Object(p.a)(Object(p.a)({},l.a.getState().db[o]),{},Object(h.a)({},r._id,Object(p.a)(Object(p.a)({},l.a.getState().db[o][r._id]),r))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ep=r(1217),kp=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(p.a)(Object(p.a)({},Z.f),{},{height:"-webkit-fill-available",overflowY:"auto"}),map:{marginTop:"0px"},mainPanelSidebarMini:Object(h.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},Sp=function(){return{wrapper:{height:"auto",minHeight:"100vh",position:"relative",top:"0"},fullPage:{position:"relative",minHeight:"100vh",display:"flex !important",margin:"0",border:"0",color:Z.I,alignItems:"center",backgroundSize:"cover",backgroundPosition:"center center",height:"100%",overflow:"auto","& footer":{position:"absolute",bottom:"0",width:"100%",border:"none !important"},"&:before":{backgroundColor:"rgba("+Object(Z.q)(Z.b)+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}};r(1874),r(1875);var Lp,Cp=Object(u.b)((function(e){return{usersStatus:e.usersStatus.users,chat:e.chat,socket:e.functions.socket}}),(function(e){return Object(T.b)(I,e)}))((function(e){return a.a.createElement(a.a.Fragment,null)})),Ip=r(2020),Tp=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:Z.p[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(p.a)(Object(p.a)({},Z.e),{},{minHeight:"50px"}),flex:{flex:1},title:Object(p.a)(Object(p.a)({},Z.k),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:Z.I,letterSpacing:"unset","&:hover,&:focus":{background:"transparent",color:Z.I}}),appResponsive:{top:"8px"},primary:Object(p.a)({backgroundColor:Z.w[0],color:Z.I},Z.j),info:Object(p.a)({backgroundColor:Z.s[0],color:Z.I},Z.j),success:Object(p.a)({backgroundColor:Z.B[0],color:Z.I},Z.j),warning:Object(p.a)({backgroundColor:Z.H[0],color:Z.I},Z.j),danger:Object(p.a)({backgroundColor:Z.i[0],color:Z.I},Z.j),list:Object(p.a)(Object(p.a)({},Z.k),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:Z.I,paddingTop:"0",paddingBottom:"0"}),listItem:Object(h.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:Z.I,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:Z.I,background:"rgba("+Object(Z.q)(Z.p[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(Z.q)(Z.I)+", 0.1)"},drawerPaper:Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({border:"none",bottom:"0",transitionProperty:"top, bottom, width",transitionDuration:".2s, .2s, .35s",transitionTimingFunction:"linear, linear, ease"},Z.c),{},{width:Z.l},Z.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"},Z.D),{},{"&:before,&:after":{position:"absolute",zIndex:"3",width:"100%",height:"100%",content:'""',display:"block",top:"0"},"&:after":{background:Z.b,opacity:".8"}}),sidebarButton:{"&,&:hover,&:focus":{color:Z.I},top:"-2px"}}},Dp=Object(Y.a)(Tp);function Fp(e){var t=Dp(),r=e.color,n=x()(Object(h.a)({}," "+t[r],r));return a.a.createElement(Yn.a,{position:"static",className:t.appBar+n},a.a.createElement(Ip.a,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},a.a.createElement("div",{style:{maxWidth:"222px"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Object(S.d)("customLogo"),style:{width:"100%"}})))))}function Np(){Np=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var Ap=Object(j.b)(O.a)(Lp||(Lp=Object(d.a)(["\n&&&.Toastify__toast-container {\n  min-width:407px !important;\n  z-index:333333 !important;\n}\n.Toastify__toast {\n  z-index::333333 !important;\n  }\n.Toastify__toast-body {\n  z-index::333333 !important;\n  }\n.Toastify__progress-bar { }\n"]))),Pp=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=Object.assign({},(Object(g.a)(e),e)),n=l.a.getState().session,o=a.a.useState({}),i=Object(m.a)(o,2),u=i[0],d=i[1],b=a.a.useState(!1),y=Object(m.a)(b,2),w=y[0],O=y[1],j=a.a.useState(!1),k=Object(m.a)(j,2),L=k[0],I=k[1],T=a.a.useState(!0),D=Object(m.a)(T,2),A=D[0],P=D[1],$=a.a.useState(!1),M=Object(m.a)($,2),B=M[0],z=M[1],R=a.a.useState(!0),G=Object(m.a)(R,2),H=G[0],W=G[1],U=a.a.useState(!1),q=Object(m.a)(U,2),V=q[0],J=q[1],K=Object(Y.a)(w?kp:Sp),Z=a.a.useRef({}),Q=K(),ee=a.a.createRef(),ne=Q.mainPanel+" "+x()((t={},Object(h.a)(t,Q.mainPanelSidebarMini,!0),Object(h.a)(t,Q.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),ae=a.a.createRef(),oe=a.a.createRef();a.a.useEffect((function(){oe.current={offline:!1};var t=function(){var t=Object(f.a)(Np().mark((function t(r){var a;return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("WHITELABEL:::",r),t.next=3,Pe.a.post("/WhiteLabel",{url:r});case 3:(a=t.sent)&&((null===a||void 0===a?void 0:a.data)&&(d(a.data),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},n),{},{custom:Object(p.a)(Object(p.a)({},n.custom),a.data)}))),se());case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=window.location.hostname;(r=r.replace(".machen.ai",""))&&-1===r.indexOf("software")&&-1===r.indexOf("hom2022")&&-1===r.indexOf("localhost")?t(r):se()}),[]),a.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)})),fe(t)})),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),w&&(fe(e),de(),ie(!0))}),[w]);var ie=function(){var e=Object(f.a)(Np().mark((function e(t){var r,n,a,o;return Np().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:oe.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(){se(!0)}),36e4),window.addEventListener("blur",(function(){clearInterval(n),clearInterval(o),n=0,r=_()().tz("America/Sao_Paulo").unix("X"),a=setTimeout((function(){le("away")}),6e4)})),window.addEventListener("focus",function(){var e=Object(f.a)(Np().mark((function e(t){var i;return Np().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(null===oe||void 0===oe||null===(i=oe.current)||void 0===i?void 0:i.offline)||(se(!0),clearInterval(o),o=setInterval((function(){se(!0)}),36e4),clearTimeout(a),n||(n=setInterval((function(){1}),1e3)),le("online"),r&&_()().tz("America/Sao_Paulo").unix("X")-r>30&&ce());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)}}(),ce=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},le=function(){var e=Object(f.a)(Np().mark((function e(t){return Np().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:("online"===t&&l.a.getState().usersStatus.users&&l.a.getState().usersStatus.users[n._id]&&"online"!==l.a.getState().usersStatus.users[n._id].status||"away"===t&&l.a.getState().usersStatus.users&&l.a.getState().usersStatus.users[n._id]&&"away"!==l.a.getState().usersStatus.users[n._id].status)&&l.a.getState().functions.socket.emit("socketStatus",{socketStatus:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=function(){var t=Object(f.a)(Np().mark((function t(r){var a,o,i,s,d,f,m,g,b,v,y,x,_,j,E,k,S,L,C,I,T,D,F,N,$,M=arguments;return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=M.length>1&&void 0!==M[1]?M[1]:0,!oe.current||oe.current.offline){t.next=75;break}if(r){t.next=50;break}return t.prev=3,t.next=6,Pe.a.post("/VerifySession");case 6:return o=t.sent,i=o&&o.data&&o.data.user&&o.data.user.language?{locale:o.data.user.language}:{all:!0},"#tab/languages"===window.location.hash&&(i={all:!0}),t.next=11,Pe.a.post("/M_Languages_V3",i);case 11:if(!(s=t.sent)){t.next=42;break}return t.next=15,new Promise((function(e,t){var r={};s.data.forEach((function(t,n){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},t.alias.name.toLowerCase(),{alias:t.alias.name.toLowerCase(),locales:t.locales})),n+1===s.data.length&&e(r)}))}));case 15:if(d=t.sent,!(o&&o.data&&o.data.token)){t.next=40;break}if(localStorage.setItem("TOKEN",o.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},o.data.user),(null===o||void 0===o||null===(f=o.data)||void 0===f||null===(m=f.user)||void 0===m||null===(g=m.GlobalData)||void 0===g?void 0:g.custom)?{custom:Object(p.a)(Object(p.a)(Object(p.a)({},n.custom),JSON.parse(null===o||void 0===o||null===(b=o.data)||void 0===b||null===(v=b.user)||void 0===v||null===(y=v.GlobalData)||void 0===y?void 0:y.custom)),{},{custom:null===o||void 0===o||null===(x=o.data)||void 0===x||null===(_=x.user)||void 0===_||null===(j=_.GlobalData)||void 0===j?void 0:j.custom},u)}:{})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{users:Object(p.a)({},o.data.users?o.data.users:{})})),!d||!o){t.next=36;break}if(e.reduxFunction("ASYNC","SET_LANGUAGE",Object(p.a)({},d)),(!w||w&&JSON.stringify(w)!==JSON.stringify(o.data.user))&&JSON.stringify(w)!==JSON.stringify(o.data.user)&&O(Object(p.a)({},o.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!==Ku.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||c.a.push("/d#tab/resume"),be(),ue(),t.abrupt("return",!0);case 36:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(p.a)({},d)),O(!1);case 38:t.next=42;break;case 40:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(p.a)({},d)),A&&P(!1);case 42:t.next=48;break;case 44:t.prev=44,t.t0=t.catch(3),console.log(t.t0),5===a?(z(!0),w&&O(!1),A&&P(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):se(r,a+1);case 48:t.next=73;break;case 50:return t.prev=50,t.next=53,Pe.a.post("/VerifySession",{ignoreUsers:!0});case 53:if(E=t.sent,k=l.a.getState().session,!(E&&E.data&&E.data.token)){t.next=65;break}if(localStorage.setItem("TOKEN",E.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},E.data.user),(null===E||void 0===E||null===(S=E.data)||void 0===S||null===(L=S.user)||void 0===L||null===(C=L.GlobalData)||void 0===C?void 0:C.custom)?{custom:Object(p.a)(Object(p.a)(Object(p.a)({},n.custom),JSON.parse(null===E||void 0===E||null===(I=E.data)||void 0===I||null===(T=I.user)||void 0===T||null===(D=T.GlobalData)||void 0===D?void 0:D.custom)),{},{custom:null===E||void 0===E||null===(F=E.data)||void 0===F||null===(N=F.user)||void 0===N||null===($=N.GlobalData)||void 0===$?void 0:$.custom},u)}:{})),l.a.getState().functions.socket.emit("socketStatus",{socketStatus:"online"}),!(E.data&&k&&k._id&&E.data.user&&k._id!==E.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),a>5?(localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300)):setTimeout((function(){se(r,a+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)}}(),ue=function(){var t=Object(f.a)(Np().mark((function t(){var r,n;return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(ke.n)(e),t.prev=1,t.next=4,Pe.a.get("/Tags_List");case 4:(r=t.sent)&&r.data&&(r.data.forEach((function(e){e._count=parseInt(e._count),e._countOthers=parseInt(e._countOthers)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.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,Pe.a.get("/M_User_Group_List");case 16:(n=t.sent)&&n.data&&e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.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)}}(),de=function(){var t=Object(f.a)(Np().mark((function t(){return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(e,{cardLoad:"chat"});case 2:return t.next=4,Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",ini:!0,limit:1});case 4:return t.next=6,Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.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)}}(),fe=function(){var t=Object(f.a)(Np().mark((function t(r){var n,a,o=arguments;return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.length>1&&void 0!==o[1]&&o[1],!(w&&"/"!==window.location.pathname&&"/login"!==window.location.pathname&&e&&e.reduxFunction)){t.next=34;break}if(!Z||!Z.current||Z.current.initialLoader){t.next=26;break}return Z.current={initialLoader:!0},t.next=6,Pe.a.post("/Forms_List");case 6:return(n=t.sent)&&n.data&&n.data.length>0&&(a={},n.data.filter((function(e){return e.data._id})).forEach((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e.data._id,Object(p.a)({},e.data)))})),e.reduxFunction("ASYNC","SET_FORMS",Object(p.a)({},a))),t.next=10,Object(Rt.b)(e,{cardLoad:"notifications"});case 10:return t.next=12,Object(Rt.b)(e,{cardLoad:"myDay"});case 12:return t.next=14,Object(Rt.b)(e,{cardLoad:"favorites"});case 14:return t.next=16,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"plans"});case 16:return t.next=18,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"chat",ignoreLoader:!0});case 18:return t.next=20,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"steps"});case 20:return t.next=22,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"approval",ignoreLoader:!0});case 22:return t.next=24,Object(Rt.b)(e,{cardLoad:"links",limit:9,skip:0});case 24:return t.next=26,Object(Rt.b)(e,{cardLoad:"insights",limit:9,skip:0});case 26:return t.next=28,Object(Rt.c)(e);case 28:if(!t.sent){t.next=32;break}return P(!1),t.abrupt("return",!0);case 32:t.next=35;break;case 34:return t.abrupt("return",!0);case 35:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ge=function(){},be=function(){var t=Object(f.a)(Np().mark((function t(){var r;return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ep.a)("https://ws.machen.ai",{transports:["websocket","polling"],auth:{token:localStorage.getItem("TOKEN")}});case 2:return(r=t.sent)&&(xe(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)}}(),ve=function(){var e=Object(f.a)(Np().mark((function e(t){return Np().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(p.a)({},t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ye=function(){var t=Object(f.a)(Np().mark((function t(r){return Np().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)}}(),xe=function(t){t.on("global",(function(e){"version"===e.fn&&Object(S.c)({message:Object(S.w)("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&ye(),"reload"===e.fn&&window.location.reload()})),t.on("SWOT.UPD",(function(t){Object(et.l)(Object(p.a)(Object(p.a)({},e),{},{store:l.a.getState(),_sessionId:n._id}),t)})),t.on("copy.LOAD",(function(t){Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:t._id})})),t.on("card.ADD",(function(t){t._id&&Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),t.on("card.UPD",(function(t){Object(et.k)(e,t)})),t.on("card.MYDAY",(function(t){Object(et.z)(e,t)})),t.on("card.TIMER",(function(t){console.log(t),t&&t.type&&"stop"===t.type&&(console.log("card.TIMER",t),Object(et.m)(e,t))})),t.on("card.UPDATE",(function(t){Object(et.n)(e,t)})),t.on("card.ACCESS_UPD",function(){var t=Object(f.a)(Np().mark((function t(r){return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(et.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(et.a)(e,t)})),t.on("card.ACCESS_REMOVE",(function(t){Object(et.b)(e,t)})),t.on("card.REORDER",(function(t){Object(et.C)(e,t)})),t.on("card.DELETE",(function(t){Object(et.o)(e,t,!0)})),t.on("card.unlinkChildrens",(function(t){Object(et.K)(e,t)})),t.on("kanban.REORDER",(function(t){Object(lt.e)(e,t)})),t.on("unlinkChildrens",(function(t){Object(et.K)(e,t)})),t.on("card.changeParentId",(function(t){var r=l.a.getState().sessionLoads.cards.load,n=v()("".concat(JSON.stringify({idRel:t.planId,cardLoad:"plan"}))).toString();Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.planId,force:!0}),Object.keys(r).length>0&&!r[n]&&Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.planId,force:!0}),Object(et.f)(e,t)})),t.on("node.UPDATE",(function(t){jp(e,t)})),t.on("column.UPD",(function(t){Object(et.Q)(e,t)})),t.on("column.DELETE",(function(t){Object(et.p)(e,t)})),t.on("column.REORDER",(function(t){Object(et.D)(e,t)})),t.on("column.CARDS",(function(t){Object(et.g)(e,t)})),t.on("user.UPD",(function(t){Object(ke.c)(e,t)})),t.on("user.CONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(p.a)(Object(p.a)({},l.a.getState().usersStatus.users),{},Object(h.a)({},t.user,Object(p.a)(Object(p.a)({},t),{},{status:t.status,updatedAt:t.updatedAt})))})})),t.on("user.DISCONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(p.a)(Object(p.a)({},l.a.getState().usersStatus.users),{},Object(h.a)({},t.user,null))})})),t.on("users.STATUS",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",Object(p.a)(Object(p.a)({},l.a.getState().usersStatus),{},{users:Object(p.a)({},t.users)}))})),t.on("user.ACCESS",(function(t){Object(ke.c)(e,t)})),t.on("userGroup.UPD",(function(t){Xl(e,t)})),t.on("feed.ADD",(function(t){!function(e,t){var r=Object(h.a)({},t._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.feeds&&l.a.getState().db.feeds[t._id]&&l.a.getState().db.feeds[t._id].feed?{feed:l.a.getState().db.feeds[t._id].feed}:{}),t.data),{},{_parent:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds&&l.a.getState().db.feeds[t._id]&&l.a.getState().db.feeds[t._id]._parent?l.a.getState().db.feeds[t._id]._parent:{}),{},Object(h.a)({},t._parent,Object(p.a)({},t.rel)))}));e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{feeds:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds),r)}))}(e,t)})),t.on("language.UPD",(function(t){Object(S.n)(e,t)})),t.on("tag.UPD",(function(t){Xl(e,t)})),t.on("tag.DEL",(function(t){Zl(e,t,!0)})),t.on("tag.UNLINK",(function(t){ts(e,t,!0)})),t.on("logout",(function(e){e.user===l.a.getState().session._id&&ye()})),t.on("notifications.ADD",function(){var t=Object(f.a)(Np().mark((function t(r){return Np().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.a.getState().session._id===r.userId&&r.notify&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(p.a)(Object(p.a)({},l.a.getState().notifications),{},Object(h.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(p.a)(Object(p.a)({},l.a.getState().db),{},{users:Object(p.a)(Object(p.a)({},l.a.getState().db.users),{},Object(h.a)({},t.user,Object(p.a)(Object(p.a)({},l.a.getState().db.users[t.user]),{},{chatStatus:t.status})))}))})),t.on("chat.READED",(function(t){(l.a.getState().db.cards[t.id]||l.a.getState().db.users[t.id]||l.a.getState().db.users[t.readedBy])&&Object(Ar.a)(e,t)})),t.on("chat.INTERACT",(function(t){Object(Ar.e)(e,t),l.a.getState().db.cards[t.id]||l.a.getState().db.users[t.id]||l.a.getState().db.users[t.readedBy]}));var r=setTimeout((function(){}),5e3);t.on("disconnect",(function(){oe.current={offline:!0},r=setTimeout((function(){I(!0)}),5e3)})),t.on("connect",(function(){var e;setTimeout((function(){t.emit("data",{module:"user",method:"post",action:"logout"},{notThis:!0})}),2e3),(null===oe||void 0===oe||null===(e=oe.current)||void 0===e?void 0:e.offline)&&(oe.current={offline:!1},ce()),se(!0),clearTimeout(r),I(!1)}))};return A?a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},a.a.createElement(he,null)):(B&&"/offline-detect"!==window.location.pathname&&c.a.push("offline-detect"),B||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||c.a.push("login"),a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:w&&H?"calc(150px + ".concat(V?"264px":"0px",")"):"0px",right:"0px"},onContextMenu:function(){}},w?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:Q.wrapper},a.a.createElement("div",{className:ne,ref:ae,id:"mainPannel"},a.a.createElement("div",{className:Q.container},a.a.createElement(N.a,null,a.a.createElement(s.d,null,function t(n){var o=w;return n.filter((function(e){if(e.auth&&(!e.AppAccess||e&&e.AppAccess&&o&&o._access)){var t=!e.access&&!e.AppAccess;if(e.access&&e.access.forEach((function(e){o&&o[e]&&(t=!0)})),e.AppAccess&&e.AppAccess.forEach((function(e){o&&o._access&&o._access[e]&&(t=!0)})),t)return!0}return!1})).map((function(o,i){var c;return c=o.component,o.views&&o.views.length>0&&t(o.views),a.a.createElement(s.b,{path:o.path,component:function(){return a.a.createElement("div",{style:Object(p.a)({},H&&(e.search||o.subMenu)?{position:"absolute",left:48,top:0,right:0,bottom:0,overflow:"auto"}:{})},a.a.createElement(N.a,{info:{path:"layouts/index",component:"Sidebar"}},a.a.createElement(X.a,{xsDown:!0},H&&a.a.createElement(ad,Object.assign({routes:n,handleDrawerToggle:ge,menuExpand:function(){W((function(e){return!e}))},subMenu:!(!e.search&&!o.subMenu),setSubMenuExpanded:function(e){J(e)},subMenuExpanded:!(!e.search&&!o.subMenu||!V)},r)))),a.a.createElement(c,null))},key:i,expanded:!(!e.search&&!o.subMenu||!H),subMenu:!(!e.search&&!o.subMenu||!H||!V)})}))}(Ku),a.a.createElement(s.a,{from:"/",to:"/d#tab/resume"}))))),a.a.createElement(N.a,null,a.a.createElement(up.a,null)),a.a.createElement(N.a,null,a.a.createElement(En,null))),a.a.createElement(X.a,{smDown:!0},a.a.createElement(Bd,{menuExpand:function(){W((function(e){return!e}))},expanded:H})),a.a.createElement(N.a,null,a.a.createElement(pe,null)),a.a.createElement(me,null),a.a.createElement(N.a,null,a.a.createElement(F,null)),a.a.createElement(N.a,null,a.a.createElement(E.a,{open:L,className:Q.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(re.a,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},Object(S.w)("$__noInternetConnection","*"))))),a.a.createElement("div",null),a.a.createElement(N.a,null,a.a.createElement(rp,{expanded:H,subMenuExpanded:V})),a.a.createElement(N.a,null,a.a.createElement(sp,null)),a.a.createElement(N.a,null,a.a.createElement(mp,null)),a.a.createElement(N.a,null,a.a.createElement(pp,null)),a.a.createElement(N.a,null,a.a.createElement(lp,null)),a.a.createElement(N.a,null,a.a.createElement(C,null)),a.a.createElement(N.a,null,a.a.createElement(_p,null)),a.a.createElement(Cp,null)):a.a.createElement("div",null,a.a.createElement("div",{className:Q.wrapper,ref:ee},a.a.createElement(Fp,null),a.a.createElement("div",{className:Q.fullPage,style:{backgroundImage:'url("'.concat((null===u||void 0===u?void 0:u.loginBackground)?u.loginBackground:Object(S.d)("loginBackground"),'")')}},a.a.createElement("div",{style:{backgroundImage:u.loginBackground,minHeight:"100vh !important"}}),a.a.createElement(N.a,null,a.a.createElement(s.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(s.b,{path:t.path,component:function(){return a.a.createElement(n,{callback:function(e){ve(e)}})},key:r}):null);var n}))}(Ku),a.a.createElement(s.a,{from:"*",to:B?"/offline-detect":"/login"}))),a.a.createElement(N.a,null,a.a.createElement(te,{white:!0}))))),a.a.createElement(N.a,null,a.a.createElement(Ap,{pauseOnFocusLoss:!0}))))})),$p=(r(1879),function(e){var t=e.store,r=e.history;return a.a.createElement(u.a,{store:t},a.a.createElement(s.c,{history:r},a.a.createElement(s.b,{exact:!0,patch:"/:params",component:Pp})))});r(211).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($p,{store:l.a,history:c.a}),document.getElementById("root"))},193:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(8),a=r(61),o=r(0),i=r.n(o),c=r(100),l=r.n(c),s=r(165),u=r(2),d=r(7),p={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:d.I},"&: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(d.q)(d.b)+", 0.24), 0 8px 10px -5px rgba("+Object(d.q)(d.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:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.G)},successCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.A)},dangerCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.h)},infoCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.r)},primaryCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.v)},roseCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.y)},customCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.g)}},f=["className","children","color","plain","image","contact","signup","stats","icon","text"],h=Object(s.a)(p);function m(e){var t,r=h(),o=e.className,c=e.children,s=e.color,u=e.plain,d=e.image,p=e.contact,m=e.signup,g=e.stats,b=e.icon,v=e.text,y=Object(a.a)(e,f),x=l()((t={},Object(n.a)(t,r.cardHeader,!0),Object(n.a)(t,r[s+"CardHeader"],s),Object(n.a)(t,r.cardHeaderPlain,u),Object(n.a)(t,r.cardHeaderImage,d),Object(n.a)(t,r.cardHeaderContact,p),Object(n.a)(t,r.cardHeaderSignup,m),Object(n.a)(t,r.cardHeaderStats,g),Object(n.a)(t,r.cardHeaderIcon,b),Object(n.a)(t,r.cardHeaderText,v),Object(n.a)(t,o,void 0!==o),t));return i.a.createElement("div",Object.assign({className:x},y),c)}},198:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(7),i=r(1),c={tags:Object(n.a)(Object(n.a)({},o.k),{},{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.k),{},{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(336),f=r(359),h=r(135),m=r(165),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=u.a.getState().db[e.dbNode?e.dbNode:"tag"]||{};return 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)}},x&&x.length>0&&e.options&&e.options.filter((function(e){return e.value})).filter((function(e,t){return u.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0})).map((function(t,r){var a;a=u.a.getState().db.tag.filter((function(e){return e.value===t.value}))[0];var o=x.filter((function(e){return e.value===a.value})).length>0&&x.filter((function(e){return e.value===a.value}))[0].color?x.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.u)(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.w)("$__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"})))))))}},20:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(11),c=r(147),l=r(121),s=r(359),u=r(495),d=r(405),p=r(165),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," ").concat(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.w)("$__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"),whiteSpace:"nowrap"})},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"}))))))}},200:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(83),i=(r(156),r(96)),c=r(1);t.default=function(e){var t=e.tittle,r=e.icon,n=e.data;return a.a.createElement("div",{style:{height:"100%",width:"100%"}},a.a.createElement(i.a,null,(function(i){return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(o.a,{styles:e.styles?e.styles:{},tittle:Object(c.w)("$__".concat(t)),icon:r,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),!e.load&&i?a.a.createElement("div",{style:{width:"100%",height:"fitContent",fontWeight:"bolder",flex:"1 1 auto",display:"flex",justifyContent:"center",fontSize:"200%"}},a.a.createElement("p",{style:{textAlign:"center",fontSize:"calc(3.5em + (2 - 14) * ((100vh - 200px) / (1400 - 200)))",margin:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},n)):a.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{alignSelf:"center"}},"  ",a.a.createElement("div",{className:"loader"}))))})))}},201:function(e,t,r){"use strict";var n=r(10),a=r(5),o=r(0),i=r.n(o),c=r(1174),l=r.n(c),s=r(1175),u=r.n(s),d=r(15),p=r(13),f=r(14),h=r(58),m=r(11),g=r(46),b=r(1227),v=r(34),y=(r(1520),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%"}}}}),x=r(1);function w(){w=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(y=_);var O=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(O,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var _=i.a.createRef(null);t.a=Object(f.b)((function(e){return{store:e}}),(function(e){return Object(p.b)(d,e)}))(Object(v.a)(y)((function(e){var t=i.a.useState(null),r=Object(a.a)(t,2),o=r[0],c=r[1],s=i.a.useState(!1),d=Object(a.a)(s,2),p=d[0],f=d[1],v=i.a.useState(null),y=Object(a.a)(v,2),O=y[0],j=y[1],E=i.a.useState([]),k=Object(a.a)(E,2),S=k[0],L=k[1],C=i.a.useRef(null),I=e.classes;i.a.useEffect((function(){T()}),[e.files,e.img]);var T=function(){var t=S;e.files&&(Object.keys(e.files).forEach((function(r){0===t.filter((function(e){return e._id===r})).length&&t.push(e.files[r])})),L(t))},D=function(){var t=Object(n.a)(w().mark((function t(r){var n,a,o,i,l,s;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_.current.getCroppedCanvas().toDataURL(),c(n),j(null),f(!1),a=C.current.files[0].name,o=C.current.files[0].type,t.next=8,F(n,a,o);case 8:return i=t.sent,t.prev=9,l=new Promise((function(t){return u.a.imageFileResizer(i,e.maxWidthOrHeight?e.maxWidthOrHeight:600,e.maxWidthOrHeight?e.maxWidthOrHeight:600,i.type.replace("image/",""),50,0,(function(e){t(F(e,a,o))}))})),t.next=13,l.then((function(e){return e}));case 13:(s=t.sent)&&e.onChange&&e.onChange(n,s),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(9),console.log(t.t0);case 20:case"end":return t.stop()}}),t,null,[[9,17]])})));return function(e){return t.apply(this,arguments)}}(),F=function(e,t,r){return fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:r})}))};return i.a.createElement("div",{className:I.root},i.a.createElement("div",{className:I.viewer,style:{}},!o&&!e.img&&e.avatar&&e.avatarIcon&&i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},i.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(x.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(x.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(m.a,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!o&&!e.img?e.avatar&&(o||e.img)?i.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(x.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(x.d)("AvatarBackground"),backgroundImage:'url("'.concat(o||e.img,'")'),backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",display:"flex",alignItems:"center",justifyContent:"center"}}):i.a.createElement(i.a.Fragment,null):i.a.createElement("img",{alt:"MACHEN_IMAGE",className:e.avatar?I.avatarImage:I.image,src:"".concat(o||e.img),style:{cursor:"pointer"},onError:function(t){return t.target.src=o||e.img},width:"100%",onClick:function(){!function(){if(S&&S.length>0){var t=S.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})}}()}})),i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.onChange?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{padding:"7px"},onClick:function(){C.current.click()}},i.a.createElement(g.a,{text:Object(x.w)(o||e.img?"$__changeImage":"$__addImage",1),icon:o||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),i.a.createElement("input",{type:"file",onChange:function(e){!function(e){f(!0);var t=new FileReader;if(null!=e.files[0]){var r=e.files[0];t.onloadend=function(){j(t.result),f(!0)},t.readAsDataURL(r)}else f(!1)}(e.target)},ref:C,id:"file-picker",name:"image",accept:e.accept||".jpg,.jpeg,.png,.gif",style:{display:"none"}})):i.a.createElement(i.a.Fragment,null),e.onDelete&&(o||e.img)?i.a.createElement("div",{style:{padding:"7px"},onClick:function(){e.onDelete()}},i.a.createElement(g.a,{text:Object(x.w)("$__removeImage",1),icon:"hide_image",textColor:"color",iconColor:"color"})):i.a.createElement(i.a.Fragment,null)),i.a.createElement(b.a,{fullWidth:!0,onClose:function(){return f(!1)},"aria-labelledby":"simple-dialog-title",open:p},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px",display:"flex"}},i.a.createElement(h.a,{title:Object(x.w)("$__cropImage",1),icon:"crop",onSave:function(){D()},onCancel:function(){f(!1)},actionsButtons:!0,actionButtonsStyle:{top:0,height:45,display:"flex",alignItems:"center"}})),i.a.createElement(l.a,{className:e.avatar?I.circleCropper:I.cropper,ref:_,src:O||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})))})))},203:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(61),a=r(0),o=r.n(a),i=r(165),c=r(917),l=["children","className"],s=Object(i.a)({grid:{padding:"0 15px"}});function u(e){var t=s(),r=e.children,a=e.className,i=Object(n.a)(e,l);return o.a.createElement(c.a,Object.assign({item:!0},i,{className:t.grid+" "+a}),r)}},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(61),a=r(0),o=r.n(a),i=r(165),c=r(917),l=["children","className"],s=Object(i.a)({grid:{padding:"0 15px !important"}});function u(e){var t=s(),r=e.children,a=e.className,i=Object(n.a)(e,l);return o.a.createElement(c.a,Object.assign({item:!0},i,{className:t.grid+" "+a}),r)}},232:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(747),c=r.n(i),l=r(1219),s=r(11),u=r(20),d=(r(514),r(1));r(1521);var p=o.a.forwardRef((function(e,t){return o.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},o.a.createElement("label",{onClick:e.onClick,ref:t,style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.value||e.placeholder),o.a.createElement(s.a,{size:"22px",color:Object(d.d)("color"),icon:"today",onClick:e.onClick}))}));t.a=function(e){return Object(i.registerLocale)("pt",l.a),o.a.createElement("div",{style:Object(n.a)(Object(n.a)(Object(n.a)({width:"100%"},e.horizontal?{display:"flex",alignItems:"center"}:{}),e.style?e.style:{}),{},{justifyContent:"center"})},o.a.createElement("div",{style:Object(n.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},o.a.createElement(c.a,Object.assign({locale:"pt",placeholderText:e.placeholder?e.placeholder:Object(d.w)("$__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(d.w)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:o.a.createElement(p,null),showYearDropdown:!0}))),e.range?o.a.createElement("div",{style:Object(n.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},o.a.createElement(c.a,Object.assign({locale:"pt",placeholderText:Object(d.w)("$__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(d.w)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{maxDate:e.maxDate?e.maxDate:null,customInput:o.a.createElement(p,null),showYearDropdown:!0}))):o.a.createElement(o.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?o.a.createElement("div",{style:Object(n.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},o.a.createElement(u.a,Object.assign({color:Object(d.d)("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:Object(d.w)("$__clearDate","*"),text:Object(d.w)("$__clearDate","*")}))):o.a.createElement(o.a.Fragment,null))}},238:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(98),l=r(165),s=r(2038),u=r(34),d=Object(u.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}}}))(s.a);function p(e){var t=i.a.useState(!1),r=Object(a.a)(t,2),o=r[0],c=r[1];return i.a.createElement(d,{style:Object(n.a)(Object(n.a)({},e.style?e.style:{}),o?{}:{paddingLeft:10,paddingRight:10}),deleteIcon:e.deleteIcon?e.deleteIcon:null,label:e.label,onMouseOver:function(){c(!0)},onMouseLeave:function(){c(!1)},onDelete:e.onDelete&&o?function(){e.onDelete()}:null,onClick:e.onClick?function(t){e.onDelete()}:null})}var f=r(25),h=r(1895),m=r(1),g=r(7),b=Object(u.a)({root:Object(n.a)(Object(n.a)({},g.k),{},{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(m.d)("color")},"& label.MuiFormLabel-filled":{color:Object(m.d)("color"),marginTop:"standard"===Object(m.d)("fieldVariant")||"filled"===Object(m.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(m.d)("color"),marginTop:"standard"===Object(m.d)("fieldVariant")||"filled"===Object(m.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(m.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(m.d)("fieldRadius"),"& fieldset":{borderColor:Object(m.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(m.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(m.d)("fieldRadius"),"& fieldset":{borderColor:Object(m.d)("line")},"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")},"&.Mui-focused":{borderBottomColor:Object(m.d)("line"),"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(m.d)("fieldVariant")?0:"filled"===Object(m.d)("fieldVariant")?"-15px":0,borderRadius:Object(m.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(m.d)("line")},"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")},"&.Mui-focused":{borderBottomColor:Object(m.d)("line"),"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")}}}})})(h.a),v=r(336),y=r(916),x=r(692),w=Object(l.a)(x.a);t.a=function(e){var t=w(),r=i.a.useState([]),o=Object(a.a)(r,2),l=o[0],s=o[1];i.a.useEffect((function(){s(e.value)}),[e.value]);var u=function(t){var r=Array.from(l);r.splice(r.findIndex((function(e){return e.value===t.value})),1),s(r),e.onChange&&e.onChange(r)};return i.a.createElement(c.a,{className:e.dark?e.noLabel?t.noLabel:t.labelTop:e.noLabel?t.noLabelLight:t.labelTopLight,value:l,options:e.options?e.options.sort((function(t,r){var n,a,o="".concat("".concat(t.parent&&(null===(n=e.options.filter((function(e){return e.value===t.parent}))[0])||void 0===n?void 0:n.label.toUpperCase())," ").concat(null===t||void 0===t?void 0:t.label.toUpperCase())||"".concat(null===t||void 0===t?void 0:t.label.toUpperCase()),"* ").concat(null===t||void 0===t?void 0:t.label.toUpperCase()),i="".concat("".concat(r.parent&&(null===(a=e.options.filter((function(e){return e.value===r.parent}))[0])||void 0===a?void 0:a.label.toUpperCase())," ").concat(null===r||void 0===r?void 0:r.label.toUpperCase())||"".concat(null===r||void 0===r?void 0:r.label.toUpperCase()),"* ").concat(null===r||void 0===r?void 0:r.label.toUpperCase());return o<i?-1:o>i?1:0})):[],getOptionLabel:function(e){return e&&e.label?Object(m.w)(e.label,1):""},filterSelectedOptions:!!e.filterSelectedOptions,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,groupBy:e.groupByParent?function(e){return e.parent||"noParent"}:null,renderOption:e.groupByParent?null:function(e){return i.a.createElement("div",{style:Object(n.a)({zIndex:3e3},e.color?{paddingLeft:7,borderLeft:"solid 3px ".concat(e.color)}:{})},e.label)},renderGroup:function(t){return i.a.createElement("li",{key:t.key},t.group&&e.options.filter((function(e){return e.value===t.group})).length>0?i.a.createElement("div",{style:{fontSize:10,color:Object(m.d)("menu"),backgroundColor:t.color||"#b7b7b7",padding:3}},e.options.filter((function(e){return e.value===t.group}))[0].label):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{style:Object(n.a)({},e.options.filter((function(e){return e.value===t.group})).length>0&&e.options.filter((function(e){return e.value===t.group}))[0].color?{borderLeft:"solid 2px ".concat(e.options.filter((function(e){return e.value===t.group}))[0].color)}:{})},t.children))},renderInput:function(t){return e.dark?i.a.createElement(b,Object.assign({},t,{label:Object(m.w)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(n.a)(Object(n.a)({},t.InputProps),e.InputProps)})):i.a.createElement(f.a,Object.assign({},t,{label:Object(m.w)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(n.a)(Object(n.a)({},t.InputProps),e.InputProps)}))},renderTags:function(t,r){return t.map((function(t,r){return i.a.createElement("div",{key:r},e.colorPicker&&t&&t.label?i.a.createElement(v.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)}},i.a.createElement(p,{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(m.u)(t.color||"#b7b7b7",!0)},deleteIcon:i.a.createElement(y.a,{style:{color:Object(m.u)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){u(t)}})):t&&t.label?i.a.createElement(p,{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(m.u)(t.color||"#b7b7b7",!0)},deleteIcon:i.a.createElement(y.a,{style:{color:Object(m.u)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){u(t)}}):i.a.createElement(i.a.Fragment,null))}))},onChange:function(t,r){e.onChange&&e.onChange(r);var n=[];e.multiple?(r.forEach((function(e){e&&e.label?n.push(e):n.push({label:e})})),s(n)):s(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})}},24:function(e,t,r){"use strict";r.d(t,"k",(function(){return D})),r.d(t,"N",(function(){return ie})),r.d(t,"q",(function(){return fe})),r.d(t,"a",(function(){return q})),r.d(t,"b",(function(){return V})),r.d(t,"c",(function(){return U})),r.d(t,"d",(function(){return H})),r.d(t,"e",(function(){return le})),r.d(t,"f",(function(){return W})),r.d(t,"g",(function(){return z})),r.d(t,"h",(function(){return Z})),r.d(t,"i",(function(){return ne})),r.d(t,"j",(function(){return se})),r.d(t,"l",(function(){return T})),r.d(t,"m",(function(){return F})),r.d(t,"n",(function(){return N})),r.d(t,"o",(function(){return C})),r.d(t,"p",(function(){return $})),r.d(t,"r",(function(){return K})),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 _})),r.d(t,"w",(function(){return x})),r.d(t,"x",(function(){return w})),r.d(t,"y",(function(){return Q})),r.d(t,"z",(function(){return R})),r.d(t,"A",(function(){return ue})),r.d(t,"B",(function(){return de})),r.d(t,"C",(function(){return M})),r.d(t,"D",(function(){return B})),r.d(t,"E",(function(){return L})),r.d(t,"F",(function(){return y})),r.d(t,"G",(function(){return O})),r.d(t,"H",(function(){return A})),r.d(t,"I",(function(){return pe})),r.d(t,"J",(function(){return G})),r.d(t,"K",(function(){return X})),r.d(t,"L",(function(){return J})),r.d(t,"M",(function(){return E})),r.d(t,"P",(function(){return k})),r.d(t,"O",(function(){return oe})),r.d(t,"Q",(function(){return P})),r.d(t,"R",(function(){return re}));var n=r(19),a=r(8),o=r(2),i=r(10),c=r(3),l=r(73),s=r.n(l),u=r(38),d=r(55),p=r(180),f=r(6),h=r.n(f),m=r(65),g=r(662),b=r(1);r(497);function v(){v=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var y=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,a,i,l,s,u,d,p,f,h=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h.length>1&&void 0!==h[1]&&h[1],n=h.length>2?h[2]:void 0,a=h.length>3&&void 0!==h[3]?h[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,(null===(d=c.a.getState().db.cards[a])||void 0===d?void 0:d.type)&&("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 p=e.sent,e.abrupt("return",p);case 20:return e.next=22,E(t,Object(o.a)(Object(o.a)({},l),{},{oldData:s}),u,r);case 22:if(f=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,O(l._id);case 26:return e.abrupt("return",f);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 e.next=2,u.a.post("timer/start",{idRel:r,startTime:String(h()().unix("X")),type:"start"});case 2:if(!(n=e.sent)){e.next=6;break}return F(t,Object(o.a)({},n.data)),e.abrupt("return",Object(o.a)(Object(o.a)({},n.data),{},{created_at:String(h()().unix("X"))}));case 6:case"end":return e.stop()}}),e)})));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 e.next=2,u.a.put("timer/stop",{idRel:r});case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.data);case 5: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,n){var i,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.delete("timer/run/".concat(n),{idRel:r});case 2:if(i=e.sent,(l=c.a.getState().db.cards[r]._kpiTimer)[n]&&delete l[n],!i){e.next=8;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 8:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),O=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){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||!(c.a.getState().db.cards[e].type.indexOf("guideline")>-1))}))[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),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,O(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]&&(G(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=8,m;case 8:return g=e.sent,e.abrupt("return",g);case 10: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,O(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)}}(),k=function(){var e=Object(i.a)(v().mark((function e(t,r,n){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,l){var s={};r.forEach(function(){var r=Object(i.a)(v().mark((function r(u){var d,f,h;return v().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(d=Object(o.a)({},u),h=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),!n){r.next=7;break}return r.next=5,Object(p.a)(d._id,n);case 5:f=r.sent,d.image=f;case 7:(!n||n&&f)&&(s=Object(o.a)(Object(o.a)({},s),{},Object(a.a)({},d._id,Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[d._id]),d),{},{_users:Object(o.a)({},c.a.getState().db.cards[d._id]._users)}))),h.emit("data",{module:"cards",method:"put",action:"update220527"},d,function(){var r=Object(i.a)(v().mark((function r(n){var i;return v().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n||l(new Error("error update")),d.order&&parseInt(d.order)>=0&&(d.order={low:d.order}),n&&n.log&&n.log._id&&S(t,d._id,Object(a.a)({},n.log._id,Object(o.a)(Object(o.a)({},n.log),{},{_parent:[d._id]}))),i=c.a.getState(),i.db,e(!0);case 5:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()));case 8:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()),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),s)}))})));case 1: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)))},L=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:I(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)}}(),C=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?I(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:I(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)}}(),I=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).forEach((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)}))},T=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}))},D=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.forEach((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})).forEach((function(e){e.count=e.count+1}))})),l._tags&&l._tags.forEach((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})).forEach((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:Object(o.a)(Object(o.a)({},t._kpiTimer),t.startTime?{created_at:t.startTime}:{})})))}))},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)}}(),A=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])})).forEach((function(e){d=Object(o.a)(Object(o.a)({},d),{},Object(a.a)({},e,i.cards[e]))})),Object.keys(d).forEach((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.forEach((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)}}(),P=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))})))})))}))}A(e)},$=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})))})))}))}},M=function(e,t){var r=c.a.getState().db.cards,n=t.cards;n&&n.length>0&&(n.forEach((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)})))},B=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})))})))}))}},z=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)}))},Y=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=h()().tz("America/Sao_Paulo").unix("x"),l=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?i: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)({},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,l))})))}));case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),R=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)}}(),G=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"),Y(t,r,n);try{u.a.post("/cards/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})))})}))}catch(l){console.log(l)}case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){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=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),Object(b.c)({message:"".concat(Object(b.w)("$__tryAgainOrContactSupport",1),". ERROR: cMoveTo->API~887"),variant:"error",persist:!1,horizontal:"right"});case 13: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 a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.a.getState().db.cards,e.next=3,new Promise(function(){var e=Object(i.a)(v().mark((function e(t,i){var c,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce(r.cardId);case 2:l=e.sent,console.log(l),(null===r||void 0===r||null===(c=r.childrens)||void 0===c?void 0:c.length)>0&&(l=[].concat(Object(n.a)(l),Object(n.a)(r.childrens))),l&&l.length>0?l.forEach((function(e,n){a[e]&&(a[e]=Object(o.a)(Object(o.a)({},a[e]),{},{_parent:r.newRel},r.planId?{_planId:r.planId}:{})),n+1===l.length&&t(!0)})):t(!0);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:e.sent&&(a[r.cardId]&&(a[r.cardId]=Object(o.a)(Object(o.a)({},a[r.cardId]),{},{_parent:r.newRel})),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),a)})));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).forEach((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).forEach((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)}}(),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]);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)))}))},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]);t.userIds&&t.userIds.length>0&&t.userIds.forEach((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)))}))},J=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)}}(),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: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)})).forEach((function(e){n[e]._parent=r.planId})),r.cards&&r.cards.length>0&&r.cards.forEach((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)}}(),K=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,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=c.a.getState(),u=s.db,d=s.session,p=Object(o.a)({},t?u.cards[t]:{}),f={};if(l.allPlataform)return Object.keys(u.users).filter((function(e){return!u.users[e].deleted&&"user"===u.users[e].type})).forEach((function(e){var t="user";(!u.users[e]||u.users[e]&&u.users[e]._parent&&u.users[u.users[e]._parent]&&u.users[e]._parent!==d.account)&&(t="external"),(!u.users[e]||u.users[e]&&u.users[e]._parent&&!u.users[u.users[e]._parent])&&(t="consultant"),f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]||{}),{},{_id:e,type:t})))})),f;((null===l||void 0===l?void 0:l.noInternal)||Object.keys(u.users).filter((function(e){return"user"===u.users[e].type&&u.users[e]._parent===d._account&&!u.users[e].deleted})).forEach((function(e){f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]),{},{_id:e,type:"user"})))})),(null===p||void 0===p?void 0:p.client)&&u.users[p.client]&&Object.keys(u.users).filter((function(e){return u.users[e]._parent===p.client&&!u.users[e].deleted})).forEach((function(e){f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]),{},{_id:e,type:"external"},u.users[e]._parent?{_parent:u.users[e]._parent}:{})))})),(null===p||void 0===p?void 0:p._planId)&&(null===(r=u.cards[p._planId])||void 0===r?void 0:r.client)&&u.users[u.cards[p._planId].client]&&Object.keys(u.users).filter((function(e){var t;return u.users[e]._parent===(null===(t=u.cards[p._planId])||void 0===t?void 0:t.client)&&!u.users[e].deleted})).forEach((function(e){f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]),{},{_id:e,type:"external"},u.users[e]._parent?{_parent:u.users[e]._parent}:{})))})),(null===p||void 0===p?void 0:p._users)&&Object.keys(p._users).forEach((function(e){if(e!==d._id){var t="user";(!u.users[e]||u.users[e]&&u.users[e]._parent&&u.users[u.users[e]._parent]&&u.users[e]._parent!==d.account)&&(t="external"),(!u.users[e]||u.users[e]&&u.users[e]._parent&&!u.users[u.users[e]._parent])&&(t="consultant"),f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},p._users[e]),{},{_id:e,type:t},p._users[e]._parent?{_parent:p._users[e]._parent}:{})))}})),l&&!l.onlyCard)&&(!l.noPlan&&p._planId&&(null===(n=u.cards[p._planId])||void 0===n?void 0:n._users[d._id])&&(f=Object(o.a)(Object(o.a)({},f),e(p._planId,{noPlan:!0,noInternal:!0}))),p._parent&&(null===(i=u.cards[p._parent])||void 0===i?void 0:i._users[d._id])&&(f=Object(o.a)(Object(o.a)({},f),e(p._parent,{noPlan:!0,noInternal:!0}))));if(null===l||void 0===l?void 0:l.isArray){var h=[];return Object.keys(f).forEach((function(e){0===h.filter((function(t){return t._id===e})).length&&h.push(f[e])})),h}return f},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,c,l=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=l.length>3&&void 0!==l[3]?l[3]:{},o=new Promise(function(){var e=Object(i.a)(v().mark((function e(t,o){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,options:a});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=4,o;case 4:return c=e.sent,e.abrupt("return",c);case 6: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.forEach(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.forEach((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.forEach((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})).forEach((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].deleted&&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){return!(!(r&&r._id&&parseInt(c.a.getState().timeline[e][n].created_at)>1650666142&&!c.a.getState().timeline[e][n].deleted&&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]))})).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.w)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(b.w)("$__concludeAll"),text:Object(b.w)("$__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.w)("$__cancel"),text:Object(b.w)("$__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)}}(),fe=function(e,t){var r=Array.from(e),n=c.a.getState().db;return t&&((t.startDate||t.endDate)&&(r=r.filter((function(e){return!!(e&&t.startDate&&e.startDate&&e.startDate>=t.startDate&&t.endDate&&e.endDate&&e.endDate<=t.endDate)})).map((function(e){return e}))),t.text&&(r=r.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(t.text.toLowerCase())>-1)})).map((function(e){return e}))),t.status&&(r=r.filter((function(e){return!(e.status&&!(e&&e.status&&t.status&&t.status[e.status]))})).map((function(e){return e}))),t.priority&&(r=r.filter((function(e){return!!(e&&e.priority&&t.priority[e.priority]||t.priority.null&&!e.priority)})).map((function(e){return e}))),t.users&&t.users.length>0&&(r=r.filter((function(e){return!!(e&&e._users&&Object.keys(e._users).filter((function(e){return t.users.indexOf(e)>-1})).length>0)})).map((function(e){return e}))),t.responsible&&t.responsible.length>0&&(r=r.filter((function(e){return!!(e&&e._users&&Object.keys(e._users).filter((function(r){return!!(e._users[r].isResponsible&&t.responsible.indexOf(r)>-1||t.responsible.indexOf(r)>-1&&!e._users[r].isResponsible&&1===Object.keys(e._users).length)})).length>0)})).map((function(e){return e}))),t.units&&t.units.length>0&&(r=t.units.indexOf("all")>-1?r.filter((function(e){return!(e._planId&&(!e._planId||!n.cards[e._planId]||n.cards[e._planId].client))})).map((function(e){return e})):r.filter((function(e){var r=!1;return Object.keys(n.cards).filter((function(e){return!!(n.cards[e].client&&t.units.indexOf(n.cards[e].client)>-1)})).forEach((function(t){e._planId&&e._planId===n.cards[t]._id&&(r=!0)})),r})).map((function(e){return e}))),t.groups&&t.groups.length>0&&(r=t.groups.indexOf("ALL")>-1?r.filter((function(e){return!(e._planId&&(!e._planId||!n.cards[e._planId]||n.cards[e._planId].client))})).map((function(e){return e})):r.filter((function(e){var r=!1;return Object.keys(n.cards).filter((function(e){return!!(n.cards[e].client&&t.groups.indexOf(n.cards[e].client)>-1)})).forEach((function(t){e._planId&&e._planId===n.cards[t]._id&&(r=!0)})),r})).map((function(e){return e}))),t.plans&&t.plans.length>0&&(r=r.filter((function(e){return t.plans.indexOf(e._planId)>-1})).map((function(e){return e}))),t.tags&&t.tags.length>0&&(r=r.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var r=!1;return t.tags.forEach((function(t){t.value===e.value&&(r=!0)})),r})).length>0})).map((function(e){return e}))),t&&t.tagsByText&&(r=r.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){return e.label&&e.label.indexOf(t.tagsByText)>-1})).length>0})).map((function(e){return e})))),r}},241:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(73),s=r.n(l),u=r(14),d=r(13),p=r(15),f=r(3),h=r(20),m=r(46),g=r(6),b=r.n(g),v=r(232),y=r(238),x=r(155),w=r(11),_=r(144),O=r(59),j=r(25),E=r(301),k=r(1932),S=r(1921),L=r(1920),C=r(1922),I=r(1241),T=r(570),D=r(135),F=r(165),N=r(469),A=(r(514),r(1)),P=Object(F.a)(N.a);var $=JSON.stringify({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},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}}),M=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(d.b)(p,e)}))((function(e){var t,r,i,l,s=e.field,u=P(),d=f.a.getState(),p=d.db,h=d.searchs,m=c.a.useState(Object(a.a)({},JSON.parse($))),g=Object(o.a)(m,2),F=g[0],N=g[1],M=c.a.useState(null),B=Object(o.a)(M,2),z=B[0],Y=B[1],R=JSON.parse($);c.a.useEffect((function(){var t;if(e.onChange){var r={};Object.keys(F).forEach((function(e){R[e]||(r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},e,F[e]))),R[e]&&JSON.stringify($[e])!==JSON.stringify(F[e])&&(r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},e,F[e])))})),e.onChange(r)}(null===e||void 0===e||null===(t=e.preffers)||void 0===t?void 0:t.searchButton)||e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},f.a.getState().searchs),{},Object(n.a)({},e.nodeId,Object(a.a)(Object(a.a)({},JSON.parse($)),F))))}),[F]),c.a.useEffect((function(){var t=Object(a.a)(Object(a.a)({},JSON.parse($)),h[e.nodeId]||{});JSON.stringify(t)!==JSON.stringify(F)&&N(t)}),[s]),c.a.useEffect((function(){e.searchs&&!e.searchs[e.nodeId]&&N(JSON.parse($))}),[e.searchs]);var G=window.location.hash.split("/");G[0]=G[0].replace("#",""),36!==G[0].length&&(G[0]=null);var H=function(t,r){var o,i,c=F[t]||{};"all"===r?Object.keys(c).forEach((function(e){c[e]=!0})):(c.all&&Object.keys(c).forEach((function(e){c[e]=!1})),c.all=!1),(null===e||void 0===e||null===(o=e.preffers)||void 0===o||null===(i=o.unique)||void 0===i?void 0:i.status)&&Object.keys(c).forEach((function(e){c[e]=!1})),N(Object(a.a)(Object(a.a)({},F),{},Object(n.a)({},t,Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},r,"all"===r||!c[r])))))},W=function(t){var r;return c.a.createElement(k.a,{style:{width:"100%"},expanded:z===t,onChange:function(){Y(z===t?null:t)}},c.a.createElement(L.a,{style:{minWidth:"100%"},expandIcon:c.a.createElement(w.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},c.a.createElement("div",{style:{color:Object(A.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left"}},Object(A.w)("$__".concat(t))),c.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(F[t]).filter((function(e,r){return F[t][e]&&"all"!==e})).map((function(e,t){return c.a.createElement(D.a,{title:Object(A.w)(p.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:p.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),c.a.createElement(S.a,{style:{minWidth:"100%"}},c.a.createElement(I.a,{style:{width:"100%"}},(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.unique[t])?c.a.createElement(c.a.Fragment,null):c.a.createElement(C.a,{style:{minWidth:"100%"},control:c.a.createElement(x.a,{checked:!(!F[t]||!F[t].all),onChange:function(){H("priority","all")},color:"default"}),label:Object(A.w)("$__allPriorities")}),p.priority.map((function(e,r){return c.a.createElement(c.a.Fragment,{key:r},c.a.createElement(C.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:c.a.createElement(x.a,{indeterminate:!(!F[t]||!F[t].all),checked:!(!F[t]||!F[t][e.value]),onChange:function(){H(t,e.value)},color:"default"}),label:Object(A.w)(e.label)}))})))))};return"admin"===s?c.a.createElement(O.a,{checked:!!F.admin,onChange:function(e){N(Object(a.a)(Object(a.a)({},F),{},{admin:!F.admin}))},name:"adminView",inputProps:{"aria-label":"secondary checkbox"}}):"text"===s?c.a.createElement("div",{className:u.textField,style:{width:"100%"}},c.a.createElement(j.a,{className:u.noLabelLight,label:Object(A.w)("$__search","*"),autoFocus:!0,value:F.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:c.a.createElement(T.a,{position:"start"},c.a.createElement(w.a,{color:Object(A.d)("color")},"search")),onChange:function(e){N(Object(a.a)(Object(a.a)({},F),{},{text:e.target.value}))},onKeyDown:function(e){}}})):"ref1"===s?c.a.createElement("div",{className:u.textField,style:{width:"100%"}},c.a.createElement(j.a,{className:u.noLabelLight,label:(null===(t=e.customTitles)||void 0===t?void 0:t.ref1)||Object(A.w)("$__ref1","*"),autoFocus:!0,value:F.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:c.a.createElement(T.a,{position:"start"},c.a.createElement(w.a,{color:Object(A.d)("color")},"arrow_right")),onChange:function(e){N(Object(a.a)(Object(a.a)({},F),{},{ref1:e.target.value}))},onKeyDown:function(e){}}})):"ref2"===s?c.a.createElement("div",{className:u.textField,style:{width:"100%"}},c.a.createElement(j.a,{className:u.noLabelLight,label:(null===(r=e.customTitles)||void 0===r?void 0:r.ref2)||Object(A.w)("$__ref2","*"),autoFocus:!0,value:F.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:c.a.createElement(T.a,{position:"start"},c.a.createElement(w.a,{color:Object(A.d)("color")},"turned_in_not")),onChange:function(e){N(Object(a.a)(Object(a.a)({},F),{},{ref2:e.target.value}))},onKeyDown:function(e){}}})):"tagsByText"===s?c.a.createElement("div",{className:u.textField,style:{width:"100%"}},c.a.createElement(j.a,{className:u.noLabelLight,label:Object(A.w)("$__searchTags","*"),value:F.tagsByText||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:c.a.createElement(T.a,{position:"start"},c.a.createElement(w.a,{color:Object(A.d)("color")},"search")),onChange:function(e){N(Object(a.a)(Object(a.a)({},F),{},{tagsByText:e.target.value}))}}})):"date"===s?c.a.createElement(c.a.Fragment,null,c.a.createElement(v.a,{type:"datetime",onChangeStartDate:function(t){var r,n={startDate:b()(t).unix("x")};(!(null===(r=f.a.getState().searchs[e.nodeId])||void 0===r?void 0:r.endDate)||f.a.getState().searchs[e.nodeId].endDate<b()(t).unix("x"))&&(n=Object(a.a)(Object(a.a)({},n),{},{endDate:b()("".concat(b()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),N(Object(a.a)(Object(a.a)({},F),n))},onChangeEndDate:function(e){N(Object(a.a)(Object(a.a)({},F),{},{endDate:b()(e).unix("x")}))},range:!0,horizontal:!0,startDate:(null===F||void 0===F?void 0:F.startDate)?new Date(1e3*F.startDate):null,endDate:(null===F||void 0===F?void 0:F.endDate)?new Date(1e3*F.endDate):null,onClear:function(){N(Object(a.a)(Object(a.a)({},F),{},{startDate:null,endDate:null}))}})):"tags"===s?c.a.createElement(y.a,{dbNode:"tag",options:f.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:(null===F||void 0===F?void 0:F.tags)||[],placeholder:Object(A.w)("$__tags"),onChange:function(e){N(Object(a.a)(Object(a.a)({},F),{},{tags:e}))}}):"status"===s?c.a.createElement(k.a,{style:{width:"100%",padding:0},expanded:"status"===z,onChange:function(){Y("status"===z?null:"status")}},c.a.createElement(L.a,{style:{minWidth:"100%"},expandIcon:c.a.createElement(w.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},c.a.createElement("div",{style:{color:Object(A.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left"}},Object(A.w)("$__status")),c.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},(null===F||void 0===F?void 0:F.status)&&Object.keys(F.status).filter((function(e,t){return(F.status[e]||F.status.all)&&"all"!==e})).map((function(e,t){return c.a.createElement(D.a,{title:Object(A.w)(p.status.filter((function(t){return t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:p.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))),c.a.createElement(S.a,{style:{minWidth:"100%"}},c.a.createElement(I.a,{style:{width:"100%"}},c.a.createElement(C.a,{style:{minWidth:"100%"},control:c.a.createElement(x.a,{checked:!(!F.status||!F.status.all),onChange:function(){H("status","all")},color:"default"}),label:Object(A.w)("$__allStatus")}),p.status.map((function(e,t){return c.a.createElement(c.a.Fragment,{key:t},c.a.createElement(C.a,{style:{minWidth:"100%"},control:c.a.createElement(x.a,{indeterminate:!(!F.status||!F.status.all),checked:!(!F.status||!F.status[e.value]),onChange:function(){H("status",e.value)},color:"default"}),label:Object(A.w)(e.label)}))}))))):"priority"===s?W("priority"):"complexity"===s?W("complexity"):"risk"===s?W("risk"):"impact"===s?W("impact"):"users"===s?c.a.createElement("div",{style:{marginTop:5}},c.a.createElement(_.a,Object.assign({includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:f.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!0,onSelect:function(e){N(Object(a.a)(Object(a.a)({},F),{},{users:e}))},selected:(null===F||void 0===F?void 0:F.users)||[],transparent:!0},(null===e||void 0===e||null===(i=e.fieldsProps)||void 0===i?void 0:i.users)||{}))):"responsible"===s?c.a.createElement("div",{style:{marginTop:5}},c.a.createElement(_.a,Object.assign({text:Object(A.w)("$__FilterByResponsible"),includeMe:!0,avatarSize:"23px",permission:!0,data:f.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!1,onSelect:function(e){N(Object(a.a)(Object(a.a)({},F),{},{responsible:e}))},selected:(null===F||void 0===F?void 0:F.responsible)||[],transparent:!0},(null===e||void 0===e||null===(l=e.fieldsProps)||void 0===l?void 0:l.responsible)||{}))):"userGroups"===s?c.a.createElement(E.a,{data:{values:F.userGroups||[]},options:f.a.getState().db.userGroup?f.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){N(Object(a.a)(Object(a.a)({},F),{},{userGroups:e}))},colorPickerCallBack:function(e){},noAdd:!0}):c.a.createElement(c.a.Fragment,null)}));var B=JSON.stringify({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},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}});t.a=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(d.b)(p,e)}))((function(e){var t,r,i=f.a.getState(),l=i.searchs,u=i.db,d=c.a.useState(!1),p=Object(o.a)(d,2),g=p[0],b=p[1],v=c.a.useState(Object(a.a)({},JSON.parse(B))),y=Object(o.a)(v,2),x=y[0],w=y[1],_=c.a.useState(e.nodeId?e.nodeId:s()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),O=Object(o.a)(_,2),j=O[0],E=O[1],k=c.a.useRef(!0);c.a.useEffect((function(){return k.current=!0,function(){k.current=!1}}),[]),c.a.useEffect((function(){var e=Object(a.a)(Object(a.a)({},JSON.parse(B)),l[j]||{});JSON.stringify(e)!==JSON.stringify(x)&&k.current&&w(e)}),[j]),c.a.useEffect((function(){e.onChange&&e.onChange(Object(a.a)({},x||{}))}),[x]),c.a.useEffect((function(){k.current&&E(e.nodeId?e.nodeId:s()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]);var S={};e.nodeId&&u.cards&&u.cards[e.nodeId]&&"plan"===u.cards[e.nodeId].type&&u.cards[e.nodeId].refs&&(u.cards[e.nodeId].ref1Title||u.cards[e.nodeId].ref2Title)?S=Object(a.a)(Object(a.a)(Object(a.a)({},S),u.cards[e.nodeId].ref1Title?{ref1Title:u.cards[e.nodeId].ref1Title}:{}),u.cards[e.nodeId].ref2Title?{ref2Title:u.cards[e.nodeId].ref2Title}:{}):e.nodeId&&u.cards&&u.cards[e.nodeId]&&u.cards[e.nodeId]._planId&&u.cards[u.cards[e.nodeId]._planId].refs&&(u.cards[u.cards[e.nodeId]._planId].ref1Title||u.cards[u.cards[e.nodeId]._planId].ref2Title)&&(S=Object(a.a)(Object(a.a)(Object(a.a)({},S),u.cards[u.cards[e.nodeId]._planId].ref1Title?{ref1Title:u.cards[u.cards[e.nodeId]._planId].ref1Title}:{}),u.cards[u.cards[e.nodeId]._planId].ref2Title?{ref2Title:u.cards[u.cards[e.nodeId]._planId].ref2Title}:{}));var L=window.location.hash.split("/");return L[0]=L[0].replace("#",""),36!==L[0].length&&(L[0]=null),c.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},c.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},null===(t=e.fields)||void 0===t?void 0:t.map((function(t,r){return c.a.createElement("div",{key:"".concat(t,"_").concat(r),style:{position:"relative"}},c.a.createElement(M,{nodeId:j,field:t,customTitles:S,onChange:e.onChange?function(e){k.current&&w(e)}:null}))})),JSON.stringify(x)!==B?c.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){b(!g)}},c.a.createElement(m.a,{reverse:!0,icon:"clear_all",text:Object(A.w)("$__removeFilter","*"),onClick:function(){!function(){var t=Object(a.a)({},f.a.getState().searchs);t[j]&&delete t[j],e.reduxFunction("IMMEDIATE","SET_SEARCH",t),k.current&&w(Object(a.a)({},JSON.parse(B))),e.onSearch&&e.onSearch()}()}})):c.a.createElement(c.a.Fragment,null),(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.searchButton)?c.a.createElement(h.a,{color:Object(A.d)("menu"),icon:"search",onClick:function(){e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},f.a.getState().searchs),{},Object(n.a)({},j,Object(a.a)(Object(a.a)({},JSON.parse(B)),x)))),e.onSearch&&e.onSearch()},size:"15px",title:"".concat(Object(A.w)("$__search")),text:"".concat(Object(A.w)("$__search"))}):c.a.createElement(c.a.Fragment,null)))}))},25:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(1895),c=r(165),l=r(1),s=r(7),u=o.a.forwardRef((function(e,t){var r={root:Object(n.a)(Object(n.a)({},s.k),{},{color:Object(l.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(l.d)("mediumText"),marginTop:"standard"===Object(l.d)("fieldVariant")||"filled"===Object(l.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(l.d)("mediumText"),marginTop:"standard"===Object(l.d)("fieldVariant")||"filled"===Object(l.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:e.linecolor||Object(l.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(l.d)("fieldRadius"),"& fieldset":{borderColor:e.linecolor||Object(l.d)("line")},"&.Mui-focused fieldset":{borderColor:e.linecolor||Object(l.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(l.d)("fieldRadius"),"& fieldset":{borderColor:e.linecolor||Object(l.d)("line")},"&::before":{borderBottomColor:e.linecolor||Object(l.d)("line")},"&::after":{borderBottomColor:e.linecolor||Object(l.d)("line")},"&.Mui-focused":{borderBottomColor:e.linecolor||Object(l.d)("line"),"&::before":{borderBottomColor:e.linecolor||Object(l.d)("line")},"&::after":{borderBottomColor:e.linecolor||Object(l.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(l.d)("fieldVariant")?0:"filled"===Object(l.d)("fieldVariant")?"-15px":0,borderRadius:Object(l.d)("fieldRadius"),"& fieldset":{borderColor:e.linecolor||Object(l.d)("line")},"&::before":{borderBottomColor:e.linecolor||Object(l.d)("line")},"&::after":{borderBottomColor:e.linecolor||Object(l.d)("line")},"&.Mui-focused":{borderBottomColor:e.linecolor||Object(l.d)("line"),"&::before":{borderBottomColor:e.linecolor||Object(l.d)("line")},"&::after":{borderBottomColor:e.linecolor||Object(l.d)("line")}}}})},a=Object(c.a)(r)();return o.a.createElement(i.a,Object.assign({},e,{ref:t,className:a.root}))}));t.a=u},260:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(14),i=r(13),c=r(15),l=r(3),s=r(35),u=r(732),d=r(2),p=r(10),f=r(5),h=r(176),m=r(8),g=r(240),b=r(231),v=r(46),y=r(143),x={messagesContainer:{height:"100%",width:"100%"}},w=r(78),_=r(556);function O(){O=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var j=Object(o.b)(null,(function(e){return Object(i.b)(c,e)}))((function(e){var t=e.messages,r=e.type,n=e.nodeId,o=l.a.getState().functions.socket,i=a.a.useState([]),c=Object(f.a)(i,2),s=c[0],u=c[1],h=Object(_.a)(n),j=a.a.useRef(!0),E=a.a.createRef(),k=a.a.useRef({autoScrolling:!0}),S=a.a.useRef({}),L=a.a.useRef();a.a.useEffect((function(){JSON.stringify(t)!==JSON.stringify(s)&&u(t)}),[t]),a.a.useEffect((function(){return k.current=Object(d.a)(Object(d.a)({},k.current),{},{autoScrolling:!0}),E.current&&F(!0),C(),function(){S.current={},k.current={autoScrolling:!0}}}),[n,r]),a.a.useEffect((function(){parseInt(h)>0&&j.current&&k.current.autoScrolling&&C()}),[n,r]),a.a.useEffect((function(){j.current&&E.current&&F()}),[s]),a.a.useLayoutEffect((function(){j.current&&E&&F(!0)}),[]),a.a.useEffect((function(){var e,t;s.length>0&&j.current&&((!(null===(e=k.current)||void 0===e?void 0:e.mounted)||(null===k||void 0===k||null===(t=k.current)||void 0===t?void 0:t.messagesLength)&&s.length>k.current.messagesLength)&&(k.current=Object(d.a)(Object(d.a)({},k.current),{},{loading:!1,messagesLength:s.length}),k.current.mounted||(k.current=Object(d.a)(Object(d.a)({},k.current),{},{mounted:!0}))));parseInt(h)>0&&j.current&&k.current.autoScrolling&&C()}),[s]);var C=function(){var t=Object(p.a)(O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(w.a)(e,{readedBy:l.a.getState().session._id,id:n,db:e.db,type:r}),o.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:l.a.getState().session._id,id:n,db:e.db,type:r}),l.a.getState().chats.unreadeds[n]&&e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},l.a.getState().chats),{},{unreadeds:Object(d.a)(Object(d.a)({},l.a.getState().chats.unreadeds),{},Object(m.a)({},n,0))})),k.current=Object(d.a)(Object(d.a)({},k.current),{},{cleanMessages:!1});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=Object(p.a)(O().mark((function t(){var r,a,o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=l.a.getState().db.users[n]?"users":"cards",t.next=3,Object(w.f)(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[n],db:r,type:"comment",limit:!0,skip:s.length});case 3:(a=t.sent)&&(F(),o={reqMessages:!1},a.total<20&&(o=Object(d.a)(Object(d.a)({},o),{},{timelineEnd:!0})),k.current=Object(d.a)(Object(d.a)(Object(d.a)({},k.current),o),{},{reqMessages:!1}));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function T(e){var t=s[e];return S.current[t._id]+11||83}function D(t){var r,o=t.index,i=t.style,c=s[o];return(!k.current.lastMessage||k&&k.current&&k.current.lastMessage&&k.current.lastMessage<c.created_at)&&(k.current=Object(d.a)(Object(d.a)({},k.current),{},{lastMessage:c.created_at})),a.a.createElement("div",{style:i},a.a.createElement(y.a,{storie:c,openLightBox:function(t){j.current&&e.openLightBox(t)},hideCards:!!e.hideCards,db:e.db,nodeId:n,showUserName:!!(null===(r=l.a.getState().db)||void 0===r?void 0:r.cards[n]),onResize:function(e){!function(e,t){var r;S.current=Object(d.a)(Object(d.a)({},S.current),{},Object(m.a)({},e,t)),(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.resetAfterIndex)&&E.current.resetAfterIndex(0)}(c._id,e)}}))}var F=function(e){var r,n=s.length-1,a="end",o=k.current.length||0,i=(null===k||void 0===k||null===(r=k.current)||void 0===r?void 0:r.visibleStartIndex)||20;if(e&&E&&E.current)return a="end",void E.current.scrollToItem(s.length,a);E&&E.current&&(k.current.autoScrolling?(a="end",E.current.scrollToItem(t.length,a)):(a="start",n=s.length-o+i+1,E.current.scrollToItem(n<20?20:n,a)))},N=function(){var e=0;return S.current&&Object.keys(S.current).length&&Object.keys(S.current).forEach((function(t){e=e+S.current[t]+11})),e};return a.a.createElement("div",{style:x.messagesContainer,ref:L},a.a.createElement(b.a,{style:x.messagesContainer},(function(e){var t=e.height,r=e.width;return a.a.createElement(g.b,{className:"List",style:{paddingBottom:66},height:t,itemCount:s.length,itemSize:T,ref:E,width:r,onItemsRendered:function(e){k.current=Object(d.a)(Object(d.a)(Object(d.a)({},k.current),e),{},{length:s.length})},overscanCount:33,onScroll:function(e){var t,r=(null===L||void 0===L||null===(t=L.current)||void 0===t?void 0:t.offsetHeight)||0;if(j.current){var n=Object(d.a)({},k.current);"backward"===e.scrollDirection&&(e.scrollOffset+r<=N()-300&&(n=Object(d.a)(Object(d.a)({},n),{},{autoScrolling:!1})),!k.current.reqMessages&&!k.current.timelineEnd&&e.scrollOffset<100&&(n=Object(d.a)(Object(d.a)({},n),{},{reqMessages:!0}),I())),e.scrollOffset+r>N()-300&&(n=Object(d.a)(Object(d.a)({},n),{},{autoScrolling:!0}),h&&!k.current.cleanMessages&&(n=Object(d.a)(Object(d.a)({},n),{},{cleanMessages:!0}),C())),k.current=n}}},D)})),parseInt(h)>0&&!k.current.autoScrolling?a.a.createElement("div",{style:{position:"absolute",bottom:"33px",right:"15px",width:"33px",height:"33px"}},a.a.createElement(v.a,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){F(!0)}})):a.a.createElement(a.a.Fragment,null))})),E=r(20),k=r(11),S=r(69),L=r(25),C=r(33),I=r(22),T=r(34),D=r(275),F=r(55);function N(){N=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var A=Object(o.b)(null,(function(e){return Object(i.b)(c,e)}))(Object(T.a)(D.a)((function(e){var t=a.a.useState(""),r=Object(f.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(f.a)(i,2),l=c[0],s=c[1],u=a.a.useState([]),d=Object(f.a)(u,2),h=d[0],m=d[1],g=window.location.hash.split("/");g[0]=g[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return b()}),1e3);return s(!0),function(){return clearTimeout(t)}}}),[e.text]);var b=function(){var t=Object(p.a)(N().mark((function t(){var r;return N().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,F.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(),m(r.data),s(!1)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("/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%"}},l&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(S.a,null)),a.a.createElement(C.a,null,Object.keys(h).length>0&&a.a.createElement(I.a,{xs:12,sm:12,md:12,lg:12,xl:12},Object.keys(h).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(y.a,{messageClick:e.onAction?function(){}:null,searchText:e.text.trim(),storie:h[t],hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))}))))))}))),P=r(570),$=r(1);var M=Object(o.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(i.b)(c,e)}))(Object(T.a)(D.a)((function(e){var t=a.a.useState(""),r=Object(f.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(f.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!1),d=Object(f.a)(u,2),p=d[0],h=d[1],m=window.location.hash.split("/");return m[0]=m[0].replace("#",""),a.a.createElement("div",{style:{position:"relative",zIndex:10,padding:10,backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"25px"}},l?a.a.createElement(a.a.Fragment,null,a.a.createElement(L.a,{label:Object($.w)("$__searchInChat"),variant:Object($.d)("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(P.a,{position:"end"},a.a.createElement(k.a,{icon:"close",color:"lightgray",onClick:function(){o(""),h(!1),s(!1)}})),onChange:function(e,t){o(e.target.value),h(!0)},onBlur:function(){""===n&&(o(""),h(!1),s(!1))}},placeholder:Object($.w)("$__searchInChat"),value:Object($.q)(n).toLowerCase(),autoFocus:!0})):a.a.createElement(E.a,{title:Object($.w)("$__search",1),color:"grey",icon:"search",onClick:function(e){s((function(e){return!e}))},transparent:!0}),""!==n&&n.length>1&&p&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(S.a,null)),""!==n&&n.length>1&&a.a.createElement("div",{style:{position:"absolute",top:"50px",right:"15px",backgroundColor:"#FFFFFF",height:"auto",overflow:"hidden",overflowY:"auto",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.1)",maxHeight:"90vh",maxWidth:"666px",zIndex:2001}},a.a.createElement(A,{nodeId:e.nodeId,db:e.db,text:n,onFinish:function(e){h(!1)},onAction:function(t){e.onAction&&e.onAction(t),o(""),h(!1),s(!1)}})))}))),B=r(165),z=r(691);function Y(){Y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var R=Object(B.a)(z.a),G=Object(o.b)((function(e,t){var r=e.timeline;t.nodeId;return{timeline:r}}),(function(e){return Object(i.b)(c,e)}))((function(e){var t=R(),r=l.a.getState().session,o=a.a.useState(!1),i=Object(f.a)(o,2),c=i[0],s=i[1],u=e.timeline,m=a.a.useRef(!0);a.a.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]);var g=e.type||"comment",b=Object(n.useRef)(),v=e.nodeId?l.a.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{},y=l.a.getState().db.users[e.nodeId]?"users":"cards";Object(n.useEffect)((function(){return b.current={mounted:!0},function(){b&&b.current&&b.current.mounted&&(b.current.mounted=!1)}}),[]);var x=[],_=[];l.a.getState().db.cards[e.nodeId]&&u[e.nodeId]&&Object.keys(u[e.nodeId]).forEach((function(t){return _.push(u[e.nodeId][t])}));"kpi"===g&&function e(t){Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent===t&&l.a.getState().db.cards[e].kpi_useParent&&l.a.getState().db.cards[e].kpi_type===l.a.getState().db.cards[t].kpi_type})).forEach((function(t){l.a.getState().timeline[t]&&Object.keys(l.a.getState().timeline[t]).filter((function(e){return"kpi"===l.a.getState().timeline[t][e].type&&!l.a.getState().timeline[t][e].deleted})).map((function(e){return _.push(l.a.getState().timeline[t][e])})),e(t)}))}(e.nodeId),l.a.getState().db.users[e.nodeId]&&(u&&u[r._id]&&Object.keys(u[r._id]).filter((function(t){return u[r._id]&&u[r._id][t]&&u[r._id][t].user&&u[r._id][t].user._id===e.nodeId&&0===_.filter((function(e){return e._id===t})).length})).forEach((function(e){_.push(u[r._id][e])})),u&&u[e.nodeId]&&Object.keys(u[e.nodeId]).filter((function(t){return u[e.nodeId]})).forEach((function(t){_.push(u[e.nodeId][t])})),_=Object.keys(_).sort((function(e,t){return parseInt(_[e].created_at)<parseInt(_[t].created_at)?-1:parseInt(_[e].created_at)>parseInt(_[t].created_at)?1:0})).filter((function(t){return _[t].user&&_[t].user._id&&(_[t].user._id===r._id||_[t].user._id===e.nodeId)})).map((function(e){return _[e]}))),e.kpi_type&&(_=Object.keys(_).filter((function(t){return _[t].kpi_type===e.kpi_type||_[t].reply})).map((function(e){return _[e]})));var O=v&&v.kpi_ini?parseFloat(v.kpi_ini):0;if(a.a.useEffect((function(){if(m.current){var t=function(){var t=Object(p.a)(Y().mark((function t(){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.type?e.type:"comment",t.next=3,Object(w.f)(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(d.a)({ids:e.nodeId,db:y,type:r},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:_.filter((function(e){return e.type===r})).length>0?_.filter((function(e){return e.type===r})).length-1:0,reqChildrens:!1}));case 3:m.current&&s(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();m.current&&_.filter((function(e){return e.type===g})).length<10&&(s(!0),t())}}),[g,e.nodeId]),c)return 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(h.a,null));var E=Object.keys(_).length>0&&Object.keys(_).filter((function(e){return!(_[e].deleted&&!(_[e].deleted&&_[e].user&&_[e].user._id&&_[e].user._id===r._id)||!(_[e].type===g||_[e].reply&&Object.keys(_).filter((function(t){return _[t]&&_[t]._id===_[e].reply&&_[t].type===g})).length>0))})).sort((function(e,t){return _[e].created_at<_[t].created_at?-1:_[e].created_at>_[t].created_at?1:0})).map((function(e){var t=_[e];return O=parseFloat(parseFloat(O)+parseFloat(t.value)),t.balance=O,t.files&&Object.keys(t.files).length>0&&Object.keys(t.files).forEach((function(e,r){var n=t.files[e];x.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}},E&&E.length>0?a.a.createElement(j,{messages:E,hideCards:!!e.hideCards,db:e.db,type:g,nodeId:e.nodeId,openLightBox:function(t){var r;r=t,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:x,file:r})}}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),e.noSearch?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",top:0,right:0}},a.a.createElement(M,{db:y,nodeId:e.nodeId,onAction:function(e){}}))))}));t.a=Object(o.b)(null,(function(e){return Object(i.b)(c,e)}))((function(e){var t=e.nodeId,r=l.a.getState().session,n=l.a.getState().db.users[t]?"users":"cards",o=!!e.disabledSend&&e.disabledSend;return console.log(t),t&&e.disabledSend&&(!l.a.getState().db.cards[t]||l.a.getState().db.cards[t]&&l.a.getState().db.cards[t].onlyAdminsSendMessages&&l.a.getState().db.cards[t]._users&&l.a.getState().db.cards[t]._users[r._id]&&l.a.getState().db.cards[t]._users[r._id].access<4)&&(o=!0),"users"===n&&l.a.getState().db.users&&l.a.getState().db.users[t]&&l.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",zIndex:0}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:o?"0px":"70px"}},a.a.createElement(s.a,null,a.a.createElement(G,e))),o?l.a.getState().db.cards[t]&&"chatGroup"===l.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($.d)("menu")}},Object($.w)("$__onlyAdminsCanSendMessages",1)):a.a.createElement(a.a.Fragment,null):a.a.createElement(s.a,null,a.a.createElement(u.a,{db:e.db?e.db:"cards",nodeId:t,editorStyle:{padding:"7px"}})))}))},275:function(e,t,r){"use strict";t.a={}},291:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(11);t.a=function(e){return a.a.createElement("div",{style:{width:"100%",backgroundColor:"white",height:"100%",display:"flex",boxShadow:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"210px",alignSelf:"center"}},a.a.createElement(o.a,{size:40,icon:e.icon?e.icon:"close",style:{alignSelf:"center"}}),a.a.createElement("p",{style:{margin:"0px",marginLeft:"10px",alignSelf:"center",fontSize:"16px",fontWeight:"bold",color:"rgba(0, 0, 0, 0.67)"}},e.title?e.title:"Visualiza\xe7\xe3o n\xe3o disponivel com filtro de per\xedodo")))}},3:function(e,t,r){"use strict";var n=r(13),a=r(1221),o=r(1151),i=r(43),c=r(19),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=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_CARDS"===t.action&&t.value?Object(l.a)({},t.value):e},f={open:!1,nodeId:null,activeChats:[],activeModule:"users",groups:{},notifications:!0},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,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)({},f):e},m={timelines:{},unreadeds:{},drafts:{}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,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)({},m):e},b={sideModuleWindow:!1,period:"$__last7Days",users:{},showDeleted:!1,hidePrivate:!1,lockPrivate:!1,unlockedPrivates:0,board:null,toCopyMove:null,selectedCards:null,addCard:{},importUsers:!1,agileOrderBy:"name",agileOrderDesc:"DESC"},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0;return"SET_CONTROL"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"RESET_CONTROLS"===t.action?Object(l.a)({},e):e},y=r(662),x={},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,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},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_FORMS"===t.action&&t.value?Object(l.a)({},t.value):e},O={},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},E={open:!1,miro:!1,files:[],file:0},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,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)({},E):e},S={total:0,lastNotification:0,firstNotification:0},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,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},C={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},T=r(310),D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T.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?T.a:e},F=r(552),N=r.n(F),A=r(1158),P=r.n(A),$={custom:{ColumnTitleColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",customLogo:N.a,loginBackground:P.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,disabledTour:!1},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,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},B={cards:{load:{}},timeline:{load:{}}},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,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},Y={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,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)({},Y):e},G={},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,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},W={},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0;return"SET_TIMELINE_LOADER"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},q={cards:{},timeline:{}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,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},J={users:{}},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,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},K={typing:{}},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,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)({},K):e},Q={},ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=arguments.length>1?arguments[1]:void 0;return"SET_SEARCH"===t.action&&t.value?Object(l.a)({},t.value):e},te={},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0;return"SET_OVERVIEW_NAV"===t.action&&t.value?Object(l.a)({},t.value):e},ne=r(494);function ae(){ae=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var oe=ae().mark(le),ie=ae().mark(se);function ce(e){return e.next&&e.next(),!0}function le(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ne.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(ne.b)(ce,e);case 4:case"end":return t.stop()}}),oe)}function se(){return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ne.a)([Object(ne.e)("ASYNC",le),Object(ne.d)("IMMEDIATE",le)]);case 2:case"end":return e.stop()}}),ie)}var ue=Object(a.a)(),de=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,cards:p,chat:h,chatTyping:Z,chats:g,controls:v,db:y.a,functions:w,languages:j,lightBox:k,notifications:L,overviewNav:re,preLoader:I,search:D,searchs:ee,session:M,sessionLoads:z,sideModule:R,timeline:H,timelineLoader:U,toLoad:V,usersStatus:X,forms:_}),Object(n.a)(ue,Object(o.routerMiddleware)(i.a)));ue.run(se);t.a=de},300:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(405),i=r(34),c=r(165),l=r(14),s=r(13),u=r(15),d=Object(i.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}}}}))(o.a),p=Object(i.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}}}}))(o.a),f=Object(c.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));t.a=Object(l.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(s.b)(u,e)}))((function(e){var t=f();return a.a.createElement("div",{className:t.root},e.status&&"online"!==e.status?a.a.createElement(p,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children):a.a.createElement(d,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children))}))},301:function(e,t,r){"use strict";var n=r(10),a=r(5),o=r(0),i=r.n(o),c=r(14),l=r(13),s=r(15),u=r(238),d=r(34),p=r(458);function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}t.a=Object(c.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(l.b)(s,e)}))(Object(d.a)(p.a)((function(e){var t,r=i.a.useState((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.values)||[]),o=Object(a.a)(r,2),c=o[0],l=o[1];i.a.useEffect((function(){var t;if(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.values){var r=[];e.data.values.filter((function(e){return e.value})).forEach((function(e){r.push(e)})),l(r)}}),[e.data]);var s=function(){var t=Object(n.a)(f().mark((function t(r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),l(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement("div",null,i.a.createElement(u.a,{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:!e.noAdd,add:!0,colorPicker:!0,multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:c,placeholder:e.placeholder||null,onChange:function(e){s(e)},colorPickerCallBack:function(t){e.colorPickerCallBack&&e.colorPickerCallBack(t)}}))})))},310:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n={tags:[],userGroups:[],users:{userGroup:[],selected:{}},units:{userGroup:[],selected:{}},clients:{userGroup:[],selected:{}},groups:{userGroup:[],selected:{}},plans:{userGroup:[],selected:{}},sideModuleWindow:!1,clearFilter:!1,text:"",cards:{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},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},kpiType:[],iniKpiValue:null,endKpiValue:null}}},33:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(61),a=r(0),o=r.n(a),i=r(165),c=r(917),l=["children","className"],s=Object(i.a)({grid:{margin:"0",width:"100%"}});function u(e){var t=s(),r=e.children,a=e.className,i=Object(n.a)(e,l);return o.a.createElement(c.a,Object.assign({container:!0},i,{className:t.grid+" "+a}),r)}},335:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(11),l=r(165),s=r(1223),u=r(1),d=Object(l.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:Object(u.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 p(e){var t=d(),r=i.a.useState(!1),o=Object(a.a)(r,2),l=o[0],p=o[1],h=i.a.useState(e.icon?e.icon:"add_photo_alternate"),m=Object(a.a)(h,2),g=m[0],b=m[1];return i.a.useEffect((function(){b(e.icon)}),[e.icon]),i.a.createElement("div",{style:Object(n.a)({},e.style?e.style:{})},l?i.a.createElement(s.a,{className:t.backdrop,open:l,onClick:function(){return p(!1)}},i.a.createElement("div",{className:t.box},f&&Object.keys(f).map((function(r,n){return i.a.createElement("div",{key:n,className:t.list},i.a.createElement("div",{className:t.title},r),i.a.createElement("div",{className:t.iconList},f[r]&&f[r].map((function(r,n){return i.a.createElement("div",{key:n,className:t.icon},i.a.createElement(c.a,{icon:r,size:"30px",color:e.color?e.color:Object(u.d)("color"),onClick:function(){b(r),p(!1),e.callBack&&e.callBack(r),e.onChange&&e.onChange(r)}}))}))))})))):i.a.createElement(c.a,{icon:g,color:e.color?e.color:Object(u.d)("color"),size:e.size||"30px",onClick:function(){e.onChange&&p(!0)}}))}var f={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"]}},336:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(1215),s=r(569),u=r(20),d=r(568),p=r(360),f=r(567),h=r(1),m=r(38);function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=function(e){var t=c.a.useState(!1),r=Object(o.a)(t,2),i=r[0],b=r[1],v=c.a.useState(e.color?e.color:"rgba(200,200,200,1)"),y=Object(o.a)(v,2),x=y[0],w=y[1],_=c.a.useRef(null),O=function(t){_.current&&_.current.contains(t.target)||(b(!1),e.onClose&&e.onClose())},j=function(){var t=Object(a.a)(g().mark((function t(r){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.onChange&&e.onChange(r),b(!i),!e._id){t.next=5;break}return t.next=5,m.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:_,style:{margin:3,cursor:"pointer"},onClick:function(e){b((function(e){return!e}))}},c.a.createElement("div",{onClick:function(e){}},e.children)):c.a.createElement("div",{ref:_,style:Object(n.a)(Object(n.a)({},e.label?{borderRadius:7,padding:7,color:x?Object(h.u)(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(){b((function(e){return!e}))}},e.label?e.label:""),c.a.createElement(f.a,{open:i,anchorEl:_.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:O},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(h.w)("$__cancel",1),color:"lightgrey",icon:"close",onClick:function(){w(e.color?e.color:"rgba(200,200,200,1)"),b(!i)},size:"30px"}),e.color?c.a.createElement(u.a,{title:Object(h.w)("$__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(h.w)("$__saveColor",1),color:"green",icon:"save",onClick:function(){j(x)},size:"30px"})),c.a.createElement(l.a,{color:x,onChange:function(e,t){w("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"}})))))})))}},343:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(6),c=r.n(i),l=r(11),s=r(150),u=r(135),d=r(1);t.a=function(e){var t=e.data;if(!(t&&t._users&&Object.keys(t._users).length>0))return o.a.createElement(o.a.Fragment,null);var r=t._users?t._users:{};return o.a.createElement("div",null,r&&Object.keys(r).length>0&&0===Object.keys(r).filter((function(t){return"null"!==String(t)&&(!e.customDefine||e.customDefine&&e.customDefine.name&&r[t]&&r[t][e.customDefine.name])})).length?Object(d.w)("$__selectUsers"):o.a.createElement("div",{style:{display:"flex"}},Object.keys(r).filter((function(t){return"null"!==String(t)&&(!e.customDefine||e&&e.customDefine&&e.customDefine.name&&r&&r[t]&&r[t][e.customDefine.name])})).sort((function(e,t){return r[e].isResponsible?-1:r[t].isResponsible?1:r[e].name<r[t].name?-1:r[e].name>r[t].name?1:0})).filter((function(t,n){return!!(n<=(e.noLimit?7:e.limit?e.limit:7)&&r[t]&&r[t].name)})).map((function(t,a){var i=!1,p=!!(Object.keys(r).length>1&&r[t].isResponsible),f=!(!e.customDefine||!e.customDefine.name)&&!!(Object.keys(r).length>1&&r[t][e.customDefine.name]);r[t].myDay&&r[t].myDay&&c()(1e3*parseInt(r[t].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===c()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(i=!0);var h=e.noLimit?7:e.limit?e.limit:7;if(a<h)return o.a.createElement("div",{key:t,style:{marginLeft:-7,position:"relative"}},o.a.createElement(u.a,{title:"".concat(r[t].name).concat(i?" (".concat(Object(d.w)("$__inMyDay"),")"):""),key:t},o.a.createElement("div",{overlap:"circular",alt:r[t].name,src:r[t].image||null,style:Object(n.a)(Object(n.a)({width:i||p?"30px":e.avatarSize?e.avatarSize:"24px",height:i||p?"30px":e.avatarSize?e.avatarSize:"24px",borderRadius:"50%"},e.customDefine?{border:f?e.customDefine.avatarBorder||"3px green solid":"none"}:{border:p?"3px deepskyblue solid":i?"2px #ff8800 solid":"none"}),{},{backgroundImage:r[t].image?'url("'.concat(r[t].image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center"})},r[t].image?"":r[t].name.substr(0,1))),i&&o.a.createElement("div",{style:{position:"absolute",backgroundColor:"#ff8800",width:"14px",height:"14px",borderRadius:"14px",display:"flex",alignItems:"center",justifyContent:"center",right:"7px",bottom:0}},o.a.createElement(l.a,{icon:"hourglass_top",size:"10px",color:"#FFFFFF"})));if(a===h){var m=Object.keys(r).length-h;return o.a.createElement(u.a,{title:o.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(r).sort((function(e,t){return r[e].isResponsible?-1:r[t].isResponsible?1:r[e].name<r[t].name?-1:r[e].name>r[t].name?1:0})).filter((function(e,t){return!!(t>=h&&r[e]&&r[e].name)})).map((function(t,a){return o.a.createElement("li",{key:t,style:{display:"flex",alignItems:"center"}},o.a.createElement(s.a,{overlap:"circular",alt:r[t].name,src:r[t].image||null,style:Object(n.a)(Object(n.a)({width:e.avatarSize?e.avatarSize:"22px",height:e.avatarSize?e.avatarSize:"22px",border:r[t].isResponsible?"3px deepskyblue solid":r[t].myDay?"2px #ff8800 solid":"none"},e.customDefine?{border:r[t][e.customDefine.name]?"3px green solid":"none"}:{border:r[t].isResponsible?"3px deepskyblue solid":r[t].myDay?"2px #ff8800 solid":"none"}),{},{marginRight:7})},r[t].name.substr(0,1)),r[t].name)}))),key:a},o.a.createElement(s.a,{style:{width:e.avatarSize?e.avatarSize:27,height:e.avatarSize?e.avatarSize:27,border:"none"},alt:"+".concat(m)},o.a.createElement("span",{style:{fontSize:10}},"+".concat(m))))}return o.a.createElement(o.a.Fragment,null)}))))}},344:function(e,t,r){"use strict";var n=r(10),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(378),s=r.n(l),u=r(6),d=r.n(u),p=r(11),f=r(555),h=r(144),m=r(25),g=r(20),b=r(34),v=r(14),y=r(13),x=r(15),w=r(3),_=r(1),O=r(24),j=r(455),E=r(688),k=(r(801),r(35));function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(802);t.a=Object(v.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(y.b)(x,e)}))(Object(b.a)(j.a)((function(e){var t,r=e.classes,i=w.a.getState(),l=i.db,u=i.session,b=l.cards,v=c.a.useState(!1),y=Object(o.a)(v,2),x=y[0],j=y[1],L=c.a.useState(!1),C=Object(o.a)(L,2),I=C[0],T=C[1],D=c.a.useState({}),F=Object(o.a)(D,2),N=F[0],A=F[1],P=e.data,$=c.a.useState([]),M=Object(o.a)($,2),B=M[0],z=M[1],Y=c.a.useState(d()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT06:00")),R=Object(o.a)(Y,2),G=R[0],H=R[1],W=c.a.useState(d()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT07:00")),U=Object(o.a)(W,2),q=U[0],V=U[1],J=c.a.useState(!1),X=Object(o.a)(J,2),K=X[0],Z=X[1],Q=c.a.useState(0),ee=Object(o.a)(Q,2),te=ee[0],re=ee[1],ne=c.a.useState(1),ae=Object(o.a)(ne,2),oe=ae[0],ie=ae[1],ce=c.a.useRef(!0),le="time"===P.kpi_type&&P.kpi_ini?parseFloat(P.kpi_ini):0,se="time"===P.kpi_type&&P.kpi_fin?parseFloat(P.kpi_fin):0;c.a.useEffect((function(){return function(){ce.current=!1}}),[]),c.a.useEffect((function(){t&&clearTimeout(t),pe(),de(e.data._id)}),[I]),c.a.useEffect((function(){t&&clearTimeout(t),pe(),de(e.data._id)}),[JSON.stringify(e.card[e.data._id])]);var ue=[e.data._id],de=function e(t,r){var n=Object.keys(b).filter((function(e){return b[e].kpi_useParent&&b[e]._parent===t}));return n.length>0?n.forEach((function(t){e(t,!0),ue.push(t),z(Array.from(new Set(ue)))})):r||z(ue),n},pe=function(){var t=Object(a.a)({},w.a.getState().db.cards[e.data._id]);if(t&&t._kpiTimer&&Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===u._id})).length>0){var r=Object(a.a)({},t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===u._id}))[0]]);r.diff=d()().tz("America/Sao_Paulo").unix("x")-r.created_at,r&&r.updated_at&&(r.diff=parseInt(r.updated_at)-parseInt(r.created_at)),fe(r,!!r.updated_at)}else j(!1),A({}),T(!1);0===Object.keys(N).length&&e.manualAdd&&(A({created_at:d()(G).tz("America/Sao_Paulo").unix("X"),updated_at:d()(q).tz("America/Sao_Paulo").unix("X")}),fe({created_at:d()(G).tz("America/Sao_Paulo").unix("X"),updated_at:d()(q).tz("America/Sao_Paulo").unix("X")},!!N.updated_at))},fe=function(e,r){var n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(a.a)({},e),c=!1;if(i.diff?n=parseInt(i.diff):(n=parseInt(e.updated_at-e.created_at),e.updated_at-e.created_at<0&&(n=null)),n||K)if(n<60)i.diffText="".concat(i.diff," ").concat(Object(_.w)("$__seconds",1)),o||ie(0);else if(n>=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;i.diffText="".concat(l," hora").concat(l>1?"s":""," ").concat(s," ").concat(Object(_.w)("$__minutes",1)," ").concat(u," ").concat(Object(_.w)("$__seconds",1)),o||(ie(l),re(s))}else{var p=Math.trunc(n/60)>0?Math.trunc(n/60):0,f=(n-=60*p)>0?n:0;i.diffText="".concat(p," ").concat(Object(_.w)("$__minutes",1)," ").concat(f," ").concat(Object(_.w)("$__seconds",1)),o||(ie(0),re(p))}else i.diffText=Object(_.w)("$__theEndMustBeGreaterThanTheBeginning");A(Object(a.a)(Object(a.a)({},N),i)),e.updated_at?(i.diff=parseInt(e.updated_at)-parseInt(e.created_at),x||j(!0)):(i.diff=d()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),I||(T(!0),c=!0)),r||e.updated_at||!c||(t=setTimeout((function(){pe()}),1e3))};if(!P)return null;var he=function(){var t=Object(n.a)(S().mark((function t(){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(O.w)(e,P._id);case 2:(r=t.sent)&&(console.log(r),fe(r),T(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),me=function(){var t=Object(n.a)(S().mark((function t(){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return T(!1),t.next=3,Object(O.x)(e,P._id);case 3:(r=t.sent)&&A(Object(a.a)(Object(a.a)({},N),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ge=Object(a.a)({},E.model),be=[],ve=[],ye={};B.forEach((function(e){ye=Object(a.a)(Object(a.a)({},ye),l.cards[e]._timeline||{})})),ye=Object.keys(ye).filter((function(e){return"kpi"===ye[e].type})).map((function(e){return ye[e]}));var xe="time"!==P.kpi_type?parseFloat(le):0,we=parseFloat(le)-parseFloat(se);we<0&&(we*=-1),ye&&Object.keys(ye).length>0&&Object.keys(ye).sort((function(e,t){return ye[e].created_at<ye[t].created_at?-1:1})).forEach((function(e,t){xe=parseFloat(xe)+parseFloat(ye[e].value),be.push({meta:ye[e].value,total:xe,value:parseFloat(le)>parseFloat(se)?100-Math.floor(100*xe/we):Math.floor(100*xe/we)}),ve.push(t+1),t+1===Object.keys(ye).length&&(ge=Object(a.a)(Object(a.a)({},ge),{},{data:{labels:ve,series:[[].concat(be)]},options:Object(a.a)(Object(a.a)({},ge.options),{},{low:0,high:100,plugins:[s.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+Object(_.h)(e,"time"===P.kpi_type?"number":P.kpi_type)+"<br>"+Object(_.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var _e=le<se?se-le:le-se;ye&&Object.keys(ye).length>0&&Object.keys(ye).forEach((function(e){_e=parseFloat(_e)+parseFloat(ye[e].value)}));var Oe=Math.ceil(le<se?se-le:le-se);return(Oe=100*Math.ceil(_e)/Oe-100)<0&&(Oe*=-1),e.data?c.a.createElement("div",{className:r.root},c.a.createElement("fieldset",null,c.a.createElement("legend",{style:{color:Object(_.d)("color")}},e.manualAdd?Object(_.w)("$__timerLog",1):Object(_.w)("$__timer",1)),e.manualAdd&&c.a.createElement(c.a.Fragment,null,K?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"schedule"}),c.a.createElement(m.a,{label:Object(_.w)("$__initialDate",1),variant:Object(_.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"date",inputProps:{max:d()().format("YYYY-MM-DD"),autoComplete:"start-date",onChange:function(e){d()(e.target.value).isValid()&&H(e.target.value);var t=N.updated_at-N.created_at;fe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()("".concat(e.target.value," 00:00:00")).unix("X"),updated_at:d()("".concat(e.target.value," 00:00:00")).unix("X")+t}),!0,!0)}},value:G}))):c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"schedule"}),c.a.createElement(m.a,{label:Object(_.w)("$__initialDate",1),variant:Object(_.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{max:q,autoComplete:"start-date",onChange:function(e){d()(e.target.value).isValid()&&(H(e.target.value),fe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:G})),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"watch_later"}),c.a.createElement(m.a,{label:Object(_.w)("$__finalDate",1),variant:Object(_.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:G,autoComplete:"new-password",onChange:function(e){d()(e.target.value).isValid()&&(V(e.target.value),fe(Object(a.a)(Object(a.a)({},N),{},{updated_at:d()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:q}))),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"more_time"}),c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},c.a.createElement(m.a,{label:Object(_.w)("$__hours",1),variant:Object(_.d)("fieldVariant",1),name:"hours",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,autoComplete:"hours",onChange:function(e){ie(e.target.value),Z(!0),G.indexOf("T")>-1&&H(G.substring(0,10)),fe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X"),updated_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X")+60*e.target.value*60+60*te}),!0,!0)}},value:oe,style:{paddingLeft:7,paddingRight:7}}),c.a.createElement(m.a,{label:Object(_.w)("$__minutes",1),variant:Object(_.d)("fieldVariant",1),name:"minutes",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,max:59,autoComplete:"new-password",onChange:function(e){re(e.target.value),Z(!0),G.indexOf("T")>-1&&H(G.substring(0,10)),fe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X"),updated_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X")+60*oe*60+60*e.target.value}),!0,!0)}},value:te,style:{paddingLeft:7,paddingRight:7}}),c.a.createElement(g.a,{title:Object(_.w)("$__reset",1),icon:"update_disabled",color:Object(_.d)("menu"),onClick:function(){Z(!1),H("".concat(G," 00:00:00"))},size:"17px",style:{marginLeft:3,marginRight:3,backgroundColor:"rgba(0,0,0,0.05)",padding:3},transparent:!0}))),c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}}),N&&N.diffText&&c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"hourglass_full"}),c.a.createElement("div",{className:"text"},N.diffText)),parseInt(l.cards[P._id]._users[u._id].access)>=3?c.a.createElement(k.a,null,c.a.createElement(h.a,{includeMe:!0,data:l.cards[P._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){fe(Object(a.a)(Object(a.a)({},N),{},{to:e}),!0)}})):c.a.createElement(c.a.Fragment,null)),x||e.manualAdd?c.a.createElement("div",null,!e.manualAdd&&N&&N.created_at&&N.updated_at&&N.diffText&&d()(1e3*N.created_at).isValid()&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"schedule"}),c.a.createElement("div",{className:"text"},d()(1e3*N.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"watch_later"}),c.a.createElement("div",{className:"text"},d()(1e3*N.updated_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"hourglass_full"}),c.a.createElement("div",{className:"text"},N.diffText))),N.created_at<N.updated_at?c.a.createElement(k.a,null,c.a.createElement(f.a,{manualAdd:!!e.manualAdd,data:P,timer:N,manualEntry:K,callBack:function(){j(!1),e.callBack&&e.callBack()}})):c.a.createElement(c.a.Fragment,null)):c.a.createElement("div",{className:r.time},I?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",onClick:function(){Object(_.c)({message:Object(_.w)("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){me()}})}},"pause_circle_filled"),c.a.createElement("div",{className:"text"},N.diffText)):c.a.createElement(c.a.Fragment,null,se&&xe?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:60*se<xe?"red":"color",icon:"schedule"}),c.a.createElement("div",{className:"text",style:{color:60*se<xe?"red":"grey"}},Object(_.w)("$__timeLeft",1),": ",60*se-xe>-60&&60*se-xe<60?"".concat(60*se-xe," ").concat(Object(_.w)("$__seconds",1)," "):"".concat(Math.trunc((60*se-xe)/60)," ").concat(Object(_.w)("$__minutes",1)," ").concat(60*se-xe-60*Math.trunc((60*se-xe)/60)," ").concat(Object(_.w)("$__seconds",1)," "))):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",onClick:function(){he()},title:Object(_.w)("$__playRegisterLogWork")},"play_circle_outline"),c.a.createElement("span",{style:{marginLeft:7,color:Object(_.d)("color")}},Object(_.w)("$__startStopWatch"))))))):c.a.createElement("div",null,"NO DATA RECEIVED")})))},345:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(1),i={containerNoShadow:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",border:"0.5px solid ".concat(Object(o.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",minWidth:"150px",display:"flow-root"}),container:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",border:"0.5px solid ".concat(Object(o.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",minWidth:"150px",display:"flow-root",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(o.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(o.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(o.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"}}};t.a=i},35:function(e,t,r){"use strict";var n=r(30),a=r(31),o=r(40),i=r(41),c=r(0),l=r.n(c),s=r(553),u=r.n(s),d=r(497),p=r(1),f=r(38),h=function(e){Object(o.a)(r,e);var t=Object(i.a)(r);function r(e){var a;return Object(n.a)(this,r),(a=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},a}return Object(a.a)(r,[{key:"componentDidCatch",value:function(e,t){var r,n;this.setState({error:e,errorInfo:t});var a={hostname:window.location.hostname,pathname:window.location.pathname,hash:window.location.hash,message:(null===(r=this.props)||void 0===r?void 0:r.message)?"".concat(this.props.message," : ").concat(e.message):e.message,stack:t.componentStack,component:t.componentStack};console.log({SUPPORT_ID:u.a.MD5(JSON.stringify(e)).toString(),error:{hostname:window.location.hostname,pathname:window.location.pathname,hash:window.location.hash,message:(null===(n=this.props)||void 0===n?void 0:n.message)?"".concat(this.props.message," : ").concat(e.message):e.message,stack:t.componentStack,component:t.componentStack}}),f.a.post("/ErrorBoundary/add",{_id:Object(d.a)(),uid:u.a.MD5(JSON.stringify(a)).toString(),origin:"web",error:a})}},{key:"render",value:function(){return this.state.hasError?l.a.createElement("div",null,Object(p.w)("$__ComponentErrorRefreshOrSupportMessage")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),r}(l.a.Component);t.a=h},352:function(e,t,r){"use strict";var n,a=r(88),o=r(8),i=r(2),c=r(10),l=r(5),s=r(0),u=r.n(s),d=r(71),p=r(81),f=r(6),h=r.n(f),m=r(14),g=r(13),b=r(15),v=r(3),y=r(20),x=r(50),w=r(11),_=r(25),O=r(34),j=r(689),E=r(1),k=r(24),S=r(182);function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var C,I=d.b.div(n||(n=Object(a.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(E.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            "})),T=Object(m.b)((function(){return{}}),(function(e){return Object(g.b)(b,e)}))(Object(O.a)(j.a)((function(e){var t=e.classes,r=v.a.getState().db,n=e.data&&e.data._id?v.a.getState().db.cards[e.data._id]:{},a=u.a.useState(n.name?n.name:""),o=Object(l.a)(a,2),s=o[0],d=o[1],p=u.a.useState(!1),f=Object(l.a)(p,2),h=f[0],m=f[1],g=u.a.useState(!1),b=Object(l.a)(g,2),O=b[0],j=b[1],C=function(){var t=Object(c.a)(L().mark((function t(r){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.N)(Object(i.a)(Object(i.a)({},e),{},{data:{_id:n._id}}),r),m(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var e=Object(c.a)(L().mark((function e(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(E.c)({message:Object(E.w)("$__confirmDeleteThisFullDescription",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){C({deleted:!0})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return u.a.createElement(I,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}),u.a.createElement("div",e.provided&&e.provided.dragHandleProps,h?u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},u.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},u.a.createElement(_.a,{label:Object(E.w)("$__taskTitle"),variant:Object(E.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){d(e.target.value)},onBlur:function(e){""===e.target.value&&m(!h)},onKeyDown:function(e){13===e.keyCode&&s&&C({name:s}),27===e.keyCode&&(m(!h),d())}},autoFocus:!0,value:s,placeholder:Object(E.w)("$__taskTitlePlaceholder")})),u.a.createElement("div",{style:{display:"flex"}},u.a.createElement("div",{onClick:function(){return C({name:s})}},u.a.createElement(w.a,{color:"green",icon:"save",title:Object(E.w)("$__save","*"),size:e.actionsSize||"25px"})),u.a.createElement("div",{onClick:function(){m(!h),d("")}},u.a.createElement(w.a,{color:Object(E.d)("medium"),icon:"cancel",title:Object(E.w)("$__cancel","*"),size:e.actionsSize||"25px"}))))):u.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},onMouseOver:function(){j(!0)},onMouseLeave:function(){j(!1)}},u.a.createElement("div",Object.assign({style:{width:"100%",padding:"0px 7px",wordBreak:"break-word"},onDoubleClick:function(){m(!h)}},e.provided?{provided:e.provided}:{},e.snapshot?{snapshot:e.snapshot}:{}),e.showCard?u.a.createElement(x.a,{db:"cards",cardId:e.data._id,viewTimer:!0,viewAllName:!0}):n.name?n.name:Object(E.w)("$__new",1)),"completed"!==n.status||e.showCard?u.a.createElement(u.a.Fragment,null):u.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"}},u.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?u.a.createElement("div",{style:{position:"absolute",right:33,top:"calc(50% - 15px)",fontSize:10,textAlign:"right",backgroundColor:"#f1f1f1",paddingLeft:7}},Object(E.k)(n.completed_at)):u.a.createElement(u.a.Fragment,null)),O&&e.permission&&!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&u.a.createElement("div",{style:{display:"flex",alignItems:"center"}},u.a.createElement(y.a,{title:Object(E.w)("$__undoConclude",1),color:"lightgrey",icon:"delete_forever",onClick:function(){return T()},transparent:!0}),n.checklist?u.a.createElement(y.a,{title:Object(E.w)("$__turnIntoActivity",1),color:"lightgrey",icon:"change_circle",onClick:function(){Object(E.c)({message:Object(E.w)("$__confirmTurnIntoActivity",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){C({checklist:null})}})},transparent:!0}):u.a.createElement(u.a.Fragment,null)),(!e.showCard||!e.dragStatus&&e.showCard)&&u.a.createElement(y.a,{title:"completed"!==n.status?Object(E.w)("$__conclude",1):Object(E.w)("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){n._hasStep?Object(S.a)(Object(i.a)(Object(i.a)({},e),{},{nodeId:n._id})):Object(k.I)(e,n)},transparent:!0}))),e.locked?u.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"}},u.a.createElement("div",{style:{display:"flex"}},u.a.createElement(w.a,{color:"lightgray",icon:"lock",size:"22px"}))):u.a.createElement(u.a.Fragment,null))}))),D=r(59),F=r(46);function N(){N=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var A=d.b.div(C||(C=Object(a.a)(["\n            background-color:none\n            ","\n            "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""}));t.a=Object(m.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(g.b)(b,e)}))((function(e){var t=v.a.getState(),r=t.db,n=t.session,a=v.a.getState().functions.socket,s=u.a.useState(!1),d=Object(l.a)(s,2),f=d[0],m=d[1],g=u.a.useState(!1),b=Object(l.a)(g,2),x=b[0],w=b[1],_=h()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),O=window.location.hash.split("/");O[0]=O[0].replace("#",""),36!==O[0].length&&(O[0]=null);var j={};v.a.getState().db[e.db]&&v.a.getState().db[e.db][e.nodeId]&&(j=v.a.getState().db[e.db][e.nodeId]);var S=Object.keys(v.a.getState().db.cards).filter((function(t){return!(e.myDay||"step"===v.a.getState().db.cards[t].type||!(!e.noChecklist&&v.a.getState().db.cards[t]&&!v.a.getState().db.cards[t].deleted&&v.a.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!v.a.getState().db.cards[t].deleted&&v.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&&h()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===_&&v.a.getState().db.cards[t])||v.a.getState().db.cards[t].deleted)})).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})),L=function(){var t=Object(c.a)(N().mark((function t(n){var c,l,s,u,d;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(!1),c=n.destination,l=n.source,s=n.draggableId,c){t.next=4;break}return t.abrupt("return",!1);case 4:if(c.droppableId!==l.droppableId||c.id!==l.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(u=Array.from(S.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(l.index,1),t.next=10,setTimeout(500);case 10:return u.splice(c.index,0,s),t.next=13,setTimeout(500);case 13:return a.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),d=Object(i.a)({},v.a.getState().db.cards),t.next=17,new Promise((function(e,t){u.forEach((function(t,r){d=Object(i.a)(Object(i.a)({},d),{},Object(o.a)({},t,Object(i.a)(Object(i.a)({},d[t]),{},{order:"".concat(r+1)}))),r+1===u.length&&e(!0)}))}));case 17:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(i.a)(Object(i.a)({},r),{},{cards:Object(i.a)(Object(i.a)({},r.cards),d)})),t.abrupt("return");case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(){var e=Object(c.a)(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=Object(c.a)(N().mark((function e(t){return N().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)}}(),P=S.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})),$=Object.keys(r.cards).filter((function(t){return r.cards[t]._parent===e.nodeId&&!r.cards[t].deleted&&"step"===r.cards[t].type})).length>0;return u.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},e.permission?u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{style:{width:"96%",position:"relative",margin:"2%",padding:"3px 10px",border:"solid 1px rgba(0,0,0,0.1)",justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"}},u.a.createElement("div",{style:{width:"100%",color:"lightgray",textAlign:"center",padding:3}},Object(E.w)($?"$__thisActivitieHasABoardExplain":"$__createActivitieABoardExplain")),u.a.createElement(y.a,{title:Object(E.w)($?"$__openThisBoard":"$__createNewBoard"),text:Object(E.w)($?"$__openThisBoard":"$__createNewBoard"),color:Object(E.d)("menu"),textColor:Object(E.d)("menu"),icon:"schema",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},v.a.getState().control),{},{board:e.nodeId})),e.reduxFunction("ASYNC","CLEAR_MODULE")},size:"25px"})),u.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",alignItems:"center",padding:"3px 10px",justifyContent:"center"}},u.a.createElement("div",{style:{marginRight:15}},Object(E.w)("$__requireConcludedByStep")),u.a.createElement(D.a,{checked:!!j.listStepLock,onChange:function(){Object(k.N)(Object(i.a)(Object(i.a)({},e),{},{data:{_id:j._id}}),{listStepLock:!j.listStepLock})},name:"listStepLock",inputProps:{"aria-label":"secondary checkbox"}}))):u.a.createElement(u.a.Fragment,null),e.showProgress&&S.length>0?u.a.createElement("div",{style:{position:"relative",width:"100%"}},u.a.createElement("div",{style:{position:"absolute",right:7,bottom:0,fontSize:9,color:Object(E.d)("menu"),fontWeight:"bold"}},S.filter((function(e){return"completed"===r.cards[e].status})).length,"/",u.a.createElement("span",{style:{fontWeight:"normal"}},S.length)),u.a.createElement("div",{style:{position:"relative",width:"100%",height:5,backgroundColor:"lightGray"}},u.a.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,backgroundColor:Object(E.d)("menu"),width:"".concat(100/S.length*S.filter((function(e){return"completed"===r.cards[e].status})).length,"%")}}))):u.a.createElement(u.a.Fragment,null),S.filter((function(e){return"completed"!==r.cards[e].status})).length>0?u.a.createElement(p.a,{onDragEnd:L,onDragStart:C,onDragUpdate:I},u.a.createElement(p.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return u.a.createElement(A,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),P.map((function(t,n){return u.a.createElement(p.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(a,o){return u.a.createElement(T,{dragStatus:f,provided:a,snapshot:o,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:j.listStepLock&&n>0&&"completed"!==r.cards[P[n-1]].status})}))})),t.placeholder)}))):u.a.createElement(u.a.Fragment,null),(e.permission||e.myDay)&&u.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},u.a.createElement(F.a,{text:Object(E.w)("$__new","*"),icon:"add_box",iconColor:Object(E.d)("color"),onClick:function(){var t,r,n,a,o;e.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},v.a.getState().control),{},{myDay:!!e.myDay,addCard:{myDay:!!e.myDay,_parent:(null===(t=j)||void 0===t?void 0:t._id)||null,rows:S.length,type:j&&j.type&&(null===(r=j)||void 0===r||null===(n=r.type)||void 0===n?void 0:n.indexOf("guideline"))>-1?"objective":"objective"===(null===(a=j)||void 0===a?void 0:a.type)?"goal":(null===(o=j)||void 0===o||o.type,"task")}}))},style:{padding:7}}),e.myDay?u.a.createElement(u.a.Fragment,null):u.a.createElement(F.a,{text:Object(E.w)("$__newSimpleTask","*"),icon:"playlist_add",iconColor:Object(E.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},v.a.getState().control),{},{myDay:e.myDay||!1,checklist:!0,addCard:{_parent:j._id,rows:S.length,type:j.type.indexOf("guideline")>-1?"objective":"objective"===j.type?"goal":(j.type,"task"),checklist:!0}}))},style:{padding:7}})),S.filter((function(e){return"completed"===r.cards[e].status})).length>0?u.a.createElement("div",{style:{width:"96%",position:"relative",margin:"2%",padding:"3px 10px",border:"solid 1px rgba(0,0,0,0.1)",justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"}},u.a.createElement(y.a,{title:"".concat(Object(E.w)(x?"$__hideCompletedActivities":"$__showCompletedActivities")," - (").concat(S.filter((function(e){return"completed"===r.cards[e].status})).length,")"),text:"".concat(Object(E.w)(x?"$__hideCompletedActivities":"$__showCompletedActivities")," - (").concat(S.filter((function(e){return"completed"===r.cards[e].status})).length,")"),color:Object(E.d)("menu"),textColor:Object(E.d)("menu"),icon:"done_all",onClick:function(){w((function(e){return!e}))},size:"25px"})):u.a.createElement(u.a.Fragment,null),x&&S.filter((function(e){return"completed"===r.cards[e].status})).length>0?u.a.createElement(u.a.Fragment,null,S.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 u.a.createElement("div",{key:"".concat(t).concat(n)},u.a.createElement(T,{dragStatus:f,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:j.listStepLock&&n>0&&P[n-1]&&r.cards[P[n-1]]&&"completed"!==r.cards[P[n-1]].status}))}))):u.a.createElement(u.a.Fragment,null))}))},353:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(34),i=r(11),c=r(1),l=r(2),s=r(7),u={containerNoShadow:Object(l.a)(Object(l.a)({},s.k),{},{position:"relative",border:"0.5px solid ".concat(Object(c.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",display:"flow-root"}),container:Object(l.a)(Object(l.a)({},s.k),{},{position:"relative",border:"0.5px solid ".concat(Object(c.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",display:"flow-root",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"}),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:"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(c.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"}}};t.a=Object(o.a)(u)((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(c.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(i.a,{icon:"lock",size:"39px",color:e.avatarIconColor?e.avatarIconColor:Object(c.d)("AvatarIconColor")})))))}))},38:function(e,t,r){"use strict";var n=r(10),a=r(401),o=r.n(a);function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};u(x,c,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,c)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),u(O,s,"Generator"),u(O,c,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var c=o.a.create({baseURL:"https://ws.machen.ai"});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},390:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(15),d=r(3),p=r(13),f=r(14),h=r(155),m=r(20),g=r(11),b=r(25),v=r(343),y=r(150),x=r(756),w=r(569),_=r(568),O=r(495),j=r(294),E=r(755),k=r(360),S=r(567),L=r(135),C=r(165),I=r(570),T=r(24),D=r(1),F=r(75),N=r(38);function A(){A=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var P=Object(C.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0,borderRadius:"50%"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0,borderRadius:"50%"}}}}));t.a=Object(f.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(p.b)(u,e)}))((function(e){var t=P(),r=c.a.useRef(null),i=d.a.getState(),l=i.db,u=i.session,p=c.a.useState(l.cards[e._id]||{}),f=Object(o.a)(p,2),C=f[0],$=f[1],M=c.a.useState(!!e.open),B=Object(o.a)(M,2),z=B[0],Y=B[1],R=c.a.useState([]),G=Object(o.a)(R,2),H=G[0],W=G[1],U=c.a.useState([]),q=Object(o.a)(U,2),V=q[0],J=q[1],X=c.a.useState(""),K=Object(o.a)(X,2),Z=K[0],Q=K[1],ee=c.a.useState(!1),te=Object(o.a)(ee,2),re=te[0],ne=te[1],ae=c.a.useState(!1),oe=Object(o.a)(ae,2),ie=oe[0],ce=oe[1],le=c.a.useState(Object(T.u)(C._id)),se=Object(o.a)(le,2),ue=se[0],de=se[1];c.a.useEffect((function(){return de(Object(T.u)(C._id)),function(){}}),[e.users]),c.a.useEffect((function(){l.cards[e._id]&&JSON.stringify(l.cards[e._id])!==JSON.stringify(C)&&($(l.cards[e._id]),de(Object(T.u)(C._id)))}),[e.cards]);var pe=Object(D.j)(),fe=Object(T.t)(C._id),he=!1;fe>3&&(he=!0),!he&&pe.plan&&pe.planAdmin&&(he=!0);var me=window.location.hash.split("/");function ge(e){"Tab"===e.key&&(e.preventDefault(),Y(!1))}me[0]=me[0].replace("#","");var be=function(){var t=Object(a.a)(A().mark((function t(r,n){var a,o;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=1,C&&"plan"===C.type&&(a=3),n?a=n:C._planId&&l.cards[C._planId]&&l.cards[C._planId]._users&&l.cards[C._planId]._users[r]&&l.cards[C._planId]._users[r].access&&(a=C._parent&&l.cards[C._parent]&&l.cards[C._parent]._users&&l.cards[C._parent]._users[r]&&l.cards[C._parent]._users[r].access&&parseInt(l.cards[C._parent]._users[r].access)>parseInt(l.cards[C._planId]._users[r].access)?parseInt(l.cards[C._parent]._users[r].access):parseInt(l.cards[C._planId]._users[r].access)),o=!!(C&&C._users&&C._users[r]),t.next=6,Object(F.b)(e,r,a,C._id,o);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),ve=function(){var e=Object(a.a)(A().mark((function e(t){return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:N.a.put("cards/removeAccess/",{cardId:C._id,userIds:H}),W([]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ye=function(){var t=Object(a.a)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:V.forEach((function(t){Object(T.J)(e,{_id:C._id,userId:t,option:!0})})),ce(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),xe=function(e){var t=e.data;return c.a.createElement(j.a,null,t.label,c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}}))},we=function(t){var r=t.pr,a=!1;e.permission&&(a=!0);var o=!1;C._users&&C._users[r]&&C._users[r].myDay&&C._users[r].myDay&&s()(1e3*parseInt(C._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===s()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0);var i=!!(Object.keys(ue).length>1&&ue[r]&&ue[r].isResponsible),l=!!(e.customDefine&&e.customDefine.name&&Object.keys(ue).length>1&&ue[r]&&ue[r][e.customDefine.name]),u=ue[r]?ue[r]:C._users[r];return c.a.createElement(j.a,{onClick:a?function(){}:null,disabled:!a},c.a.createElement("div",{style:Object(n.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},a?{}:{cursor:"pointer"})},c.a.createElement("div",{style:Object(n.a)(Object(n.a)({width:"33px",height:"33px",borderRadius:"50%"},e.customDefine?{border:l?"3px green solid":"none"}:{border:i?"3px deepskyblue solid":o?"2px #ff8800 solid":"none"}),{},{backgroundImage:u.image?'url("'.concat(u.image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center",marginRight:7}),src:u.image||null},!u.image&&u&&u.name?u.name.substr(0,1):""),u.name||u.name,c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},!e.customDefine&&C._users[r]&&!C._users[r].isResponsible&&he?c.a.createElement(m.a,{title:Object(D.w)("$__defineAsResponsible",1),color:"lightGray",icon:"admin_panel_settings",onClick:function(){Object(D.c)({message:Object(D.w)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Object(F.l)(e,{cardId:C._id,userId:r})}})},size:"25px"}):c.a.createElement(c.a.Fragment,null),e.customDefine&&C._users[r]&&he?c.a.createElement(m.a,{title:Object(D.w)(C._users[r][e.customDefine.name]?"$__removeThe".concat(e.customDefine.name):"$__defineAs".concat(e.customDefine.name),1),color:C._users[r][e.customDefine.name]?"green":"lightgray",icon:e.customDefine&&e.customDefine.icon||"check",onClick:function(){Object(D.c)({message:Object(D.w)(C._users[r][e.customDefine.name]?"$__confirmUnSetAs".concat(e.customDefine.name):"$__confirmSetAs".concat(e.customDefine.name),1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Object(F.q)(e,{cardId:C._id,userId:r,param:e.customDefine.name,on:!C._users[r][e.customDefine.name]})}})},size:"25px"}):c.a.createElement(c.a.Fragment,null),e.customDefine?c.a.createElement(c.a.Fragment,null):c.a.createElement(h.a,Object.assign({},ie?{checked:!!(o||V.indexOf(r)>-1)}:{checked:!!C._users[r]},{disabled:!(!ie||!o),onClick:a?function(){if(ie){var e=Array.from(V);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),J(e)}else!function(e){var t=Array.from(H);C._users[e]&&-1===t.indexOf(e)?(t.push(e),W(t)):C._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),W(t)):C._users[e]||be(e)}(r)}:null,color:"default"}))),H.indexOf(r)>-1&&c.a.createElement("div",{style:{height:"2px",width:"100%",backgroundColor:"red",position:"absolute",top:"50%"}})))};return c.a.createElement("div",{id:"quickUser",onClick:function(e){e.stopPropagation()}},c.a.createElement(O.a,{ref:r,"aria-controls":z?"menu-list-grow":void 0,"aria-haspopup":"true",id:"quick_388","aria-label":"menu",onClick:function(t){(e.permission||C&&C._users&&C._users[u._id]&&C._users[u._id].access&&parseInt(C._users[u._id].access)>3)&&(Y((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},c.a.createElement(v.a,Object.assign({data:C||{}},e&&e.customDefine?{customDefine:e.customDefine}:{}))),c.a.createElement(S.a,{open:z,anchorEl:r.current,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return c.a.createElement(_.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom",maxHeight:"333px",minHeight:"50px",overflowY:"auto"},id:"quick_417"}),c.a.createElement(k.a,null,c.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:H&&H.length>0||V&&V.length>0?"50px":0,display:"flex",justifyContent:"space-between"}},c.a.createElement(w.a,{onClickAway:function(){Y(!1),ce(!1),J([])}},c.a.createElement("div",null,re&&c.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},c.a.createElement(b.a,{id:"quickUser_Search",label:Object(D.w)("$__searchByName",1),variant:Object(D.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(I.a,{position:"end",style:{cursor:"pointer"},onClick:function(){Q(""),ne(!1)}},c.a.createElement(g.a,{icon:"close"})),onChange:function(e){Q(e.target.value)},onBlur:function(e){}},value:Z,placeholder:Object(D.w)("$__searchByName",1),autoFocus:!0})),c.a.createElement(E.a,{autoFocusItem:z,id:"menu-list-grow",onKeyDown:ge},ie?c.a.createElement("div",{style:{position:"relative",overflow:"auto"}},c.a.createElement(j.a,{disabled:!0},Object(D.w)("$__selectUsersToMyDay","*")),Object.keys(C._users).filter((function(e){return e!==u._id})).sort((function(e,t){var r,n,a,o;return(null===(r=C._users[e])||void 0===r?void 0:r.name)&&(null===(n=C._users[t])||void 0===n?void 0:n.name)&&C._users[e].name.toLowerCase()<C._users[t].name.toLowerCase()?-1:(null===(a=C._users[e])||void 0===a?void 0:a.name)&&(null===(o=C._users[t])||void 0===o?void 0:o.name)&&C._users[e].name.toLowerCase()>C._users[t].name.toLowerCase()?1:0})).map((function(e){return c.a.createElement(we,{pr:e,key:e})}))):c.a.createElement("div",null,e.types&&e.types.indexOf("teams")>-1?c.a.createElement(c.a.Fragment,null,c.a.createElement(j.a,{disabled:!0},Object(D.w)("$__usersGroups","*")),d.a.getState().db.userGroup.map((function(e){return c.a.createElement(xe,{data:e,key:e.value})}))):c.a.createElement(c.a.Fragment,null),c.a.createElement(j.a,{disabled:!0},Object(D.w)("$__users","*")),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"user"!==ue[t].type||ue[t].deleted||ue[t]._parent||!(!e.customDefine||e.customDefine&&C._users[t]))})).sort((function(t,r){var n=l.cards[e._id]._users[t]?"A".concat(ue[t].name):"W".concat(ue[t].name),a=l.cards[e._id]._users[r]?"A".concat(ue[r].name):"W".concat(ue[r].name);return n<a?-1:n>a?1:0})).map((function(e){return ue&&ue[e]&&ue[e]._id&&c.a.createElement(we,{pr:e,key:e})})),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"external"!==ue[t].type||ue[t].deleted||!(!e.customDefine||e.customDefine&&C._users[t]))})).length>0&&c.a.createElement(j.a,{disabled:!0},Object(D.w)("$__UnityUsers","*")),Object.keys(ue).filter((function(t){return(!Z||Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)&&"external"===ue[t].type&&!ue[t].deleted&&(!e.customDefine||e.customDefine&&C._users[t])})).sort((function(e,t){return ue[e].name<ue[t].name?-1:ue[e].name>ue[t].name?1:0})).map((function(e){return ue&&ue[e]&&ue[e]._id&&c.a.createElement(we,{pr:e,key:e})})),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"consultant"!==ue[t].type||ue[t].deleted||!(!e.customDefine||e.customDefine&&C._users[t]))})).length>0&&c.a.createElement(j.a,{disabled:!0},Object(D.w)("$__planningUsers","*")),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"consultant"!==ue[t].type||ue[t].deleted||!(!e.customDefine||e.customDefine&&C._users[t]))})).sort((function(e,t){return ue[e].name<ue[t].name?-1:ue[e].name>ue[t].name?1:0})).filter((function(e){return ue&&ue[e]&&ue[e]._id})).map((function(e){return c.a.createElement(we,{pr:e,key:e})})))),re||ie?c.a.createElement(c.a.Fragment,null):c.a.createElement("div",{style:{position:"absolute",right:15,top:10}},c.a.createElement(m.a,{title:Object(D.w)("$__searchUser",1),color:Object(D.d)("menu"),icon:"search",onClick:function(){ne(!0)},size:"25px"})),e.customDefine||re||ie||!he?ie?c.a.createElement("div",{style:{position:"absolute",right:15,top:10}},c.a.createElement(m.a,{title:Object(D.w)("$__back",1),color:Object(D.d)("menu"),icon:"arrow_back",onClick:function(){ce(!1)},size:"25px"})):c.a.createElement(c.a.Fragment,null):c.a.createElement("div",{style:{position:"absolute",right:45,top:10}},c.a.createElement(m.a,{title:Object(D.w)("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){ce(!0)},size:"25px"}))))),H&&H.length>0&&c.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(D.w)("$__confirmSelectedUsersRemove"),c.a.createElement(m.a,{title:Object(D.w)("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){ve()},size:"25px",transparent:!0})),ie&&V&&V.length>0&&c.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()}},c.a.createElement(x.a,{style:{flexWrap:"wrap"}},V.map((function(e,t){return e&&d.a.getState().db.users[e]?c.a.createElement(L.a,{title:d.a.getState().db.users[e].name,key:e},c.a.createElement(y.a,{alt:d.a.getState().db.users[e].name,src:d.a.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},d.a.getState().db.users[e].name.substr(0,1))):c.a.createElement(c.a.Fragment,null)}))),c.a.createElement(m.a,{title:Object(D.w)("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){ye()},size:"25px",transparent:!0}))))})))}))},398:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},43:function(e,t,r){"use strict";var n=r(292),a=Object(n.a)();t.a=a},455:function(e,t,r){"use strict";t.a=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:{}}}},457:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0),a=r.n(n),o=r(3),i=r(101),c=r(1),l=r(24);function s(e){var t=o.a.getState(),r=t.db,n=t.session,s=Object(l.h)(e.id),u=Object(c.j)();if(0===Object.keys(s).length)return a.a.createElement(a.a.Fragment,null);var d=Object.keys(s).filter((function(e,t){return s[e].icon&&s[e].type&&s[e].name})).map((function(t,o){var d=Object(l.t)(t);return a.a.createElement("div",{style:{marginRight:"10px",width:"100%"},key:o},a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:e.open&&((u.planAdmin||u.planModerate)&&("plan"!==r.cards[s[t]._id].type||"plan"===r.cards[s[t]._id].type&&Object(l.A)(s[t]._id))||d>=1)&&(!r.cards[s[t]._id].private||r.cards[s[t]._id].private&&r.cards[s[t]._id]._users&&r.cards[s[t]._id]._users[n._id])?function(r){e.open(s[t]._id),r.stopPropagation()}:null},a.a.createElement(i.a,{overlap:"rectangular",icon:s[t].icon,title:"".concat(Object(c.w)("$__".concat(s[t].type),"*"),": ").concat(s[t].name),size:"16px",color:Object(c.d)("color")}),a.a.createElement("span",{style:{marginLeft:"5px"}},s[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(c.w)(e.legend||"$__connectedIn",1)),d):d,a.a.createElement("div",{style:{clear:"both"}}))}},458:function(e,t,r){"use strict";t.a={instruction:{},picture:{}}},46:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(0),i=r.n(o),c=r(100),l=r.n(c),s=r(165),u=r(101),d=r(7),p={button:Object(n.a)(Object(n.a)({},d.k),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(n.a)(Object(n.a)({},d.k),{},{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"}},f=r(1),h=Object(s.a)(p);t.a=function(e){var t,r,o=h(),c=e.text,s=l()((t={},Object(a.a)(t,o.button,!0),Object(a.a)(t,o.reverse,!!e.reverse),t)),d=l()((r={},Object(a.a)(r,o.buttonText,!0),Object(a.a)(r,o.reverse,!!e.reverse),r));return i.a.createElement("div",{className:e.text?d:s,onClick:function(){return e.onClick?e.onClick():null},style:Object(n.a)({},e.style)},i.a.createElement("div",{className:o.iconButton,style:{color:e.iconColor?Object(f.d)(e.iconColor):Object(f.d)("color"),backgroundColor:e.iconBackground?Object(f.d)(e.iconBackground):"none"}},e.icon?i.a.createElement(u.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(n.a)({},e.style?e.style:{})}):i.a.createElement(u.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(n.a)({},e.style?e.style:{})})),c&&i.a.createElement("div",{className:o.text,style:{color:e.textColor?Object(f.d)(e.textColor):Object(f.d)("medium")}},c))}},469:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(692),i=r(1);t.a=function(){return Object(n.a)(Object(n.a)({},o.a),{},{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(i.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(i.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(i.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},flex:{flex:1},title:Object(n.a)(Object(n.a)({},a.k),{},{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(n.a)(Object(n.a)({},a.k),{},{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(i.d)("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:Object(i.d)("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:Object(i.d)("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:Object(i.d)("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})}},473:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(0),o=r.n(a),i=r(20),c=r(64),l=r(11),s=r(390),u=r(70),d=r(74),p=r(14),f=r(13),h=r(15),m=r(3),g=r(43),b=r(1),v=r(24);t.default=Object(p.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(f.b)(h,e)}))((function(e){var t,r,a,p,f=e.reduxFunction,h=e.cards,y=e.styles,x=e.preview,w=e.edit,_=e.handleRemoveObject,O=e.id,j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=m.a.getState().session,k=Object(b.j)(),S=Object(v.t)(j[0]);return o.a.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden"}},!x&&o.a.createElement(u.a,{style:{marginTop:"0",height:"100%"}},w?o.a.createElement("div",{style:Object(n.a)({width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3"},y)},o.a.createElement(l.a,{size:24,style:Object(n.a)({alignSelf:"center",marginLeft:"12.5px",color:y.color?y.color:"rgba(0, 0, 0, 0.67)"},y)},"blur_on"),o.a.createElement("p",{style:Object(n.a)({margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:y.color?y.color:"rgba(0, 0, 0, 0.67)"},y)},Object(b.w)("$__planResume",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(l.a,{onClick:function(){return _(O)},style:{height:"25px",color:y.color?y.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(l.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:y.color?y.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(c.a,{title:Object(b.w)("$__planResume",1),icon:"blur_on",color:y.color?y.color:"rgba(0, 0, 0, 0.67)",style:{background:y.backgroundColor?y.backgroundColor:"white",padding:"12.8px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},moreButton:!0,optionsProps:{transparent:!0,btColor:y.color?y.color:"rgba(0, 0, 0, 0.67)"},options:S&&parseInt(S)>3||k.owner||k.planAdmin||k.planEdit||k.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){f("ASYNC","SET_MODULE",Object(n.a)(Object(n.a)({},m.a.getState().sideModule),{},{db:"cards",id:j[0],module:"cardEdit",activeModule:"cardEdit",data:h[j[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),o.a.createElement(d.a,null,o.a.createElement("div",null,o.a.createElement("div",{style:{width:"100%",color:Object(b.d)("menu")}},o.a.createElement("span",{style:{fontWeight:"bold"}},Object(b.w)("$__name",1),":")," ",null===(t=h[j[0]])||void 0===t?void 0:t.name),o.a.createElement("div",{style:{width:"100%",color:Object(b.d)("menu")}},o.a.createElement("span",{style:{fontWeight:"bold"}},Object(b.w)("$__description",1),":")," ",null===(r=h[j[0]])||void 0===r?void 0:r.description),!(null===(a=h[j[0]])||void 0===a?void 0:a.isTemplate)&&h[j[0]]&&(null===(p=h[j[0]])||void 0===p?void 0:p._users)&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:Object(b.d)("menu"),fontWeight:"bold"}},Object(b.w)("$__users","*"),":"),o.a.createElement(s.a,{_id:j[0],noLimit:!0,avatarSize:"33px",permission:!0}))),"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"===E.account?o.a.createElement(i.a,{color:Object(b.d)("menu"),icon:"monitoring",onClick:function(){g.a.push("sp#".concat(j[0],"/statistics"))},size:"15px",title:"".concat(Object(b.w)("$__tagsStatistics")),text:"".concat(Object(b.w)("$__tagsStatistics"))}):o.a.createElement(o.a.Fragment,null))))}))},474:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(8),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(141),u=r(196),d=r(83),p=(r(156),r(96)),f=r(3),h=r(6),m=r.n(h),g=r(1),b=r(11);t.default=function(e){var t=Object(c.useRef)([]),r=f.a.getState().db,h=Object(c.useState)({}),v=Object(i.a)(h,2),y=v[0],x=v[1],w=Object(c.useState)({index:0,showQuantity:10,number:10,finalIndex:10}),_=Object(i.a)(w,2),O=_[0],j=_[1],E=Object(c.useState)({}),k=Object(i.a)(E,2),S=k[0],L=k[1],C=window.location.hash.split("/");C[0]=C[0].replace("#",""),Object(c.useEffect)((function(){var t,r,n;(Object.keys(e.filter).length>0&&j(Object(o.a)(Object(o.a)({},O),e.filter)),Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0)&&x(Object(o.a)(Object(o.a)(Object(o.a)({},O),null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.filter,e.dashboardConfig]),Object(c.useEffect)((function(){var i={};e.planCards&&!e.load&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).filter((function(e){return!r.cards[e].deleted})).forEach((function(e){var c;Object.keys(null===(c=r.cards[e])||void 0===c?void 0:c._users).forEach((function(c){var l,s;if(!((null===O||void 0===O||null===(l=O.users)||void 0===l?void 0:l.length)>0)||O.users.includes(null===(s=r.cards[e])||void 0===s?void 0:s._users[c]._id)){var u,d,p,f,h,g,b;if(!i[c])i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},i[c]),{},(b={},Object(a.a)(b,r.cards[e].status,0),Object(a.a)(b,"allTask",0),Object(a.a)(b,"user",null===(f=r.cards[e])||void 0===f?void 0:f._users[c].name.match(/\b(\w)/g).join("")),Object(a.a)(b,"id",c),Object(a.a)(b,"image",null===(h=r.cards[e])||void 0===h?void 0:h._users[c].image),Object(a.a)(b,"name",null===(g=r.cards[e])||void 0===g?void 0:g._users[c].name),b))));var v=(null===(u=r.cards[e].completed_at)||void 0===u?void 0:u.low)||r.cards[e].completed_at||(null===(d=r.cards[e].updated_at)||void 0===d?void 0:d.low)||r.cards[e].updated_at||(null===(p=r.cards[e].created_at)||void 0===p?void 0:p.low)||r.cards[e].created_at,x=m()(1e3*v).format("YYYYMMDD"),w=(null===y||void 0===y?void 0:y.startDate)?m()(1e3*(null===y||void 0===y?void 0:y.startDate)).format("YYYYMMDD"):O.startDate?m()(1e3*O.startDate).format("YYYYMMDD"):m()().subtract(1,"month").format("YYYYMMDD"),_=(null===y||void 0===y?void 0:y.endDate)?m()(1e3*(null===y||void 0===y?void 0:y.endDate)).format("YYYYMMDD"):O.endDate?m()(1e3*O.endDate).format("YYYYMMDD"):m()().format("YYYYMMDD");if(parseInt(x)>=parseInt(w)&&parseInt(x)<=parseInt(_)){var j,E,k,S,L,C=r.status.filter((function(t){return t.value===r.cards[e].status}))[0].color;(null===O||void 0===O?void 0:O.colorsArr)&&O.colorsArr.forEach((function(t){t.label===r.cards[e].status&&(C=t.color)})),"step"!==r.cards[e].type&&(i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},i[c]),{},(L={},Object(a.a)(L,r.cards[e].status,(null===(j=i[c])||void 0===j?void 0:j[r.cards[e].status])?(null===(E=i[c])||void 0===E?void 0:E[r.cards[e].status])+1:1),Object(a.a)(L,"allTask",(null===(k=i[c])||void 0===k?void 0:k.allTask)?(null===(S=i[c])||void 0===S?void 0:S.allTask)+1:1),Object(a.a)(L,r.cards[e].status+"Color",C),L)))));var I={label:r.cards[e].status,color:C};t.current.some((function(e){return e.label===I.label}))||(t.current=[].concat(Object(n.a)(t.current),[I]))}}}))})),S!==i&&L(i))}),[e.planCards,e.load,O,y]);var I=(null===y||void 0===y?void 0:y.startDate)?m()(1e3*(null===y||void 0===y?void 0:y.startDate)).format("DD/MM/YYYY"):O.startDate?m()(1e3*O.startDate).format("DD/MM/YYYY"):m()().subtract(1,"month").format("DD/MM/YYYY"),T=(null===y||void 0===y?void 0:y.endDate)?m()(1e3*(null===y||void 0===y?void 0:y.endDate)).format("DD/MM/YYYY"):O.endDate?m()(1e3*O.endDate).format("DD/MM/YYYY"):m()().format("DD/MM/YYYY");return l.a.createElement("div",{style:{height:"100%",width:"100%"}},l.a.createElement(p.a,null,(function(r){return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){j(Object(o.a)(Object(o.a)({},O),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},O),t),{},{id:e.id}))},filterConfig:{filterSelect:Object.keys(S).length>0&&Object.values(S).length},tittle:Object(g.w)("$__"+e.tittle),icon:e.icon,styles:e.styles,indicators:O&&O,datafilter:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){j(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},O),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},!e.load&&r&&l.a.createElement("div",{style:{position:"absolute",right:"2%",top:"2%",padding:"5px",display:"flex",zIndex:"9",justifyContent:"center",alignContent:"center"}},l.a.createElement("div",{style:{marginTop:"2px",marginRight:"4px"}},I+" ~ ",T+" -- ",O.showQuantity<Object.keys(S).length?O.showQuantity+"/":Object.keys(S).length+"/",Object.keys(S).length>0&&l.a.createElement("span",null,Object.keys(S).length)),l.a.createElement(b.a,null,"person")),0!==O.index&&l.a.createElement(b.a,{onClick:function(){return j(Object(o.a)(Object(o.a)({},O),{},{index:O.index-1,finalIndex:O.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),Object.keys(S).length!==O.index+O.number&&Object.keys(S).length>O.showQuantity&&l.a.createElement(b.a,{onClick:function(){return j(Object(o.a)(Object(o.a)({},O),{},{index:O.index+1,finalIndex:O.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},Object.keys(S).length>0&&!e.load&&r?l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},l.a.createElement(u.a,{data:Object.values(S).sort((function(e,t){return e.allTask>t.allTask?-1:e.allTask<t.allTask?1:0})).slice(O.index,O.finalIndex),keys:["inProgress","completed","notStarted","paused","awaitAction"],colors:function(e){var t=e.id;return e.data["".concat(t,"Color")]},tooltip:function(e){return l.a.createElement("div",{style:{fontSize:"12px",width:"200px",marginBottom:"10px",zIndex:"99999"}},l.a.createElement("div",{style:{display:"flex",marginLeft:"5px",marginTop:"10px",textOverflow:"ellipsis",overflow:"hidden"}},l.a.createElement("div",{style:{display:"flex",width:"40px",height:"32px",backgroundImage:'url("'.concat(e.data.image,'")'),backgroundColro:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%",alignSelf:"center"}}),l.a.createElement("p",{style:{margin:"0px",marginLeft:"12px",fontSize:"20px",alignSelf:"center",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.data.name)),l.a.createElement("div",{style:{borderBottom:"1px solid #d1d1cf",marginTop:"10px"}}),l.a.createElement("div",{style:{width:"100%",fontSize:"18px",padding:"10px",marginBottom:"5px",marginTop:"4px"}},Object.entries(e.data).map((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.entries(e.data),r=Object(i.a)(t,2),n=r[0],a=r[1];if(["inProgress","completed","notStarted","paused","awaitAction"].includes(n)){var o="";switch(n){case"inProgress":o="#011E41";break;case"completed":o="#5A7F71";break;case"notStarted":o="#929497";break;case"paused":o="#EBA900";break;case"awaitAction":o="pink";break;default:o="white"}return O.colorsArr&&O.colorsArr.forEach((function(e){e.label===n&&(o=e.color)})),l.a.createElement("div",{style:{display:"flex",marginBottom:"8px"},key:n},l.a.createElement("div",{style:{borderRadius:"50%",backgroundColor:o,height:"20px",width:"20px",alignSelf:"center",marginRight:"10px"}}," "),l.a.createElement("div",{style:{marginLeft:"14x"}}," ",Object(g.w)("$__"+n)," : ",l.a.createElement("span",{style:{fontWeight:"bolder"}},a)))}return null}))))},indexBy:"id",margin:{top:40,right:20,bottom:30,left:40},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!1},enableLabel:!1,yScale:{max:100},minValue:0,theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}},fill:[{match:{id:"fries"},id:"dots"},{match:{id:"sandwich"},id:"lines"}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:32,format:function(e){return function(e){var t="";return Object.values(S).forEach((function(r){r.id===e&&(t=null===r||void 0===r?void 0:r.name.match(/\b(\w)/g).join(""))})),t}(e)}},axisLeft:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-40},role:"application"})," "):l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}},"  ",l.a.createElement("div",{className:"loader"}))))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(n.a)(t.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:null===O||void 0===O?void 0:O.colorsArr})))})))}},475:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(8),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(728),u=r(141),d=r(83),p=(r(156),r(96)),f=r(291),h=r(3),m=r(6),g=r.n(m),b=r(1);t.default=function(e){var t=h.a.getState().db,r=Object(c.useState)({}),m=Object(i.a)(r,2),v=m[0],y=m[1],x=Object(c.useState)({}),w=Object(i.a)(x,2),_=w[0],O=w[1],j=Object(c.useRef)(0),E=window.location.hash.split("/");E[0]=E[0].replace("#","");var k=[{x:"",y:0},{x:" ",y:0}];return Object(c.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&O(Object(o.a)(Object(o.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),console.log(e.dashboardConfig),Object(c.useEffect)((function(){var r={},i={};!function(){for(var e=g()().startOf("week"),t=1;t<7;t++){var n=g()(e).add(t,"days").format("YYYYMMDD");r=Object(o.a)(Object(o.a)({},r),{},{id:"now",data:Object(o.a)(Object(o.a)({},r.data),{},Object(a.a)({},n,{x:Object(b.w)("$__"+g()(n).format("dddd")),y:0}))}),i=Object(o.a)(Object(o.a)({},i),{},{id:"past",data:Object(o.a)(Object(o.a)({},i.data),{},Object(a.a)({},n,{x:Object(b.w)("$__"+g()(n).format("dddd")),y:0}))})}}(),e.planCards&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).forEach((function(e){var n,c,l,s=(null===(n=t.cards[e].completed_at)||void 0===n?void 0:n.low)||t.cards[e].completed_at||(null===(c=t.cards[e].updated_at)||void 0===c?void 0:c.low)||t.cards[e].updated_at||(null===(l=t.cards[e].created_at)||void 0===l?void 0:l.low)||t.cards[e].created_at,u=g()(1e3*s).format("YYYYMMDD"),d=(null===_||void 0===_?void 0:_.startDate)?g()(null===_||void 0===_?void 0:_.startDate).format("YYYYMMDD"):g()().startOf("week").add(1,"day").format("YYYYMMDD"),p=(null===_||void 0===_?void 0:_.endDate)?g()(null===_||void 0===_?void 0:_.endDate).format("YYYYMMDD"):g()().endOf("week").format("YYYYMMDD");console.log(d,p),console.log(_);var f,h,m,v,y,x,w=g()().subtract(1,"weeks").startOf("week").add(1,"day").format("YYYYMMDD"),O=g()().subtract(1,"weeks").endOf("week").format("YYYYMMDD");u>=d&&u<=p&&(r=Object(o.a)(Object(o.a)({},r),{},{id:"now",data:Object(o.a)(Object(o.a)({},r.data),{},Object(a.a)({},u,{x:Object(b.w)("$__"+g()(u).format("dddd")),y:(null===(f=r)||void 0===f||null===(h=f.data)||void 0===h||null===(m=h[u])||void 0===m?void 0:m.y)?(null===(v=r)||void 0===v||null===(y=v.data)||void 0===y||null===(x=y[u])||void 0===x?void 0:x.y)+1:1}))}));if(u>=w&&u<=O){var j,E,k,S,L,C,I=g()(u).add(1,"week").format("YYYYMMDD");i=Object(o.a)(Object(o.a)({},i),{},{id:"past",data:Object(o.a)(Object(o.a)({},i.data),{},Object(a.a)({},I,{x:Object(b.w)("$__"+g()(u).format("dddd")),y:(null===(j=i)||void 0===j||null===(E=j.data)||void 0===E||null===(k=E[I])||void 0===k?void 0:k.y)?(null===(S=i)||void 0===S||null===(L=S.data)||void 0===L||null===(C=L[I])||void 0===C?void 0:C.y)+1:1}))})}})),r.data&&(r=Object(o.a)(Object(o.a)({},r),{},{data:[k[0]].concat(Object(n.a)(Object.values(r.data)),[k[1]])}),Object.keys(r).length>0&&(r=[r]),r.forEach((function(e){e.data.forEach((function(e){e.y>j.current&&(j.current=e.y)}))}))),i.data&&(i=Object(o.a)(Object(o.a)({},i),{},{data:[k[0]].concat(Object(n.a)(Object.values(i.data)),[k[1]])}),Object.keys(i).length>0&&(r=[].concat(Object(n.a)(r),[i])),r.forEach((function(e){e.data.forEach((function(e){e.y>j.current&&(j.current=e.y)}))}))),y(r))}),[e.planCards,_]),console.log(_),l.a.createElement("div",{style:{height:"100%",width:"100%"}},l.a.createElement(p.a,null,(function(t){return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column",overflow:"hidden"}},l.a.createElement(d.a,{styles:e.styles,tittle:Object(b.w)("$__"+e.tittle),icon:e.icon,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},(null===_||void 0===_?void 0:_.startDate)?l.a.createElement(f.a,null):l.a.createElement("div",{className:"component",style:{position:"absolute",width:"100%",height:"100%",marginBottom:"25px",backgroundColor:"#f5f5f5"}},v.length>0&&!e.load&&t?l.a.createElement(s.a,{data:v,responsive:!0,margin:{top:20,right:-15,bottom:50,left:30},xScale:{type:"point"},yScale:{type:"linear",min:"auto",max:j.current+j.current/2,stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:15,tickRotation:0},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},enableGridX:!0,enableGridY:!0,lineWidth:.5,pointSize:1,pointColor:{theme:"background"},pointBorderWidth:0,enableArea:!0,areaBaselineValue:0,pointBorderColor:{from:"serieColor"},pointLabelYOffset:0,useMesh:!0,curve:"catmullRom",colors:["rgba(36, 170, 219, 0.8)","rgba(82, 82, 82, 0.4)"],theme:{fontSize:"14px",color:"white",background:"#f5f5f5",grid:{line:{stroke:"#e8e6e6",strokeWidth:1}},axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}}}):l.a.createElement("div",{style:{wdith:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}},"  ",l.a.createElement("div",{className:"loader"}))),l.a.createElement("div",{style:{width:"98%",backgroundColor:"#f5f5f5",height:"18px",position:"absolute",bottom:"30px",left:"40px"}}))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(u.a,{legend:[{id:Object(b.w)("$__lastWeek"),color:"#525252",number:"",key:1},{id:Object(b.w)("$__thisWeek"),color:"#24acdc",number:"",key:2}]})))})))}},476:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(70),l=r(74),s=r(58),u=r(260),d=r(11),p=r(96),f=r(1),h=r(24);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=i.a.useState({type:"comment",disabledSend:!1}),o=Object(a.a)(r,2),m=o[0],g=o[1],b=Object(h.j)(t[0]);return i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(p.a,null,(function(r){return i.a.createElement("div",{style:{height:"100%",overflow:"hidden"}},i.a.createElement(c.a,{style:{marginTop:"0",height:"100%"}},e.edit?i.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},i.a.createElement(d.a,{size:24,style:{alignSelf:"center",marginLeft:"17px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",marginTop:"1px"}},"blur_on"),i.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"2px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",fontSize:"16px"}},Object(f.w)("$__timeline",1)),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(d.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(d.a,{className:"drag-handle",style:{height:"25px",cursor:"move",position:"absolute",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):i.a.createElement(s.a,{title:Object(f.w)("$__timeline",1),icon:"blur_on",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"10px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},customButtons:[{name:"$__timeline",icon:"timeline",actionsSize:"22px",count:b.comment,color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",onClick:function(){g({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:b.log,onClick:function(){g({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:b.timer,onClick:function(){g({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:b.kpi,onClick:function(){g({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),r&&i.a.createElement(l.a,null,i.a.createElement(u.a,Object(n.a)({nodeId:t[0],db:"cards",loadTimeline:!0},m)))))})))}},477:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(8),o=r(10),i=r(2),c=r(5),l=r(0),s=r.n(l),u=r(6),d=r.n(u),p=r(120),f=r(14),h=r(13),m=r(15),g=r(3),b=r(155),v=r(20),y=r(659),x=r(33),w=r(58),_=r(11),O=r(25),j=r(70),E=r(74),k=r(193),S=r(176),L=r(96),C=r(1932),I=r(1921),T=r(1920),D=r(150),F=r(756),N=r(1922),A=r(1241),P=r(135),$=r(1),M=r(78),B=r(24);function z(){z=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(f.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(h.b)(m,e)}))((function(e){var t=g.a.getState(),r=t.db,u=t.timeline,f=s.a.useState(d()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),h=Object(c.a)(f,2),m=h[0],Y=h[1],R=s.a.useState(d()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),G=Object(c.a)(R,2),H=G[0],W=G[1],U=s.a.useState(!1),q=Object(c.a)(U,2),V=q[0],J=q[1],X=s.a.useState({}),K=Object(c.a)(X,2),Z=K[0],Q=K[1],ee=s.a.useState({}),te=Object(c.a)(ee,2),re=te[0],ne=te[1],ae=s.a.useState(!0),oe=Object(c.a)(ae,2),ie=oe[0],ce=oe[1],le=Object(l.useState)({}),se=Object(c.a)(le,2),ue=se[0],de=se[1],pe=Object(l.useState)({}),fe=Object(c.a)(pe,2),he=fe[0],me=fe[1],ge=Object(l.useState)([]),be=Object(c.a)(ge,2),ve=be[0],ye=be[1],xe=Object(l.useRef)(0),we=Object(l.useRef)({}),_e=Object(l.useRef)(0),Oe=Object(l.useRef)({}),je=window.location.hash.split("/");je[0]=je[0].replace("#","");var Ee=je[0];s.a.useEffect((function(){return Se(),function(){}}),[]),Object(l.useEffect)((function(){console.log(e.dashboardConfig);var t,r,n,a,o={};Object.keys(e.filter).length>0&&(o=Object(i.a)(Object(i.a)({},o),{},{tagsColors:null===e||void 0===e||null===(t=e.filter)||void 0===t?void 0:t.tagsColors,mainColorTags:null===e||void 0===e||null===(r=e.filter)||void 0===r?void 0:r.mainColorTags}));Object.keys(null===e||void 0===e?void 0:e.dashboardConfig).length>0&&(o=Object(i.a)(Object(i.a)(Object(i.a)({},o),null===e||void 0===e||null===(n=e.dashboardConfig)||void 0===n?void 0:n.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}));me(o)}),[e.dashboardConfig,e.filter]),s.a.useEffect((function(){ke()}),[e.planCards]);var ke=function(){var e=Object(o.a)(z().mark((function e(){var t;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(B.s)(Ee);case 2:t=e.sent,ne(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var t=Object(o.a)(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(M.f)(Object(i.a)(Object(i.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[Ee],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&ce(!1),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),ce(!1);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();function Le(t,r,n){for(var o,c,l,s,u,d,p,f,h,m,g,b,v,y=null===e||void 0===e||null===(o=e.dashboardConfig)||void 0===o||null===(c=o.colorsArr)||void 0===c||null===(l=c[_e.current])||void 0===l?void 0:l.color,x="#",w=1;w<y.length;w+=2){var _=parseInt(y.slice(w,w+2),16);_=Math.round(_+.5*(255-_)),x+=_.toString(16).padStart(2,"0")}((null===he||void 0===he?void 0:he.tagsColors)&&(null===he||void 0===he||null===(s=he.tagsColors)||void 0===s?void 0:s.mainColor)===t?Oe.current=null===he||void 0===he?void 0:he.tagsColors:(null===(u=Oe.current)||void 0===u?void 0:u[r])&&y===(null===(d=Oe.current)||void 0===d?void 0:d.mainColor)||(Oe.current=Object(i.a)(Object(i.a)({},Oe.current),{},Object(a.a)({},r,{color:x,name:r}))),n)&&(Oe.current=Object(i.a)(Object(i.a)({},Oe.current),{},{mainColor:null===e||void 0===e||null===(p=e.dashboardConfig)||void 0===p||null===(f=p.colorsArr[0])||void 0===f?void 0:f.color}),(null===he||void 0===he?void 0:he.tagsColors)&&(null===he||void 0===he||null===(h=he.tagsColors)||void 0===h?void 0:h.mainColor)===(null===e||void 0===e||null===(m=e.dashboardConfig)||void 0===m||null===(g=m.colorsArr[0])||void 0===g?void 0:g.color)||(console.log("aquipassou"),e.handleSetTags({tagsColors:Oe.current,id:e.id,mainColor:null===e||void 0===e||null===(b=e.dashboardConfig)||void 0===b||null===(v=b.colorsArr[0])||void 0===v?void 0:v.color})));return Object.values(Oe.current).length>0&&Object.values(Oe.current).forEach((function(e){e.name===r&&(x=e.color)})),console.log(Oe.current),x}Object(l.useEffect)((function(){var e={},t={};xe.current=0;var n=0;_e.current=0,Object.keys(re).filter((function(e){var t,n,a,o=(null===(t=r.cards[e].completed_at)||void 0===t?void 0:t.low)||r.cards[e].completed_at||(null===(n=r.cards[e].updated_at)||void 0===n?void 0:n.low)||r.cards[e].updated_at||(null===(a=r.cards[e].created_at)||void 0===a?void 0:a.low)||r.cards[e].created_at,i=d()(1e3*o),c=(null===he||void 0===he?void 0:he.startDate)?d()(1e3*(null===he||void 0===he?void 0:he.startDate)):d()().subtract(10,"years"),l=(null===he||void 0===he?void 0:he.endDate)?d()(1e3*(null===he||void 0===he?void 0:he.endDate)):d()();return u[e]&&Object.keys(u[e]).filter((function(t){return"timer"===u[e][t].type})).length>0&&i.isBetween(c,l,null,"[]")})).forEach((function(r){Object.keys(u[r]).filter((function(e){return"timer"===u[r][e].type&&!u[r][e].deleted})).forEach((function(e){u[r][e]._toUser&&Object.keys(u[r][e]._toUser).length>0?Object.keys(u[r][e]._toUser).forEach((function(n){t=Object(i.a)(Object(i.a)({},t),{},Object(a.a)({},n,Object(i.a)({},u[r][e]._toUser[n]?u[r][e]._toUser[n]:{})))})):t=Object(i.a)(Object(i.a)({},t),{},Object(a.a)({},u[r][e].user._id,Object(i.a)({},u[r][e].user)))})),Object.keys(u[r]).filter((function(e){return u[r]&&u[r][e]&&"timer"===u[r][e].type&&!u[r][e].deleted&&(0===Object.keys(Z).length||Object.keys(Z).length>0&&Object.keys(Z).filter((function(t){return u[r]&&u[r][e]&&u[r][e].type&&"timer"===u[r][e].type&&Z[t]&&u[r][e].user&&(u[r]&&u[r][e]&&u[r][e].user&&(!u[r][e]._toUser||u[r][e]._toUser&&!u[r][e]._toUser[t])&&u[r][e].user._id===t||u[r]&&u[r][e]&&u[r][e]._toUser&&u[r][e]._toUser[t]&&u[r][e]._toUser[t]!==u[r][e].user._id)})).length>0)})).forEach((function(o){Object.keys(t).forEach((function(c){if(c&&u[r]&&u[r][o]&&"timer"===u[r][o].type&&!u[r][o].deleted&&(parseInt(u[r][o].ini)>=d()("".concat(m," 00:00:01")).unix("X")||0===parseInt(u[r][o].ini))&&parseInt(u[r][o].fin)<=d()("".concat(H," 23:59:59")).unix("X")&&(u[r][o].user&&u[r][o].user._id===c&&(!u[r][o]._toUser||u[r][o]._toUser&&(0===Object.keys(u[r][o]._toUser).length||1===Object.keys(u[r][o]._toUser).length&&u[r][o]._toUser[c]))||u[r][o]._toUser&&Object.keys(u[r][o]._toUser).length>1&&u[r][o]._toUser[c])){n+=parseInt(u[r][o].fin)-parseInt(u[r][o].ini);var l=parseInt(u[r][o].fin)-parseInt(u[r][o].ini),s=l=e&&e[c]&&e[c].totalTimer?parseInt(e[c].totalTimer)+(parseInt(u[r][o].fin)-parseInt(u[r][o].ini)):parseInt(u[r][o].fin)-parseInt(u[r][o].ini),p="",f="";if(l<60)p="".concat(s," ").concat(Object($.w)("$__seconds",1)),p="".concat(s,"s");else if(l>3600){var h=Math.trunc(s/3600);s-=3600*h;var g=Math.trunc(s/60)>0?Math.trunc(s/60):0,b=(s-=60*g)>0?s:0;p="".concat(h," ").concat(Object($.w)("$__hour",1)).concat(h>1?"s":""," ").concat(g," ").concat(Object($.w)("$__minutes",1)," ").concat(b>0?"".concat(b," ").concat(Object($.w)("$__seconds",1)):""),f="".concat(h,"H ").concat(g,"M ").concat(b," S")}else{var v=Math.trunc(s/60)>0?Math.trunc(s/60):0,y=(s-=60*v)>0?s:0;p="".concat(v," ").concat(Object($.w)("$__minutes",1)," ").concat(y>0?"".concat(y," ").concat(Object($.w)("$__seconds",1)):""),f="".concat(v,"M ").concat(y," S")}e=Object(i.a)(Object(i.a)({},e),{},Object(a.a)({},c,Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},e[c]?e[c]:{}),t[c]?t[c]:{}),e&&e[c]&&e[c].totalTimer?{totalTimer:parseInt(e[c].totalTimer)+(parseInt(u[r][o].fin)-parseInt(u[r][o].ini))}:{totalTimer:parseInt(u[r][o].fin)-parseInt(u[r][o].ini)}),{},{timerText:p,timerTextMini:f,_times:Object(i.a)(Object(i.a)({},e[c]&&e[c]._times?e[c]._times:{}),{},Object(a.a)({},o,Object(i.a)(Object(i.a)({},u[r][o]),{},{cardId:r})))})))}xe.current=n,1}))}))})),we.current=t,de(e)}),[re,ie,Z,he]);var Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object($.w)("$__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($.w)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object($.w)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object($.w)("$__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($.w)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object($.w)("$__seconds",1)):""),n="".concat(c,"M ").concat(l," S")}return t?n:r},Ie=function(e){return s.a.createElement("div",{style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},e.data&&e.data.name&&s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{style:{width:"33px"}},s.a.createElement(P.a,{title:e.data.name},s.a.createElement(D.a,{alt:e.data.name,src:e.data.image||null,style:{width:"33px",height:"33px"}},e.data.name.substr(0,1)))),s.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object($.d)("menu"),width:"33%",minWidth:"150px"}},e.data.name)),s.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object($.d)("menu")}},e.data.timerText))};return Object(l.useEffect)((function(){console.log(he);var t=Object(n.a)(Object.keys(ue).sort((function(e,t){return parseInt(ue[e].totalTimer)>parseInt(ue[t].totalTimer)?-1:parseInt(ue[e].totalTimer)<parseInt(ue[t].totalTimer)?1:0})).map((function(t,r){var n,a,o,i,c,l,s,u,d;return _e.current<5?_e.current=_e.current+1:_e.current=1,console.log(null===(n=e.dashboardConfig)||void 0===n||null===(a=n.colorsArr)||void 0===a||null===(o=a[_e.current-1])||void 0===o?void 0:o.color),{id:ue[t].name,label:ue[t].name,value:ue[t].totalTimer,color:(null===e||void 0===e||null===(i=e.dashboardConfig)||void 0===i||null===(c=i.colorsArr)||void 0===c||null===(l=c[0])||void 0===l?void 0:l.color)&&Le(null===e||void 0===e||null===(s=e.dashboardConfig)||void 0===s||null===(u=s.colorsArr)||void 0===u||null===(d=u[0])||void 0===d?void 0:d.color,ue[t].name,r===Object.keys(ue).length-1),textMini:ue[t].timerText}})));ye(t)}),[he,e.dashboardConfig,e.filter,ue]),s.a.createElement("div",{style:{height:"100%",width:"100%"}},s.a.createElement(L.a,null,(function(t){var n,o,c;return s.a.createElement(j.a,{style:{width:"100%",height:"100%",marginTop:"0px"}},e.edit&&t?s.a.createElement("div",{style:{width:"100%",height:"52px",display:"flex",borderBottom:"1px solid #D3D3D3",minHeight:"50px",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},s.a.createElement(_.a,{size:24,style:{alignSelf:"center",marginLeft:"20px",color:e.styles.color?e.styles.color:"grey",marginTop:"3px"}},"update"),s.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"2px",color:e.styles.color?e.styles.color:"grey",fontSize:"16px"}},Object($.w)("$__timeSheet",1)),s.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},s.a.createElement(_.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),s.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},s.a.createElement(_.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):s.a.createElement(w.a,{title:Object($.w)("$__timeSheet",1),icon:"update",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",minHeight:"50px",borderBottom:"1px solid #D3D3D3"},customButtons:[!V&&{title:"$__timeSheetExport",icon:"file_download",color:Object($.d)("colorText"),onClick:function(){J(!V)}}]}),ie?s.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}},s.a.createElement(S.a,null)):s.a.createElement(s.a.Fragment,null),V&&t&&s.a.createElement("div",{style:{padding:"15px",border:"1px solid black"}},s.a.createElement("fieldset",{style:{position:"relative",width:"100%",marginLeft:"7px",display:"flex",justifyContent:"space-between",marginBottom:"14px",marginTop:"7px"}},s.a.createElement("legend",null,Object($.w)("$__timeCourse",1)),s.a.createElement(O.a,{label:Object($.w)("$__initialDate",1),variant:Object($.d)("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:H||null},InputProps:{autoComplete:"new-password",onChange:function(e){Y(e.target.value)}},value:m}),s.a.createElement(O.a,{label:Object($.w)("$__endDate",1),variant:Object($.d)("fieldVariant"),name:"endDate",type:"date",min:m||null,InputLabelProps:{shrink:!0},inputProps:{min:m||null},InputProps:{autoComplete:"new-password",onChange:function(e){W(e.target.value)}},value:H})),r.users&&Object.keys(r.users).length>0&&t&&s.a.createElement(C.a,{style:{width:"100%"}},s.a.createElement(T.a,{style:{minWidth:"100%"},expandIcon:s.a.createElement(_.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement("div",{style:{color:Object($.d)("color"),fontSize:"12px"}},Object($.w)("$__users"),s.a.createElement(F.a,{max:6},Object.keys(Z).length>0&&Object.keys(Z).map((function(e,t){return s.a.createElement(P.a,{title:r.users[e].name,key:t},s.a.createElement(D.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),s.a.createElement(I.a,{style:{minWidth:"100%"}},s.a.createElement(A.a,null,Object.keys(we.current).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&s.a.createElement(s.a.Fragment,{key:e},s.a.createElement(N.a,{key:e,style:{minWidth:"100%"},control:s.a.createElement(s.a.Fragment,null,s.a.createElement(D.a,{alt:r.users[e].name.substr(0,1),src:r.users[e].image||null},r.users[e].name.substr(0,1)),s.a.createElement(b.a,{checked:!(!Z||!Z[e]),onChange:function(){!function(e){Z[e]&&Object.keys(Z).filter((function(e){return Z[e]})).length<=1?Q({}):Q(Object(i.a)(Object(i.a)({},Z),{},Object(a.a)({},e,!Z[e])))}(e)},color:"default"})),label:r.users[e].name||r.users[e].name}))}))))),s.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"7px"}},s.a.createElement(y.a,{data:ue}),s.a.createElement(v.a,{title:Object($.w)("$__closeFilter"),text:Object($.w)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){J(!V)},size:"25px"}))),s.a.createElement(k.a,{style:{height:"333px",position:"relative",backgroundColor:"#f5f5f5"}},t&&s.a.createElement(p.a,{data:ve,valueFormat:function(e){return Ce(e,!0),Ce(e)},enableArcLabels:!1,colors:(null===(n=e.dashboardConfig)||void 0===n||null===(o=n.colorsArr)||void 0===o||null===(c=o[0])||void 0===c?void 0:c.color)?{datum:"data.color"}:{scheme:"purpleRed_green"},activeOuterRadiusOffset:8,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},borderWidth:1,cornerRadius:3,enableArcLinkLabels:!1,innerRadius:.5,leavesOnly:!0,theme:{background:"transparent"},margin:{top:10,right:0,bottom:10,left:0},padAngle:1.3,sortByValue:!0}),s.a.createElement("div",{style:{width:"100px",wordWrap:"break-word",position:"absolute",top:"50%",left:"calc(50% - 50px)",fontWeight:"bold",color:Object($.d)("menu"),textAlign:"center"}},Ce(xe.current,!0))),t&&s.a.createElement(E.a,{style:{overflow:"scroll"}},s.a.createElement(x.a,null,Object.keys(ue).sort((function(e,t){return parseInt(ue[e].totalTimer)>parseInt(ue[t].totalTimer)?-1:parseInt(ue[e].totalTimer)<parseInt(ue[t].totalTimer)?1:0})).map((function(e,t){return s.a.createElement(Ie,{data:ue[e],key:e})})),s.a.createElement(Ie,{data:{name:Object($.w)("$__total"),timerText:Ce(xe.current)}}))),s.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},r.cards[Ee]&&"plan"===r.cards[Ee].type?Object($.w)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object($.w)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})))}))},50:function(e,t,r){"use strict";var n,a=r(88),o=r(8),i=r(2),c=r(10),l=r(5),s=r(0),u=r.n(s),d=r(6),p=r.n(d),f=r(71),h=r(73),m=r.n(h),g=r(15),b=r(43),v=r(3),y=r(13),x=r(14),w=r(101),_=r(198),O=r(20),j=r(64),E=r(11),k=r(46),S=r(343),L=r(344),C=r(150),I=r(135),T=r(353),D=r(735),F=r(690),N=r(165),A=r(345),P=r(55),$=r(24),M=r(182),B=r(1);function z(){z=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Y=Object(N.a)(A.a),R=f.b.div(n||(n=Object(a.a)(["\n            border-radius:5px;\n            min-width:200px;\n            background-color:#fff;\n            margin-bottom: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(B.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(B.d)("menu")," !important;"):""}));t.a=Object(x.b)((function(e){return{cardsExpanded:e.db.cardsExpanded,showPrivate:e.controls.lockPrivate,cards:e.db.cards,unlockedPrivates:e.controls.unlockedPrivates,controls:e.controls,searchs:e.searchs}}),(function(e){return Object(y.b)(g,e)}))((function e(t){var r,n,a,d,f,h,g,y,x,N=Y(),A=v.a.getState(),G=A.db,H=A.session,W=t.cardId&&G.cards[t.cardId]?G.cards[t.cardId]:(null===(r=t.data)||void 0===r?void 0:r._id)&&G.cards[null===(n=t.data)||void 0===n?void 0:n._id]?G.cards[t.data._id]:{},U=u.a.useState(!1),q=Object(l.a)(U,2),V=q[0],J=q[1],X=u.a.useState(t.cardsExpanded),K=Object(l.a)(X,2),Z=K[0],Q=K[1],ee=u.a.useState(!1),te=Object(l.a)(ee,2),re=te[0],ne=te[1],ae=u.a.useState(!1),oe=Object(l.a)(ae,2),ie=oe[0],ce=oe[1],le=u.a.useState(!!t.unlockedPrivates[W._id]),se=Object(l.a)(le,2),ue=se[0],de=se[1],pe=u.a.useState(t.cardColorPicker?Object($.r)(W):{}),fe=Object(l.a)(pe,2),he=fe[0],me=fe[1],ge=u.a.useState(!1),be=Object(l.a)(ge,2),ve=be[0],ye=be[1],xe=u.a.useState(!1),we=Object(l.a)(xe,2),_e=(we[0],we[1],u.a.useState({})),Oe=Object(l.a)(_e,2),je=Oe[0],Ee=Oe[1],ke=u.a.useRef(!0);u.a.useEffect((function(){return ke.current=!0,function(){ke.current=!1}}),[]);var Se=m()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),Le=u.a.createRef(),Ce=u.a.useRef(0),Ie=function(){if(t.onResize&&Le&&Le.current&&Le.current.clientHeight){var e=Le.current.clientHeight;t.separator&&(e+=55),Ce.current!==e&&(Ce.current=e,t.onResize(e,V))}};Object(s.useEffect)((function(){Le.current&&ke.current&&Ie()}),[V,t.manualExpanded,ve]),Object(s.useEffect)((function(){if(t.onResize&&Le&&Le.current){var e=new MutationObserver((function(){Ie()}));return e.observe(Le.current,{attributes:!0,childList:!0,subtree:!0}),function(){e.disconnect()}}}),[Le]),Object(s.useEffect)((function(){Se&&t.searchs&&t.searchs[Se]&&JSON.stringify(t.searchs[Se])!==JSON.stringify(je)&&ke.current&&Ee(t.searchs[Se])}),[t.searchs]),Object(s.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&ke.current&&ye(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&ve&&ke.current&&ye(!1)}),[null===t||void 0===t||null===(a=t.snapshot)||void 0===a?void 0:a.combineTargetFor]),u.a.useEffect((function(){t.unlockedPrivates[W._id]&&console.log(t.unlockedPrivates[W._id]),t.unlockedPrivates&&t.unlockedPrivates[W._id]&&ke.current&&de(!0),t.unlockedPrivates&&!t.unlockedPrivates[W._id]&&ke.current&&de(!1)}),[t.unlockedPrivates]),u.a.useEffect((function(){ke.current&&Q(t.cardsExpanded)}),[t.cardsExpanded]),u.a.useEffect((function(){t.onExpand&&ke.current&&t.onExpand(Z)}),[Z]);var Te=window.location.hash.split("/");if(Te[0]=Te[0].replace("#",""),u.a.useEffect((function(){ke.current&&t.cardColorPicker&&Te&&"overview"===Te[1]&&me(Object($.r)(W))}),[t.cards]),!W)return u.a.createElement(u.a.Fragment,null);var De=Object(B.j)(),Fe=Object($.t)(W._id);if(!W||!W||!W._id)return null;var Ne=!!(Object.keys(G.cards).filter((function(e){return G.cards[e]&&!0===G.cards[e]._selected&&G.cards[e].type&&G.cards[e].type.indexOf("guideline")>-1})).length>0&&Te&&Te[1]&&"matrix"===Te[1]&&"swot"===G.dataType.filter((function(e){return e.name===W.type}))[0].module),Ae=function(){var e=Object(c.a)(z().mark((function e(){var r,n,a,c,l,s;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=W.type.indexOf("guideline")>-1?"guideline":"objective"===W.type?"objective":"goal"===W.type?"goal":"action",a=Object(i.a)({},(null===(r=v.a.getState().searchs[Se])||void 0===r?void 0:r.selectedCards)||{}),"matrix"!==Te[1]&&(a&&a[n]&&a[n]===W._id?("guideline"===n&&(delete a.guideline,delete a.objective,delete a.goal,delete a.action),"objective"===n&&(delete a.objective,delete a.goal,delete a.action),"goal"===n&&(delete a.goal,delete a.action),"action"===n&&(delete a.action,delete a[n])):a=Object(i.a)(Object(i.a)({},a),{},Object(o.a)({},W.type.indexOf("guideline")>-1?"guideline":"objective"===W.type?"objective":"goal"===W.type?"goal":"action",W._id)),t.reduxFunction("ASYNC","SET_SEARCH",Object(i.a)(Object(i.a)({},v.a.getState().searchs),{},Object(o.a)({},Se,Object(i.a)(Object(i.a)({},v.a.getState().searchs[Se]||{}),{},{selectedCards:a}))))),Ne||"matrix"===Te[1]){e.next=6;break}return Pe(),e.abrupt("return");case 6:c={},Object.keys(G.cards).filter((function(e){return G.cards[e]&&!G.cards[e].deleted&&(G.cards[e]._planId===Te[0]||G.cards[e]._parent===Te[0])})).forEach((function(e){c=Object(i.a)(Object(i.a)({},c),{},Object(o.a)({},e,G.cards[e]))})),l=Object(i.a)({},G.cards),s=!W._selected,"swot"!==G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object.keys(c).filter((function(e){return c[e]._id!==W._id&&c[e].type&&c[e].type===W.type})).forEach((function(e){c[e]._selected&&(c[e]._selected=!1)})),W.type.indexOf("guideline")>-1&&Object.keys(c).forEach((function(e){c[e]._selected&&(c[e]._selected=!1)})),W.type.indexOf("objective")>-1&&Object.keys(c).filter((function(e){return"goal"===c[e].type})).forEach((function(e){c[e]._selected&&(c[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)(Object(i.a)({},l),c),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)(Object(i.a)({},G.cards[W._id]),c[W._id]),{},{_selected:s})))})),"swot"===G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object($.G)(t),s&&"matrix"===G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object($.H)(t,W._id);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=Object(c.a)(z().mark((function e(){var r,n,a;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(G.cards).filter((function(e){return G.cards[e]&&!G.cards[e].deleted&&(G.cards[e]._planId===Te[0]||G.cards[e]._parent===Te[0])})).forEach((function(e){r=Object(i.a)(Object(i.a)({},r),{},Object(o.a)({},e,G.cards[e]))})),n=Object(i.a)({},G.cards),a=!W._selected,"swot"!==G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==W._id&&r[e].type&&r[e].type===W.type})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),W.type.indexOf("guideline")>-1?Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):W.type.indexOf("objective")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):W.type.indexOf("goal")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("goal")||-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)(Object(i.a)({},n),r),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)(Object(i.a)({},G.cards[W._id]),r[W._id]),{},{_selected:a})))}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$e=function(){var e=Object(c.a)(z().mark((function e(){var r,n=arguments;return z().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(i.a)(Object(i.a)({},v.a.getState().sideModule),{},{db:t.db,id:W._id,module:"cardEdit",activeModule:r,data:W}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=Object(c.a)(z().mark((function e(){var r,n,a=arguments;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],W._hasStep&&!r&&Object(M.a)(Object(i.a)(Object(i.a)({},t),{},{nodeId:W._id})),W._hasStep&&!r){e.next=7;break}return e.next=5,P.a.post("/Card_Count",{id:W._id});case 5:n=e.sent,parseInt(n.data)>0?Object(B.c)({message:Object(B.w)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(B.w)("$__concludeAll"),text:Object(B.w)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){Object($.O)(Object(i.a)(Object(i.a)({},t),{},{data:{_id:W._id}}),{status:"completed"===W.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object($.e)(t,W._id,"completed"===W.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(B.w)("$__cancel"),text:Object(B.w)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(Object($.O)(Object(i.a)(Object(i.a)({},t),{},{data:{_id:W._id}}),{status:"completed"===W.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object($.e)(t,W._id,"completed"===W.status?"inProgress":"completed"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=Object(c.a)(z().mark((function e(t){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(Fe)>2||De.owner||De.plan&&(De.planAdmin||De.planModerate)?b.a.push("sp#".concat(t,"/dashboard")):$e("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ze=function(){var e=Object(c.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(B.c)({message:Object(B.w)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object($.o)(t,{_id:W._id},!1),t.directDeletion||t.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ye=function(){var e=Object(c.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(B.c)({message:Object(B.w)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object($.E)(t,{_id:W._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Re=!t.noExpanded&&(V||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||W._expanded||t.cardsExpanded)),Ge=!!(De&&(De.owner||De.plan&&(De.planAdmin||De.planModerate))||Fe>2),He={button:!1,date:null};if(He=W&&W._users&&Object.keys(W._users).filter((function(e){return e===H._id})).length>0&&G.dataType.filter((function(e){return e.name===W.type})).length>0&&G.dataType.filter((function(e){return e.name===W.type}))[0].modules.indexOf("myDay")>-1?W._users[Object.keys(W._users).filter((function(e){return e===H._id}))[0]].myDay?{button:!0,date:W._users[Object.keys(W._users).filter((function(e){return e===H._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},W&&W.private&&(!W._users||W._users&&!W._users[H._id]))return u.a.createElement("div",{ref:Le});if(re)return u.a.createElement(F.a,{cardId:W._id,toTemplate:!W.isTemplate,onComplete:function(){ke.current&&ne(!1)}});var We={title:(null===W||void 0===W?void 0:W.name)||Object(B.w)("$__new",1),icon:(null===W||void 0===W?void 0:W.icon)||W.type&&G&&G.dataType&&G.dataType.filter((function(e){return e.name===W.type}))[0]&&G.dataType.filter((function(e){return e.name===W.type}))[0].icon||"$__topic",iconTitle:"$__".concat(W.type)};if(W._planId&&(null===(d=G.cards[W._planId])||void 0===d?void 0:d.customColumns)&&(W.type.indexOf("guideline")>-1||W.type.indexOf("objective")||W.type.indexOf("goal"))){var Ue=JSON.parse(G.cards[W._planId].customColumns),qe=W.type.indexOf("guideline")>-1?"guideline":W.type;Ue["".concat(qe,"s")]&&(We=Object(i.a)(Object(i.a)(Object(i.a)({},We),Ue["".concat(qe,"s")].name?{iconTitle:Ue["".concat(qe,"s")].name}:{}),Ue["".concat(qe,"s")].icon?{icon:Ue["".concat(qe,"s")].icon}:{}))}return u.a.createElement(R,{ref:Le,separator:t.separator||!1,plan:!(!Re||"plan"!==W.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:W.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===W.type||!t.inLine),className:t.noShadow?N.containerNoShadow:N.container,selectable:t.showSelected,selected:!("matrix"!==Te[1]||!v.a.getState().db.cards[W._id]._selected)||!!(je&&je.selectedCards&&Object.keys(je.selectedCards).filter((function(e){return je.selectedCards[e]===W._id})).length>0),priority:W.priority&&G.priority.filter((function(e){return String(e.value)===String(W.priority)})).length>0?G.priority.filter((function(e){return String(e.value)===String(W.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){ke.current&&ce(!0)},onMouseLeave:function(){ke.current&&setTimeout((function(){ke.current&&ce(!1)}),100)},onClick:function(e){!(null===t||void 0===t?void 0:t.showSelectBox)&&(W._requireApproval&&G.cards[W._id]._parent&&G.cards[G.cards[W._id]._parent]&&(!G.cards[G.cards[W._id]._parent]._users[H._id]||G.cards[G.cards[W._id]._parent]._users[H._id]&&!G.cards[G.cards[W._id]._parent]._users[H._id].approvalResponsible)&&W&&W._users&&1===Object.keys(W._users).length&&!W._users[H._id]||t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&Ne||t.selectable)?Ae():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==W.type?t.locked||$e():Be(W._id):t.onClick(),t.onOpen&&t.onOpen()))},onContextMenu:function(e){}},("completed"===W.status||t.cardColorPicker&&he.color)&&u.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},u.a.createElement("div",{style:{position:"absolute",backgroundColor:t.cardColorPicker&&he.color?he.color:"rgba(0,0,0,1)",opacity:he.color?.2:.1,top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}})),u.a.createElement(u.a.Fragment,null,t.snapshot&&t.snapshot.combineTargetFor&&u.a.createElement("div",{style:{backgroundColor:Object(B.d)("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Object(B.w)("$__dropHereToLink")),u.a.createElement("div",{style:{position:"absolute",border:(null===t||void 0===t?void 0:t.selectedCard)&&"2px solid #4682B4",top:0,left:0,right:0,bottom:0}}),u.a.createElement("div",{style:{display:"flex",position:"relative"}},(null===t||void 0===t?void 0:t.showSelectBox)&&u.a.createElement("input",{type:"checkbox",style:{width:"20px",flex:1,height:"20px",display:"flex",top:"5px",left:"7px",alignItems:"center",cursor:"pointer",borderRadius:"2px",border:"1px solid #064373",position:"absolute"},defaultChecked:t.selectedCard,onClick:function(){t.onSelect(t.cardId)}}),u.a.createElement(j.a,{private:!(!W.private&&!W.parentPrivate),unlockedPrivates:!!t.unlockedPrivates[W._id],style:{paddingLeft:(null===t||void 0===t?void 0:t.showSelectBox)?"30px":""},setPrivate:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},v.a.getState().controls),{},{unlockedPrivates:Object(i.a)(Object(i.a)({},v.a.getState().controls.unlockedPrivates),{},Object(o.a)({},W._id,!t.unlockedPrivates[W._id]))})),ke.current&&de(!t.unlockedPrivates[W._id]),t.setPrivate&&t.setPrivate(!t.unlockedPrivates[W._id])},viewAllName:t.viewAllName,title:We.title,tooltipText:"".concat(W._parent&&G.cards[W._parent]?"".concat(G.cards[W._parent].name," / "):"").concat(We.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:We.icon,iconTitle:We.iconTitle,color:"#6d6d6d",editable:!(W.name||t.onlyOption&&!t.editable),_id:W._id,locked:!("link"!==W.type&&!t.locked),colorPicker:Ge&&t.cardColorPicker&&he&&!he.parent?function(e){(!he.color&&e||he.color&&he.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)({},G.cards),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)({},G.cards[W._id]),{},{color:e})))}))}:null,onEdit:"completed"!==W.status&&(Fe&&parseInt(Fe)>1||De&&De.plan&&(De.owner||De.planAdmin||De.planEdit||De.planModerate))?function(e){t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)({},G.cards),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)({},G.cards[W._id]),{},{name:e})))}))}:null,moreButton:ie,options:W.deleted?[{name:Object(B.w)("$__restoreThis",1),icon:"restore_from_trash",onClick:function(){Ye()},show:"hover",color:Object(B.d)("medium")}]:t.onlyOption||t.showSelected||t.locked?[]:[Object.keys(G.cards).filter((function(e){return G.cards[e]&&"step"===G.cards[e].type&&G.cards[e]._parent===W._id})).length>0&&{name:"$__openTaskList",icon:"schema",show:"fixed",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},v.a.getState().control),{},{board:W._id}))}},W.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(W.url,"_blank")}},"chatGroup"!==W.type&&"step"!==W.type&&!W.isTemplate&&!W.archived&&"completed"!==W.status&&{name:p()(new Date(1e3*He.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:p()(new Date(1e3*He.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:p()(new Date(1e3*He.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(He&&He.date&&(!He||!He.date||p()(new Date(1e3*He.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")));Object($.J)(t,{_id:W._id,userId:H._id,option:e}),t.myDayClick&&t.myDayClick()}},t.suggestion&&{name:"$__removeFromMyDaySuggestions",icon:"playlist_remove",show:"hover",onClick:function(){Object($.J)(t,{_id:W._id,userId:H._id,option:!1,noLog:!0}),t.myDayClick&&t.myDayClick()}},!W.archived&&!t.onlyOption&&(Fe&&parseInt(Fe)>1||De.owner||De.planAdmin||De.planEdit||De.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),$e()},show:"hover"},!W.archived&&!W.isTemplate&&W._users&&"completed"!==W.status&&W._users[H._id]&&(!W._kpiTimer||0===Object.keys(W._kpiTimer).length||W._kpiTimer&&Object.keys(W._kpiTimer).length>0&&0===Object.keys(W._kpiTimer).filter((function(e){return H&&H._id&&e&&W._kpiTimer[e]&&W._kpiTimer[e].userId&&W._kpiTimer[e].userId===H._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){Object(B.c)({message:Object(B.w)("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object($.w)(t,W._id),!(He&&He.date&&(!He||!He.date||p()(new Date(1e3*He.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")))&&Object($.J)(t,{_id:W._id,userId:H._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},W._users&&"completed"!==W.status&&W._users[H._id]&&W._hasStep&&{name:"$__completeStep",icon:"playlist_add_check",color:"#6ab6c2",show:"hover",onClick:function(){var e=Object(c.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Me();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},W._users&&"completed"!==W.status&&W._users[H._id]&&{name:"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(c.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Me(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!W.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&{name:W._selected?"$__removeSelection":"$__selectThis",icon:W._selected?"visibility_off":"visibility",hide:!0,onClick:function(){Ae()}},{name:"$__duplicate",icon:"content_copy",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},v.a.getState().control),{},{toCopyMove:W._id}))}},!W.isTemplate&&"plan"===W.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){ke.current&&ne(!0)}},W&&!W.isTemplate&&"plan"===W.type&&!W.archived&&(W._users&&W._users[H._id]&&W._users[H._id].access&&5===parseInt(W._users[H._id].access)||De&&De.planAdmin)&&{name:Object(B.w)("$__shelve"),icon:"archive",onClick:function(){Object($.M)(t,{_id:W._id,archived:!0})}},(Fe&&5===parseInt(Fe)||De.owner||De.planAdmin||De.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||W.archived||0===G.dataType.filter((function(e){return e.name===W.type})).length||G.dataType.filter((function(e){return e.name===W.type})).length>0&&"swot"===G.dataType.filter((function(e){return e.name===W.type}))[0].module?ze():$e("delete"),t.onAction&&t.onAction()},show:"hover"},W&&!W.isTemplate&&"plan"===W.type&&W.archived&&(W._users&&W._users[H._id]&&W._users[H._id].access&&parseInt(5===W._users[H._id])||De&&De.planAdmin)&&{name:Object(B.w)("$__unarchive"),icon:"archive",onClick:function(){Object($.M)(t,{_id:W._id,archived:null})}},!W.archived&&!W.isTemplate&&{name:W._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:W._isFavorite?"favorite":"favorite_border",color:Object(B.d)("medium"),onClick:function(){var e=Object(c.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(B.g)(t,W._id,!!W._isFavorite),t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)({},G.cards),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)({},G.cards[W._id]),{},{_isFavorite:!W._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!W.isTemplate&&!W.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==W.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==W.status?"lightgray":"green",onClick:function(){var e=Object(c.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Me();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:!t.noExpanded&&Re,noExpanding:t.expanded||G.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!Re),t.expanded||G.cardsExpanded||ke.current&&J((function(e){return!e}))},onClick:function(e){}})),W&&(W._cardCode||W.value||W.ref1||W.ref2)?u.a.createElement("div",{style:{width:"100%",clear:"both",marginLeft:(null===t||void 0===t?void 0:t.showSelectBox)?"30px":"",display:"flex",alignContent:"center",justifyContent:"space-between"}},W&&W._cardCode&&(!Re||Re&&!W.image)?u.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",W._cardCode):u.a.createElement(u.a.Fragment,null),u.a.createElement("div",{style:{display:"flex"}},W&&(W.ref1||W.ref2)?u.a.createElement("div",{style:{textAlign:"right",fontSize:11,marginTop:-9,color:"blue"}},"".concat(W.ref1," ")):u.a.createElement(u.a.Fragment,null),W&&W.ref2?u.a.createElement("div",{style:{textAlign:"right",fontSize:11,marginTop:-9,color:"green"}},"| ",W.ref2):u.a.createElement(u.a.Fragment,null)),W&&W.value?u.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",W.value):u.a.createElement(u.a.Fragment,null)):u.a.createElement(u.a.Fragment,null),("insight"===W.type||"link"===W.type)&&W._createdBy&&G.users[W._createdBy._id]||W._createdBy&&W._createdBy.channel&&W._createdBy._id&&G.users&&G.users[W._createdBy._id]?u.a.createElement("div",{style:{width:"calc(100% - 0px)",alignItems:"center",padding:"7px",display:"inline-flex",borderBottom:"solid 1px rgba(0,0,0,0.03)"}},u.a.createElement("div",{style:{position:"relative",float:"left"}},u.a.createElement(I.a,{title:W._createdBy.name||G.users[W._createdBy._id].name},u.a.createElement(C.a,{alt:W._createdBy.name||G.users[W._createdBy._id].name,src:(null===(f=G.users[W._createdBy._id])||void 0===f?void 0:f.image)||null,size:"12px",style:{width:16,height:16}},(null===(h=W._createdBy)||void 0===h||null===(g=h.name)||void 0===g?void 0:g.substr(0,1))||G.users[W._createdBy._id].name.substr(0,1)))),u.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px"}},u.a.createElement("div",{style:{color:Object(B.d)("menu"),fontWeight:"bold"}},u.a.createElement("span",{style:{fontSize:10,color:"gray"}},Object(B.w)("$__createdBy","*")),": ",(null===(y=W._createdBy)||void 0===y||null===(x=y.name)||void 0===x?void 0:x.split(" ")[0])||G.users[W._createdBy._id].name.split(" ")[0]),u.a.createElement("div",null,p()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===p()(1e3*W.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(p()(1e3*W.created_at).tz("America/Sao_Paulo").format("H:mm")):p()(new Date).tz("America/Sao_Paulo").format("YYYY")===p()(1e3*W.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(p()(1e3*W.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(p()(1e3*W.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))):u.a.createElement(u.a.Fragment,null),W._kpiTimer&&Object.keys(W._kpiTimer).length>0&&0!==Object.keys(W._kpiTimer).filter((function(e){return W._kpiTimer[e].userId===H._id})).length&&u.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},u.a.createElement(L.a,{data:W})),!t.noExpanded&&Re&&(!W.private||W.private&&(ue||v.a.getState().controls.lockPrivate))?u.a.createElement(u.a.Fragment,null,u.a.createElement(D.a,Object.assign({},t,{private:!!W.private,expanded:!0,Resume:!0,onResize:function(){}})),u.a.createElement("div",null,t.searchText&&W.description&&u.a.createElement("div",{className:N.description},Object(B.b)(W.description,t.searchText)))):Re?u.a.createElement(u.a.Fragment,null,u.a.createElement(T.a,null)):u.a.createElement(u.a.Fragment,null),W.isTemplate?u.a.createElement(u.a.Fragment,null):u.a.createElement("div",null,"completed"!==W.status&&(W.startDate&&p()(W.startDate).isValid()||W.endDate&&p()(W.endDate).isValid())?u.a.createElement("div",null,u.a.createElement("div",{className:W.endDate&&p()(new Date(1e3*W.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<p()().format("YYYY-MM-DD")&&"completed"!==W.status?N.lateDates:N.dates},W.startDate&&p()(W.startDate).isValid()&&u.a.createElement("div",{className:N.dateInfo},u.a.createElement(w.a,{overlap:"rectangular",className:N.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*W.startDate)instanceof Date&&!isNaN(new Date(1e3*W.startDate))?p()(new Date(1e3*W.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):p()(W.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),W.endDate&&p()(W.endDate).isValid()?u.a.createElement("div",{className:N.dateInfo},u.a.createElement(w.a,{overlap:"rectangular",className:N.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*W.endDate)instanceof Date&&!isNaN(new Date(1e3*W.endDate))?p()(new Date(1e3*W.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):p()(W.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):u.a.createElement(u.a.Fragment,null))):u.a.createElement(u.a.Fragment,null)),W._tags&&W._tags.filter((function(e){return e.value})).length>0?u.a.createElement("div",{style:t.showTags||Re?{marginBottom:33}:{}},u.a.createElement(_.a,{options:W._tags,expanded:!!(t.showTags||Re&&"plan"!==W.type&&"link"!==W.type&&"insight"!==W.type)})):u.a.createElement(u.a.Fragment,null),W._recurrenceId&&u.a.createElement("div",{style:{position:"absolute",width:"100%",bottom:"3px",left:"3px",display:"flex",fontSize:"11px",color:"lightgrey",alignItems:"center"}},u.a.createElement(w.a,{overlap:"rectangular",className:N.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(B.w)("$__recurrence")).concat(W.recurrenceCreatedDate?": ".concat(p()(W.recurrenceCreatedDate).format("DD/MM/YYYY")):""):u.a.createElement("div",{style:{maxWidth:"280px"}},Object(B.w)("$__recurrentActivityFrom"),":",u.a.createElement(e,{db:"cards",cardId:W._recurrenceId,Avatar:!0,ignoreList:!0,onlyOption:!0}))}),W.recurrenceCreatedDate?p()(W.recurrenceCreatedDate).format("DD/MM/YYYY"):""),Re||W._users&&Object.keys(W._users).filter((function(e){return null!==String(e)})).length>0&&(!W._users[H._id]||W._users[H._id]&&Object.keys(W._users).length>1)?u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{style:{width:"100%",marginTop:Re?37:7}},u.a.createElement("div",{className:N.usersContent},u.a.createElement("div",{className:N.users},u.a.createElement(S.a,{_id:W._id,data:W,permission:Ge,transparent:!0,myDay:!0,limit:3})))),u.a.createElement("div",{style:{clear:"both"}})):u.a.createElement(u.a.Fragment,null)),W.isTemplate&&u.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Object(B.d)("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),ke.current&&ne(!0)}},u.a.createElement(k.a,{text:Object(B.w)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),W._requireApproval&&(W._parent&&(!G.cards[W._parent]||G.cards[W._parent]&&G.cards[W._parent]._users&&(!G.cards[W._parent]._users[H._id]||G.cards[W._parent]._users[H._id]&&!G.cards[W._parent]._users[H._id].approvalResponsible))||G.cards[W._id]._users&&1===Object.keys(G.cards[W._id]._users).length&&G.cards[W._id]._users[H._id])?u.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},u.a.createElement("div",{style:{position:"absolute",backgroundColor:"rgba(0,0,0,0.6)",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"white"}},u.a.createElement(E.a,{icon:"lock",color:"white"}),u.a.createElement("span",null,Object(B.w)("$__awaitApproval")))):!ie&&"completed"===W.status&&u.a.createElement("div",{style:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",height:"2px",left:0,right:0,top:"20px"}},u.a.createElement("div",{style:{position:"absolute",right:0,bottom:-12,color:"#FFF",fontSize:10,padding:3,backgroundColor:"rgba(0,0,0,0.66)"}},Object(B.w)("$__completeDate"),":",Object(B.k)(W.completed_at||W.updated_at))),"plan"!==W.type&&W.deleted?u.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},u.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"}},u.a.createElement(O.a,{title:Object(B.w)("$__restoreThis",1),text:Object(B.w)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){Ye()},size:"17px",textSize:"17px",transparent:!0}))):u.a.createElement(u.a.Fragment,null),u.a.createElement(u.a.Fragment,null),u.a.createElement("div",{style:{clear:"both"}}))}))},514:function(e,t,r){},534:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(1),d=r(83),p=r(120),f=r(141),h=(r(156),r(96)),m=r(3);t.default=function(e){var t=e.tittle,r=e.preview,l=e.icon,g=Object(i.useState)([]),b=Object(o.a)(g,2),v=b[0],y=b[1],x=Object(i.useRef)([]),w=s()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),_=window.location.hash.split("/");_[0]=_[0].replace("#","");var O=Object(i.useState)({}),j=Object(o.a)(O,2),E=j[0],k=j[1],S=m.a.getState().db;return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&k(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(S.status.map((function(t,r){return{id:"await"===t.label.substring(3)?Object(u.w)("$__awaitAction"):Object(u.w)(t.label),label:"await"===t.label.substring(3)?"$__awaitAction":t.label,value:Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=S.cards[e].completed_at)||void 0===r?void 0:r.low)||S.cards[e].completed_at||(null===(n=S.cards[e].updated_at)||void 0===n?void 0:n.low)||S.cards[e].updated_at||(null===(a=S.cards[e].created_at)||void 0===a?void 0:a.low)||S.cards[e].created_at,i=s()(1e3*o),c=(null===E||void 0===E?void 0:E.startDate)?s()(1e3*(null===E||void 0===E?void 0:E.startDate)):s()().subtract(10,"years"),l=(null===E||void 0===E?void 0:E.endDate)?s()(1e3*(null===E||void 0===E?void 0:E.endDate)):s()();return S.cards[e]._planId===_[0]&&i.isBetween(c,l,null,"[]")&&!S.cards[e].deleted&&S.cards[e].status&&S.cards[e].status===t.value&&("iniciative"===S.cards[e].type||"task"===S.cards[e].type||"meeting"===S.cards[e].type||"iniciative"===S.cards[e].type||"myTask"===S.cards[e].type)&&(!S.cards[e].checklist||S.cards[e].checklist&&S.cards[e].showCard)})).length,color:t.color}}))),[{id:Object(u.w)("$__late"),label:"$__late",value:Object.keys(e.planCards).filter((function(e){return S.cards[e]._planId===_[0]&&!S.cards[e].deleted&&"completed"!==S.cards[e].status&&("iniciative"===S.cards[e].type||"task"===S.cards[e].type||"meeting"===S.cards[e].type||"iniciative"===S.cards[e].type||"myTask"===S.cards[e].type)&&(!S.cards[e].checklist||S.cards[e].checklist&&S.cards[e].showCard)&&S.cards[e].endDate&&s()(new Date(1e3*S.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(w)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.forEach((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).forEach((function(e){var t={label:e.label.substring(3),color:e.color};x.current.some((function(e){return e.label===t.label}))||(x.current=[].concat(Object(n.a)(x.current),[t]))})),y(t)}),[e.planCards,e.filter,E]),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(h.a,null,(function(a){var o;return c.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},c.a.createElement(d.a,{styles:e.styles,tittle:Object(u.w)("$__".concat(t)),icon:l,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),c.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),c.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},c.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},v.length>0&&!e.load&&a?c.a.createElement(p.a,{data:v,colors:{datum:"data.color"},margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#333333",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",2]]}}):c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))))),!r&&c.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},c.a.createElement(f.a,{legend:Object(n.a)(x.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:null===(o=e.filter)||void 0===o?void 0:o.colorsArr})))})))}},535:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r(0),o=r.n(a),i=r(757),c=r(122),l=r(241),s=r(83),u=r(70),d=r(74),p=r(11),f=r(50),h=r(6),m=r.n(h),g=r(1),b=r(3);t.default=function(e){var t=m()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),r=window.location.hash.split("/");r[0]=r[0].replace("#","");var h=b.a.getState().db,v=Object(a.useState)(!1),y=Object(n.a)(v,2),x=y[0],w=y[1],_=Object(a.useState)(1),O=Object(n.a)(_,2),j=O[0],E=O[1],k=Object(a.useState)(""),S=Object(n.a)(k,2),L=S[0],C=S[1],I=Object(a.useRef)(),T=Object(a.useState)(0),D=Object(n.a)(T,2),F=D[0],N=D[1];return Object(a.useEffect)((function(){if(I.current){var e=new ResizeObserver((function(){var e=I.current.clientHeight/42;N(e/2-1)}));return e.observe(I.current),function(){return e.disconnect()}}}),[]),o.a.createElement("div",{onMouseEnter:function(){return w(!0)},onMouseLeave:function(){return w(!1)},style:{height:"100%"}},o.a.createElement(u.a,{style:{marginTop:"0px",height:"100%",overflow:"hidden",borderRadius:"0px"}},o.a.createElement("div",null,e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(p.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(g.w)("$__todayTasks",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(p.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(p.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(s.a,{hover:x,tittle:Object(g.w)("$__todayTasks",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),x&&!e.edit&&o.a.createElement(c.a,{text:"Buscar",icon:"search",popper:o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(l.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&C(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),o.a.createElement(d.a,{style:{height:"100%",display:"flex",flexDirection:"column"}},o.a.createElement("div",{ref:I,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,n){return!!(h.cards[e]._planId===r[0]&&!h.cards[e].deleted&&h.cards[e].name.toLowerCase().includes(L.toLowerCase()?L:"")&&h.cards[e]._users&&Object.keys(h.cards[e]._users).filter((function(r){return h.cards[e]._users[r].myDay&&m()(new Date(1e3*h.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0)})).filter((function(e,t){return t>=(j-1)*F&&t<j*F})).map((function(e,t){return o.a.createElement(f.a,{db:"cards",key:e,data:h.cards[e]})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===r[0]&&!h.cards[e].deleted&&h.cards[e].name.toLowerCase().includes(L.toLowerCase()?L:"")&&h.cards[e]._users&&Object.keys(h.cards[e]._users).filter((function(r){return h.cards[e]._users[r].myDay&&m()(new Date(1e3*h.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0})).length/F)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},o.a.createElement(i.a,{page:j,count:Math.ceil(Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===r[0]&&!h.cards[e].deleted&&h.cards[e].name.toLowerCase().includes(L.toLowerCase()?L:"")&&h.cards[e]._users&&Object.keys(h.cards[e]._users).filter((function(r){return h.cards[e]._users[r].myDay&&m()(new Date(1e3*h.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0})).length/F),onChange:function(e,t){E(t)}})))))}},536:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(83),l=r(96),s=r(6),u=r.n(s),d=r(3),p=r(11),f=r(729),h=(r(156),r(1));t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=Object(o.useState)({index:0,showQuantity:8,number:8,finalIndex:8}),s=Object(a.a)(r,2),m=s[0],g=s[1],b=Object(o.useState)({}),v=Object(a.a)(b,2),y=v[0],x=v[1],w=Object(o.useState)([]),_=Object(a.a)(w,2),O=_[0],j=_[1],E=Object(o.useState)([]),k=Object(a.a)(E,2),S=k[0],L=k[1],C=d.a.getState().db;return Object(o.useEffect)((function(){var t,r,a;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&x(Object(n.a)(Object(n.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}))}),[e.dashboardConfig]),Object(o.useEffect)((function(){var t=d.a.getState().db,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=Object.keys(e.planCards).filter((function(e){var n,a,o,i=(null===(n=t.cards[e].completed_at)||void 0===n?void 0:n.low)||t.cards[e].completed_at||(null===(a=t.cards[e].updated_at)||void 0===a?void 0:a.low)||t.cards[e].updated_at||(null===(o=t.cards[e].created_at)||void 0===o?void 0:o.low)||t.cards[e].created_at,c=u()(1e3*i),l=(null===y||void 0===y?void 0:y.startDate)?u()(1e3*(null===y||void 0===y?void 0:y.startDate)):u()().subtract(10,"years"),s=(null===y||void 0===y?void 0:y.endDate)?u()(1e3*(null===y||void 0===y?void 0:y.endDate)):u()();return t.cards[e]._parent===r[0]&&"step"===t.cards[e].type&&c.isBetween(l,s,null,"[]")})).map((function(e,r){return t.cards[e]})),a=n.sort((function(e,t){return e.step-t.step})).map((function(e,n){return{id:e._id,value:Object.keys(t.cards).filter((function(a){return!t.cards[a].deleted&&(t.cards[a]._parent===e._id||0===n&&t.cards[a]._parent===r[0]&&"step"!==t.cards[a].type)})).length,label:e.name,name:e.name}}));L(n),j(a)}),[e.planCards,y,e.load]),i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(l.a,null,(function(t){return i.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"hidden"}},i.a.createElement(c.a,{filterConfig:{filterName:"etapas",filterItems:[],filterSelect:O.length},styles:e.styles,handleSetSelected:function(e){return g(Object(n.a)(Object(n.a)({},m),e))},tittle:Object(h.w)("$__"+e.tittle),icon:e.icon,datafilter:!0,handleSetoption:function(e){return g(Object(n.a)(Object(n.a)({},m),e))},edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),i.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),i.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},0!==m.index&&i.a.createElement(p.a,{onClick:function(){return g(Object(n.a)(Object(n.a)({},m),{},{index:m.index-1,finalIndex:m.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),S.length!==m.index+m.number&&S.length>m.showQuantity&&i.a.createElement(p.a,{onClick:function(){return g(Object(n.a)(Object(n.a)({},m),{},{index:m.index+1,finalIndex:m.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),i.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},i.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(h.d)("menu"),fontWeight:"bold",fontSize:16}},S.sort((function(e,t){return e.step-t.step})).map((function(e){return i.a.createElement("div",{key:e._id,style:{width:"".concat(1e4/m.showQuantity,"%"),textAlign:"center",wordWrap:" break-word ",maxHeight:"60px",overflow:"scroll",minHeight:"50px",alignSelf:"center"}},e.name)})).slice(m.index,m.finalIndex)),i.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(h.d)("menu"),fontWeight:"bold",fontSize:16}},S.sort((function(e,t){return e.step-t.step})).map((function(e){var t=0,r=e,n=Object.keys(C.cards).filter((function(t){return e&&e._id&&C.cards[t]._parent===e._id&&C.cards[t].deleted&&C.cards[t].value})).map((function(e){return C.cards[e].value}))||[];return r.showSumValues&&n.length>0&&n.forEach((function(e){t+=parseFloat(e)})),i.a.createElement("div",{key:e._id,style:{width:"".concat(1e4/m.showQuantity,"%"),textAlign:"center",fontSize:12,alignSelf:"center"}},t?"R$ ".concat(t):"")})).slice(m.index,m.finalIndex)),O.length>0&&i.a.createElement(f.a,{data:O.slice(m.index,m.finalIndex),direction:"horizontal",margin:{top:0,right:0,bottom:45,left:0},shapeBlending:.46,spacing:3,valueFormat:" > .0s",colors:{scheme:"reds"},isInteractive:!1,borderWidth:20,labelColor:{from:"color",modifiers:[["darker",3]]},beforeSeparatorLength:10,beforeSeparatorOffset:20,afterSeparatorLength:10,afterSeparatorOffset:20,currentPartSizeExtension:10,currentBorderWidth:7,motionConfig:"wobbly"}))))})))}},537:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(1),d=r(120),p=r(141),f=r(83),h=(r(156),r(96)),m=r(3);t.default=function(e){var t=Object(i.useState)([]),r=Object(o.a)(t,2),l=r[0],g=r[1],b=e.tittle,v=e.icon,y=s()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),x=window.location.hash.split("/");x[0]=x[0].replace("#","");var w=m.a.getState().db,_=Object(i.useRef)([]),O=Object(i.useState)({}),j=Object(o.a)(O,2),E=j[0],k=j[1];return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&k(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(w.status.map((function(t){return{id:"await"===t.label.substring(3)?Object(u.w)("$__awaitAction"):Object(u.w)(t.label),label:"await"===t.label.substring(3)?"$__awaitAction":t.label,value:Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=w.cards[e].completed_at)||void 0===r?void 0:r.low)||w.cards[e].completed_at||(null===(n=w.cards[e].updated_at)||void 0===n?void 0:n.low)||w.cards[e].updated_at||(null===(a=w.cards[e].created_at)||void 0===a?void 0:a.low)||w.cards[e].created_at,i=s()(1e3*o),c=(null===E||void 0===E?void 0:E.startDate)?s()(1e3*(null===E||void 0===E?void 0:E.startDate)):s()().subtract(10,"years"),l=(null===E||void 0===E?void 0:E.endDate)?s()(1e3*(null===E||void 0===E?void 0:E.endDate)):s()();return w.cards[e]._planId===x[0]&&"goal"===w.cards[e].type&&!w.cards[e].checklist&&i.isBetween(c,l,null,"[]")&&!w.cards[e].deleted&&w.cards[e].status&&w.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(u.w)("$__late"),label:"$__late",value:Object.keys(e.planCards).filter((function(e){var t,r,n,a=(null===(t=w.cards[e].completed_at)||void 0===t?void 0:t.low)||w.cards[e].completed_at||(null===(r=w.cards[e].updated_at)||void 0===r?void 0:r.low)||w.cards[e].updated_at||(null===(n=w.cards[e].created_at)||void 0===n?void 0:n.low)||w.cards[e].created_at,o=s()(1e3*a),i=(null===E||void 0===E?void 0:E.startDate)?s()(1e3*(null===E||void 0===E?void 0:E.startDate)):s()().subtract(10,"years"),c=(null===E||void 0===E?void 0:E.endDate)?s()(1e3*(null===E||void 0===E?void 0:E.endDate)):s()();return w.cards[e]._planId===x[0]&&!w.cards[e].checklist&&!w.cards[e].deleted&&o.isBetween(i,c,null,"[]")&&"completed"!==w.cards[e].status&&"goal"===w.cards[e].type&&w.cards[e].endDate&&s()(new Date(1e3*w.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(y)).tz("America/Sao_Paulo").format()})).length,color:"#FFFFFF"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.forEach((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).forEach((function(e){var t={label:e.label.substring(3),color:e.color};_.current.some((function(e){return e.label===t.label}))||(_.current=[].concat(Object(n.a)(_.current),[t]))})),g(t)}),[e.planCards,e.filter,E]),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(h.a,null,(function(t){return c.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},c.a.createElement(f.a,{styles:e.styles,tittle:Object(u.w)("$__".concat(b)),icon:v,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),c.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),c.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},c.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},!e.load&&t?c.a.createElement(d.a,{data:l,colors:{datum:"data.color"},margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.8]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#FFFFFF",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",2]]}}):c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))))),c.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},c.a.createElement(p.a,{legend:Object(n.a)(_.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:e.filter.colorsArr})))})))}},538:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(70),l=r(74),s=r(11),u=r(122),d=r(241),p=r(50),f=r(757),h=r(83),m=r(6),g=r.n(m),b=r(3),v=r(1);t.default=function(e){var t=i.a.useState(1),r=Object(a.a)(t,2),m=r[0],y=r[1],x=window.location.hash.split("/");x[0]=x[0].replace("#","");var w=b.a.getState().db,_=Object(o.useState)(!1),O=Object(a.a)(_,2),j=O[0],E=O[1],k=Object(o.useRef)(),S=Object(o.useState)({}),L=Object(a.a)(S,2),C=L[0],I=L[1],T=Object(o.useState)(""),D=Object(a.a)(T,2),F=D[0],N=D[1],A=Object(o.useState)(0),P=Object(a.a)(A,2),$=P[0],M=P[1];return Object(o.useEffect)((function(){var t,r,a;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&I(Object(n.a)(Object(n.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}))}),[e.dashboardConfig]),Object(o.useEffect)((function(){if(k.current){var e=new ResizeObserver((function(){var e=k.current.clientHeight/42;M(e/2-1)}));return e.observe(k.current),function(){return e.disconnect()}}}),[]),i.a.createElement("div",{onMouseEnter:function(){return E(!0)},onMouseLeave:function(){return E(!1)},style:{height:"100%",overflow:"hidden"}},i.a.createElement(c.a,{style:{height:"100%",margin:"0px"}},i.a.createElement("div",null,e.edit?i.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},i.a.createElement(s.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),i.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(v.w)("$__lastCompletedCards",1)),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(s.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(s.a,{className:"drag-handle",style:{height:"25px",cursor:"move",position:"absolute",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):i.a.createElement(h.a,{hover:j,tittle:Object(v.w)("$__lastCompletedCards",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),j&&!e.edit&&i.a.createElement(u.a,{text:"Buscar",icon:"search",popper:i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(d.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&N(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),i.a.createElement(l.a,null,i.a.createElement("div",{ref:k,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,t){var r,n,a,o=(null===(r=w.cards[e].completed_at)||void 0===r?void 0:r.low)||w.cards[e].completed_at||(null===(n=w.cards[e].updated_at)||void 0===n?void 0:n.low)||w.cards[e].updated_at||(null===(a=w.cards[e].created_at)||void 0===a?void 0:a.low)||w.cards[e].created_at,i=g()(1e3*o),c=(null===C||void 0===C?void 0:C.startDate)?g()(1e3*(null===C||void 0===C?void 0:C.startDate)):g()().subtract(10,"years"),l=(null===C||void 0===C?void 0:C.endDate)?g()(1e3*(null===C||void 0===C?void 0:C.endDate)):g()();return w.cards[e]._planId===x[0]&&!w.cards[e].deleted&&i.isBetween(c,l,null,"[]")&&(!w.cards[e].checklist||w.cards[e].checklist&&w.cards[e].showCard)&&"completed"===w.cards[e].status&&w.cards[e].name.toLowerCase().includes(F.toLowerCase()?F:"")})).sort((function(e,t){var r=w.cards[e].completed_at&&w.cards[e].completed_at.low?parseInt(w.cards[e].completed_at.low):"string"===typeof w.cards[e].completed_at?w.cards[e].completed_at:0,n=w.cards[t].completed_at&&w.cards[t].completed_at.low?parseInt(w.cards[t].completed_at.low):"string"===typeof w.cards[t].completed_at?w.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).filter((function(e,t){return t>=(m-1)*$&&t<m*$})).map((function(e,t){return i.a.createElement(p.a,{db:"cards",key:e,data:w.cards[e],inLine:!0})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){var t,r,n,a=(null===(t=w.cards[e].completed_at)||void 0===t?void 0:t.low)||w.cards[e].completed_at||(null===(r=w.cards[e].updated_at)||void 0===r?void 0:r.low)||w.cards[e].updated_at||(null===(n=w.cards[e].created_at)||void 0===n?void 0:n.low)||w.cards[e].created_at,o=g()(1e3*a),i=(null===C||void 0===C?void 0:C.startDate)?g()(1e3*(null===C||void 0===C?void 0:C.startDate)):g()().subtract(10,"years"),c=(null===C||void 0===C?void 0:C.endDate)?g()(1e3*(null===C||void 0===C?void 0:C.endDate)):g()();return w.cards[e]._planId===x[0]&&o.isBetween(i,c,null,"[]")&&"completed"===w.cards[e].status})).length/$)>1&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},i.a.createElement(f.a,{page:m,count:Math.ceil(Object.keys(w.cards).filter((function(e){var t,r,n,a=(null===(t=w.cards[e].completed_at)||void 0===t?void 0:t.low)||w.cards[e].completed_at||(null===(r=w.cards[e].updated_at)||void 0===r?void 0:r.low)||w.cards[e].updated_at||(null===(n=w.cards[e].created_at)||void 0===n?void 0:n.low)||w.cards[e].created_at,o=g()(1e3*a),i=(null===C||void 0===C?void 0:C.startDate)?g()(1e3*(null===C||void 0===C?void 0:C.startDate)):g()().subtract(10,"years"),c=(null===C||void 0===C?void 0:C.endDate)?g()(1e3*(null===C||void 0===C?void 0:C.endDate)):g()();return w.cards[e]._planId===x[0]&&o.isBetween(i,c,null,"[]")&&"completed"===w.cards[e].status&&w.cards[e].name.toLowerCase().includes(F.toLowerCase()?F:"")})).length/$),onChange:function(e,t){y(t)}})))))}},539:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(1),l=r(6),s=r.n(l),u=r(83),d=r(50),p=r(757),f=r(70),h=r(74),m=r(11),g=r(122),b=r(241),v=r(3);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=v.a.getState().db,l=s()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),y=Object(o.useState)(1),x=Object(a.a)(y,2),w=x[0],_=x[1],O=Object(o.useState)(""),j=Object(a.a)(O,2),E=j[0],k=j[1],S=Object(o.useState)(!1),L=Object(a.a)(S,2),C=L[0],I=L[1],T=Object(o.useRef)(),D=Object(o.useState)(0),F=Object(a.a)(D,2),N=F[0],A=F[1],P=Object(o.useState)({}),$=Object(a.a)(P,2),M=$[0],B=$[1];Object(o.useEffect)((function(){var t,r,a;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&B(Object(n.a)(Object(n.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}))}),[e.dashboardConfig]);var z=e.planCards&&Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=r.cards[e].completed_at)||void 0===t?void 0:t.low)||r.cards[e].completed_at||(null===(n=r.cards[e].updated_at)||void 0===n?void 0:n.low)||r.cards[e].updated_at||(null===(a=r.cards[e].created_at)||void 0===a?void 0:a.low)||r.cards[e].created_at,i=s()(1e3*o),c=(null===M||void 0===M?void 0:M.startDate)?s()(1e3*(null===M||void 0===M?void 0:M.startDate)):s()().subtract(10,"years"),u=(null===M||void 0===M?void 0:M.endDate)?s()(1e3*(null===M||void 0===M?void 0:M.endDate)):s()();return!r.cards[e].deleted&&"completed"!==r.cards[e].status&&i.isBetween(c,u,null,"[]")&&r.cards[e].name.toLowerCase().includes(E.toLowerCase()?E:"")&&r.cards[e].endDate&&s()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(l)).tz("America/Sao_Paulo").format()})).map((function(e){return e}));return Object(o.useEffect)((function(){if(T.current){var e=new ResizeObserver((function(){var e=T.current.clientHeight/42;A(e/2-1)}));return e.observe(T.current),function(){return e.disconnect()}}}),[]),i.a.createElement("div",{onMouseEnter:function(){return I(!0)},onMouseLeave:function(){return I(!1)},style:{height:"100%"}},i.a.createElement(f.a,{style:{marginTop:"0px",height:"100%"}},i.a.createElement("div",null,e.edit?i.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},i.a.createElement(m.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),i.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(c.w)("$__lateActivities",1)),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(m.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(m.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):i.a.createElement(u.a,{hover:C,tittle:Object(c.w)("$__lateActivities",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),C&&!e.edit&&i.a.createElement(g.a,{text:"Buscar",icon:"search",popper:i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(b.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&k(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),e.planCards&&i.a.createElement(h.a,{style:{height:"100%",display:"flex",flexDirection:"column"}},i.a.createElement("div",{ref:T,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},z.sort((function(e,t){var n=r.cards[e].endDate,a=r.cards[t].endDate;return n>a?-1:n<a?1:0})).filter((function(e,t){return t>=(w-1)*N&&t<w*N})).map((function(e,t){return i.a.createElement(d.a,{db:"cards",key:e,data:r.cards[e],inLine:!0})}))),Math.ceil(z.length/N)>1&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},i.a.createElement(p.a,{page:w,count:Math.ceil(z.length/N),onChange:function(e,t){_(t)}})))))}},540:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(1),d=r(83),p=r(141),f=r(120),h=r(124),m=r.n(h),g=(r(156),r(96)),b=r(3);t.default=function(e){var t=e.tittle,r=s()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),l=window.location.hash.split("/");l[0]=l[0].replace("#","");var h=Object(i.useRef)([]),v=Object(i.useState)([]),y=Object(o.a)(v,2),x=y[0],w=y[1],_=Object(i.useState)({}),O=Object(o.a)(_,2),j=O[0],E=O[1];return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&E(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=b.a.getState().db,o=[].concat(Object(n.a)(t.status.map((function(r,n){return{id:"await"===r.label.substring(3)?Object(u.w)("$__awaitAction"):Object(u.w)(r.label),label:"await"===r.label.substring(3)?"$__awaitAction":r.label,value:Object.keys(e.planCards).filter((function(e){var n,a,o,i=(null===(n=t.cards[e].completed_at)||void 0===n?void 0:n.low)||t.cards[e].completed_at||(null===(a=t.cards[e].updated_at)||void 0===a?void 0:a.low)||t.cards[e].updated_at||(null===(o=t.cards[e].created_at)||void 0===o?void 0:o.low)||t.cards[e].created_at,c=s()(1e3*i),u=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),d=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return t.cards[e]._planId===l[0]&&!t.cards[e].deleted&&c.isBetween(u,d,null,"[]")&&t.cards[e].type.indexOf("guideline")>-1&&t.cards[e].status&&t.cards[e].status===r.value})).length,color:r.color}}))),[{id:Object(u.w)("$__late"),label:"$__late",value:Object.keys(e.planCards).filter((function(e){var n,a,o,i=(null===(n=t.cards[e].completed_at)||void 0===n?void 0:n.low)||t.cards[e].completed_at||(null===(a=t.cards[e].updated_at)||void 0===a?void 0:a.low)||t.cards[e].updated_at||(null===(o=t.cards[e].created_at)||void 0===o?void 0:o.low)||t.cards[e].created_at,c=s()(1e3*i),u=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),d=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return t.cards[e]._planId===l[0]&&!t.cards[e].deleted&&c.isBetween(u,d,null,"[]")&&t.cards[e].type.indexOf("guideline")>-1&&t.cards[e].endDate&&s()(new Date(1e3*t.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(o=o.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.forEach((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).forEach((function(e){var t={label:e.label.substring(3),color:e.color};h.current.some((function(e){return e.label===t.label}))||(h.current=[].concat(Object(n.a)(h.current),[t]))})),w(o)}),[e.planCards,e.filter,j]),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(g.a,null,(function(r){return c.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},c.a.createElement(d.a,{styles:e.styles,tittle:Object(u.w)("$__".concat(t)),icon:m.a,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),c.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),c.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},c.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},!e.load&&r?c.a.createElement(f.a,{data:x,colors:{datum:"data.color"},margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#333333",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",2]]}}):c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))))),c.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},c.a.createElement(p.a,{legend:Object(n.a)(h.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:e.filter.colorsArr})))})))}},541:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(122),l=r(241),s=r(83),u=r(11),d=r(70),p=r(74),f=r(50),h=r(757),m=r(6),g=r.n(m),b=r(1),v=r(3);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=v.a.getState().db,m=g()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),y=i.a.useState(1),x=Object(a.a)(y,2),w=x[0],_=x[1],O=Object(o.useState)(!1),j=Object(a.a)(O,2),E=j[0],k=j[1],S=Object(o.useRef)(),L=Object(o.useState)(""),C=Object(a.a)(L,2),I=C[0],T=C[1],D=Object(o.useState)(0),F=Object(a.a)(D,2),N=F[0],A=F[1],P=Object(o.useState)({}),$=Object(a.a)(P,2),M=$[0],B=$[1];Object(o.useEffect)((function(){var t,r,a;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&B(Object(n.a)(Object(n.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}))}),[e.dashboardConfig]);var z=e.planCards&&Object.keys(e.planCards).filter((function(e){var n,a,o,i=(null===(n=r.cards[e].completed_at)||void 0===n?void 0:n.low)||r.cards[e].completed_at||(null===(a=r.cards[e].updated_at)||void 0===a?void 0:a.low)||r.cards[e].updated_at||(null===(o=r.cards[e].created_at)||void 0===o?void 0:o.low)||r.cards[e].created_at,c=g()(1e3*i),l=(null===M||void 0===M?void 0:M.startDate)?g()(1e3*(null===M||void 0===M?void 0:M.startDate)):g()().subtract(10,"years"),s=(null===M||void 0===M?void 0:M.endDate)?g()(1e3*(null===M||void 0===M?void 0:M.endDate)):g()();return c.isBetween(l,s,null,"[]")&&r.cards[e]._planId===t[0]&&!r.cards[e].deleted&&r.cards[e].name.toLowerCase().includes(I.toLowerCase()?I:"")&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&g()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=g()(new Date(m)).tz("America/Sao_Paulo").format()})).map((function(e){return e}));return Object(o.useEffect)((function(){if(S.current){var e=new ResizeObserver((function(){var e=S.current.clientHeight/42;A(e/2-1)}));return e.observe(S.current),function(){return e.disconnect()}}}),[]),i.a.createElement("div",{style:{height:"100%"},onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)}},i.a.createElement(d.a,{style:{marginTop:"0px",height:"100%"}},i.a.createElement("div",null,e.edit?i.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},i.a.createElement(u.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),i.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(b.w)("$__nextActivities",1)),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(u.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(u.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):i.a.createElement(s.a,{hover:E,tittle:Object(b.w)("$__nextActivities",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),E&&!e.edit&&i.a.createElement(c.a,{text:"Buscar",icon:"search",popper:i.a.createElement("div",{style:{padding:"15px"}},i.a.createElement(l.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&T(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),i.a.createElement(p.a,null,i.a.createElement("div",{ref:S,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},z.sort((function(e,t){var n=r.cards[e].completed_at&&r.cards[e].completed_at.low?parseInt(r.cards[e].completed_at.low):"string"===typeof r.cards[e].completed_at?r.cards[e].completed_at:0,a=r.cards[t].completed_at&&r.cards[t].completed_at.low?parseInt(r.cards[t].completed_at.low):"string"===typeof r.cards[t].completed_at?r.cards[t].completed_at:0;return n>a?-1:n<a?1:0})).filter((function(e,t){return t>=(w-1)*N&&t<w*N})).map((function(e,t){return i.a.createElement(f.a,{db:"cards",key:e,data:r.cards[e],inLine:!0})}))),Math.ceil(z.length/N)>1&&i.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},i.a.createElement(h.a,{page:w,count:Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===t[0]&&"completed"!==r.cards[e].status&&r.cards[e].name.toLowerCase().includes(I.toLowerCase()?I:"")&&r.cards[e].startDate&&g()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=g()(new Date(m)).tz("America/Sao_Paulo").format()})).length/N),onChange:function(e,t){_(t)}})))))}},542:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(19),o=r(10),i=r(5),c=r(0),l=r.n(c),s=r(33),u=r(203),d=r(14),p=r(13),f=r(15),h=r(3),m=r(121),g=r(1),b=r(11);function v(){v=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var y=["January","February","March","April","May","June","July","August","September","October","November","December"];t.default=l.a.memo(Object(d.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(p.b)(f,e)}))((function(e){var t,r=Object(c.useRef)(!0),d=window.location.hash.split("/");d[0]=d[0].replace("#","");var p=Array.from(new Set(e.data.flatMap((function(e){return Object.keys(e).filter((function(e){return y.includes(e)||e.length<3}))}))));(null===p||void 0===p||null===(t=p[0])||void 0===t?void 0:t.length)<3?p.sort((function(e,t){return e-t})):p.sort((function(e,t){return y.indexOf(e)-y.indexOf(t)}));var f=e.timeline,x=h.a.getState().db,w=Object(c.useState)(!1),_=Object(i.a)(w,2),O=_[0],j=_[1],E=Object(c.useState)(!1),k=Object(i.a)(E,2),S=k[0],L=k[1],C=Object.keys(e.planCards),I=h.a.getState().db.cards,T=function e(t){var r=[t];return Object.keys(I).filter((function(e){return I[e]._parent===t})).map(function(){var t=Object(o.a)(v().mark((function t(n,o){var i;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(i=e(n))&&(r=Object(a.a)(new Set([].concat(Object(a.a)(r),Object(a.a)(i)))));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),r},D=function(e,t){return new Promise(function(){var r=Object(o.a)(v().mark((function r(n){var a,i;return v().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}return r.abrupt("return",n(""));case 2:a=0,C.filter((function(t){return!x.cards[t].deleted&&"completed"===x.cards[t].status&&x.cards[t]._tags&&x.cards[t]._tags.filter((function(t){return t.value===e})).length>0})).forEach(function(){var e=Object(o.a)(v().mark((function e(r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=T(r)).length>0&&n.filter((function(e){return!x.cards[e].deleted&&"completed"===x.cards[e].status&&f[e]})).forEach((function(e){var r=0;Object.keys(f[e]).filter((function(r){return r&&f[e][r]&&!f[e][r].deleted&&"timer"===f[e][r].type&&(!t||t&&parseInt(f[e][r].ini)>=parseInt(t.start)&&parseInt(f[e][r].fin)<=parseInt(t.end))})).forEach((function(t){var n=f[e][t].fin-f[e][t].ini;f[e][t]._users&&f[e][t]._users.filter((function(e){return e._id})).length>0&&(n*=f[e][t]._users.filter((function(e){return e._id})).length),r+=n})),a+=r}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),a&&(i=Object(g.v)(a),n("".concat(i.hours?"".concat(i.hours,"H "):"").concat(i.minutes?"".concat(i.minutes,"m"):""))),n("");case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}())},F={border:"1px solid #dddddd",padding:"5px 10px",color:"black"},N=function(){var e=Object(o.a)(v().mark((function e(t,r){var a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.data.map(function(){var e=Object(o.a)(v().mark((function e(t,a){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t.color),e.abrupt("return",new Promise(function(){var e=Object(o.a)(v().mark((function e(i){var c,s;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=r.map(function(){var e=Object(o.a)(v().mark((function e(r,n){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=Object(o.a)(v().mark((function e(n){var a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,10)}));case 2:return e.next=4,D(t.tag,t["Period__".concat(r.replace("$__",""))]||null);case 4:e.t0=e.sent,e.t1=r,a={hour:e.t0,cellRef:e.t1},n(a);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=3,Promise.all(c);case 3:s=e.sent,i(l.a.createElement("tr",{key:a},l.a.createElement("td",{style:Object(n.a)(Object(n.a)({},F),{},{display:"flex"})},l.a.createElement("div",{style:{width:"15px",height:"15px",backgroundColor:t.color,alignSelf:"center",marginRight:"5px",borderRadius:"50%"}}),t.label),s.map((function(e,r){return l.a.createElement("td",{style:Object(n.a)(Object(n.a)({},F),{},{position:"relative"}),key:r},l.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap"}},(t[e.cellRef]||0)+(e.hour?" /":""),l.a.createElement("div",{style:{display:"flex",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"}},e.hour&&l.a.createElement(b.a,null,"history"),e.hour),l.a.createElement(m.a,{title:l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{style:{margin:"10px",fontSize:"16px",justifyContent:"center"}},"object"===typeof t&&Object.keys(t).map((function(r,n){if(["inProgress","completed","notStarted","paused","awaitAction"].includes(r)){var a="";switch(r){case"inProgress":a="#011E41";break;case"completed":a="#5A7F71";break;case"notStarted":a="#929497";break;case"paused":a="#EBA900";break;case"awaitAction":a="pink";break;default:a="white"}return l.a.createElement("div",{key:n,style:{marginBottom:"8px"}},Object.keys(t[r]).filter((function(t,r){return t===e.cellRef})).map((function(e,n){var o=t[r][e];return l.a.createElement("div",{key:n,style:{display:"flex",marginLeft:"-10px",marginTop:"5px"}},l.a.createElement("div",{style:{borderRadius:"50%",backgroundColor:a,height:"20px",width:"20px",alignSelf:"center",marginRight:"10px",marginTop:"-3.5px"}}," "),Object(g.w)("$__".concat(r)),": ",o)})))}}))))},l.a.createElement("span",{style:{width:"100%",height:"100%",margin:"0px",padding:"0px",position:"absolute",left:"0px",top:"0px"}}))))}))));case 5: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)}}()));case 2:(a=e.sent).length>0&&(j(a),L(!0));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return Object(c.useEffect)((function(){return r.current=!0,function(){r.current=!1}}),[]),Object(c.useEffect)((function(){e.data.length>0&&N(e,p)}),[e.data]),l.a.createElement("div",{style:{width:"100%",height:"100%"}},l.a.createElement("div",null,l.a.createElement(s.a,null,l.a.createElement(u.a,{className:"grid",style:{padding:"0px"},xs:12},p.length>0&&l.a.createElement("table",{style:{borderCollapse:"collapse",fontSize:"0.8em",fontFamily:"sans-serif",width:"100%",maxHeight:"44px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",{tyle:F}),p.map((function(e,t){return l.a.createElement("th",{style:F,key:t},e.length<3?Object(g.w)("$__week")+" "+(t+1):Object(g.w)("$__".concat(e)))})))),l.a.createElement("tbody",null,!S&&e.data.map((function(e,t){return l.a.createElement("tr",{key:t},l.a.createElement("td",{style:Object(n.a)(Object(n.a)({},F),{},{display:"flex"})},l.a.createElement("div",{style:{width:"15px",height:"15px",backgroundColor:e.color,alignSelf:"center",marginRight:"5px",borderRadius:"50%"}}),e.label),p.map((function(t,r){return l.a.createElement("td",{style:Object(n.a)(Object(n.a)({},F),{},{position:"relative"}),key:r},(null===e||void 0===e?void 0:e[t])||0,l.a.createElement(m.a,{title:l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{style:{width:"200px",marginBottom:"20px",fontSize:"16px",marginTop:"20px"}}))},l.a.createElement("span",{style:{width:"100%",height:"100%",margin:"0px",padding:"0px",position:"absolute",left:"0px",top:"0px"}})))})))}))),l.a.createElement("tbody",null,S&&O))))))})))},543:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(8),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(141),u=r(196),d=r(83),p=(r(156),r(96)),f=r(3),h=r(6),m=r.n(h),g=r(1),b=r(11);t.default=function(e){var t=Object(c.useRef)([]),r=f.a.getState().db,h=Object(c.useState)({}),v=Object(i.a)(h,2),y=v[0],x=v[1],w=Object(c.useState)({index:0,showQuantity:10,number:10,finalIndex:10}),_=Object(i.a)(w,2),O=_[0],j=_[1],E=Object(c.useState)({}),k=Object(i.a)(E,2),S=k[0],L=k[1],C=window.location.hash.split("/");C[0]=C[0].replace("#",""),Object(c.useEffect)((function(){var t,r,n;(Object.keys(e.filter).length>0&&j(Object(o.a)(Object(o.a)({},O),e.filter)),Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0)&&x(Object(o.a)(Object(o.a)(Object(o.a)({},O),null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.filter,e.dashboardConfig]),Object(c.useEffect)((function(){var i={};e.planCards&&!e.load&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).filter((function(e){return!r.cards[e].deleted})).forEach((function(e){var c;Object.keys(null===(c=r.cards[e])||void 0===c?void 0:c._users).forEach((function(c){var l,s;if(!((null===O||void 0===O||null===(l=O.users)||void 0===l?void 0:l.length)>0)||O.users.includes(null===(s=r.cards[e])||void 0===s?void 0:s._users[c]._id)){var u,d,p,f,h,g;if(!i[c])i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},i[c]),{},(g={},Object(a.a)(g,r.cards[e].status,0),Object(a.a)(g,"allTask",0),Object(a.a)(g,"user",null===(p=r.cards[e])||void 0===p?void 0:p._users[c].name.match(/\b(\w)/g).join("")),Object(a.a)(g,"id",c),Object(a.a)(g,"image",null===(f=r.cards[e])||void 0===f?void 0:f._users[c].image),Object(a.a)(g,"name",null===(h=r.cards[e])||void 0===h?void 0:h._users[c].name),g))));if((null===(u=r.cards[e])||void 0===u||null===(d=u._createdBy)||void 0===d?void 0:d._id)&&r.cards[e]._createdBy._id===c){var b,v,x,w=(null===(b=r.cards[e].completed_at)||void 0===b?void 0:b.low)||r.cards[e].completed_at||(null===(v=r.cards[e].updated_at)||void 0===v?void 0:v.low)||r.cards[e].updated_at||(null===(x=r.cards[e].created_at)||void 0===x?void 0:x.low)||r.cards[e].created_at,_=m()(1e3*w).format("YYYYMMDD"),j=(null===y||void 0===y?void 0:y.startDate)?m()(1e3*(null===y||void 0===y?void 0:y.startDate)).format("YYYYMMDD"):O.startDate?m()(1e3*O.startDate).format("YYYYMMDD"):m()().subtract(1,"month").format("YYYYMMDD"),E=(null===y||void 0===y?void 0:y.endDate)?m()(1e3*(null===y||void 0===y?void 0:y.endDate)).format("YYYYMMDD"):O.endDate?m()(1e3*O.endDate).format("YYYYMMDD"):m()().format("YYYYMMDD");if(parseInt(_)>=parseInt(j)&&parseInt(_)<=parseInt(E)&&"step"!==r.cards[e].type){var k,S,L,C,I,T=r.status.filter((function(t){return t.value===r.cards[e].status}))[0].color;(null===O||void 0===O?void 0:O.colorsArr)&&O.colorsArr.forEach((function(t){t.label===r.cards[e].status&&(T=t.color)})),i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},i[c]),{},(I={},Object(a.a)(I,r.cards[e].status,(null===(k=i[c])||void 0===k?void 0:k[r.cards[e].status])?(null===(S=i[c])||void 0===S?void 0:S[r.cards[e].status])+1:1),Object(a.a)(I,"allTask",(null===(L=i[c])||void 0===L?void 0:L.allTask)?(null===(C=i[c])||void 0===C?void 0:C.allTask)+1:1),Object(a.a)(I,r.cards[e].status+"Color",T),I))));var D={label:r.cards[e].status,color:T};t.current.some((function(e){return e.label===D.label}))||(t.current=[].concat(Object(n.a)(t.current),[D]))}}}}))})),S!==i&&L(i))}),[e.planCards,e.load,O,e.filter,y]);var I=(null===y||void 0===y?void 0:y.startDate)?m()(1e3*(null===y||void 0===y?void 0:y.startDate)).format("DD/MM/YYYY"):O.startDate?m()(1e3*O.startDate).format("DD/MM/YYYY"):m()().subtract(1,"month").format("DD/MM/YYYY"),T=(null===y||void 0===y?void 0:y.endDate)?m()(1e3*(null===y||void 0===y?void 0:y.endDate)).format("DD/MM/YYYY"):O.endDate?m()(1e3*O.endDate).format("DD/MM/YYYY"):m()().format("DD/MM/YYYY");return l.a.createElement("div",{style:{height:"100%",width:"100%"}},l.a.createElement(p.a,null,(function(r){return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){j(Object(o.a)(Object(o.a)({},O),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},O),t),{},{id:e.id}))},filterConfig:{filterSelect:Object.keys(S).length>0&&Object.values(S).length},tittle:Object(g.w)("$__"+e.tittle),icon:e.icon,styles:e.styles,indicators:O&&O,datafilter:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){j(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},O),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},!e.load&&r&&l.a.createElement("div",{style:{position:"absolute",right:"2%",top:"2%",padding:"5px",display:"flex",zIndex:"9",justifyContent:"center",alignContent:"center"}},l.a.createElement("div",{style:{marginTop:"2px",marginRight:"4px"}},I+" ~ ",T+" -- ",O.showQuantity<Object.keys(S).length?O.showQuantity+"/":Object.keys(S).length+"/",Object.keys(S).length>0&&l.a.createElement("span",null,Object.keys(S).length)),l.a.createElement(b.a,null,"person")),0!==O.index&&l.a.createElement(b.a,{onClick:function(){return j(Object(o.a)(Object(o.a)({},O),{},{index:O.index-1,finalIndex:O.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),Object.keys(S).length!==O.index+O.number&&Object.keys(S).length>O.showQuantity&&l.a.createElement(b.a,{onClick:function(){return j(Object(o.a)(Object(o.a)({},O),{},{index:O.index+1,finalIndex:O.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},Object.keys(S).length>0&&!e.load&&r?l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},l.a.createElement(u.a,{data:Object.values(S).sort((function(e,t){return e.allTask>t.allTask?-1:e.allTask<t.allTask?1:0})).slice(O.index,O.finalIndex),keys:["inProgress","completed","notStarted","paused","awaitAction"],colors:function(e){var t=e.id;return e.data["".concat(t,"Color")]},tooltip:function(e){return l.a.createElement("div",{style:{fontSize:"12px",width:"200px",marginBottom:"10px",zIndex:"99999"}},l.a.createElement("div",{style:{display:"flex",marginLeft:"5px",marginTop:"10px",textOverflow:"ellipsis",overflow:"hidden"}},l.a.createElement("div",{style:{display:"flex",width:"40px",height:"32px",backgroundImage:'url("'.concat(e.data.image,'")'),backgroundColro:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%",alignSelf:"center"}}),l.a.createElement("p",{style:{margin:"0px",marginLeft:"12px",fontSize:"20px",alignSelf:"center",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.data.name)),l.a.createElement("div",{style:{borderBottom:"1px solid #d1d1cf",marginTop:"10px"}}),l.a.createElement("div",{style:{width:"100%",fontSize:"18px",padding:"10px",marginBottom:"5px",marginTop:"4px"}},Object.entries(e.data).map((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.entries(e.data),r=Object(i.a)(t,2),n=r[0],a=r[1];if(["inProgress","completed","notStarted","paused","awaitAction"].includes(n)){var o="";switch(n){case"inProgress":o="#011E41";break;case"completed":o="#5A7F71";break;case"notStarted":o="#929497";break;case"paused":o="#EBA900";break;case"awaitAction":o="pink";break;default:o="white"}return O.colorsArr&&O.colorsArr.forEach((function(e){e.label===n&&(o=e.color)})),l.a.createElement("div",{style:{display:"flex",marginBottom:"8px"},key:n},l.a.createElement("div",{style:{borderRadius:"50%",backgroundColor:o,height:"20px",width:"20px",alignSelf:"center",marginRight:"10px"}}," "),l.a.createElement("div",{style:{marginLeft:"14x"}}," ",Object(g.w)("$__"+n)," : ",l.a.createElement("span",{style:{fontWeight:"bolder"}},a)))}return null}))))},indexBy:"id",margin:{top:40,right:20,bottom:30,left:40},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!1},enableLabel:!1,yScale:{max:100},minValue:0,theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}},fill:[{match:{id:"fries"},id:"dots"},{match:{id:"sandwich"},id:"lines"}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:32,format:function(e){return function(e){var t="";return Object.values(S).forEach((function(r){r.id===e&&(t=null===r||void 0===r?void 0:r.name.match(/\b(\w)/g).join(""))})),t}(e)}},axisLeft:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-40},role:"application"})," "):l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}},"  ",l.a.createElement("div",{className:"loader"}))))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(n.a)(t.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:null===O||void 0===O?void 0:O.colorsArr})))})))}},544:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(8),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(141),u=r(196),d=r(83),p=(r(156),r(96)),f=r(3),h=r(6),m=r.n(h),g=r(1),b=r(11);t.default=function(e){var t=Object(c.useRef)([]),r=f.a.getState().db,h=Object(c.useState)({}),v=Object(i.a)(h,2),y=v[0],x=v[1],w=Object(c.useState)({index:0,showQuantity:10,number:10,finalIndex:10}),_=Object(i.a)(w,2),O=_[0],j=_[1],E=Object(c.useState)({}),k=Object(i.a)(E,2),S=k[0],L=k[1],C=window.location.hash.split("/");C[0]=C[0].replace("#",""),Object(c.useEffect)((function(){var t,r,n;(Object.keys(e.filter).length>0&&j(Object(o.a)(Object(o.a)({},O),e.filter)),Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0)&&x(Object(o.a)(Object(o.a)(Object(o.a)({},O),null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.filter,e.dashboardConfig]),Object(c.useEffect)((function(){var i={};e.planCards&&!e.load&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).filter((function(e){return!r.cards[e].deleted})).forEach((function(e){var c;Object.keys(null===(c=r.cards[e])||void 0===c?void 0:c._users).forEach((function(c){var l,s;if(!((null===O||void 0===O||null===(l=O.users)||void 0===l?void 0:l.length)>0)||O.users.includes(null===(s=r.cards[e])||void 0===s?void 0:s._users[c]._id)){var u,d,p,f,h;if(!i[c])i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},i[c]),{},(h={},Object(a.a)(h,r.cards[e].status,0),Object(a.a)(h,"allTask",0),Object(a.a)(h,"user",null===(d=r.cards[e])||void 0===d?void 0:d._users[c].name.match(/\b(\w)/g).join("")),Object(a.a)(h,"id",c),Object(a.a)(h,"image",null===(p=r.cards[e])||void 0===p?void 0:p._users[c].image),Object(a.a)(h,"name",null===(f=r.cards[e])||void 0===f?void 0:f._users[c].name),h))));if(null===(u=r.cards[e])||void 0===u?void 0:u._users[c].isResponsible){var g,b,v,x=(null===(g=r.cards[e].completed_at)||void 0===g?void 0:g.low)||r.cards[e].completed_at||(null===(b=r.cards[e].updated_at)||void 0===b?void 0:b.low)||r.cards[e].updated_at||(null===(v=r.cards[e].created_at)||void 0===v?void 0:v.low)||r.cards[e].created_at,w=m()(1e3*x).format("YYYYMMDD"),_=(null===y||void 0===y?void 0:y.startDate)?m()(1e3*(null===y||void 0===y?void 0:y.startDate)).format("YYYYMMDD"):O.startDate?m()(1e3*O.startDate).format("YYYYMMDD"):m()().subtract(1,"month").format("YYYYMMDD"),j=(null===y||void 0===y?void 0:y.endDate)?m()(1e3*(null===y||void 0===y?void 0:y.endDate)).format("YYYYMMDD"):O.endDate?m()(1e3*O.endDate).format("YYYYMMDD"):m()().format("YYYYMMDD");if(parseInt(w)>=parseInt(_)&&parseInt(w)<=parseInt(j)&&"step"!==r.cards[e].type){var E,k,S,L,C,I=r.status.filter((function(t){return t.value===r.cards[e].status}))[0].color;(null===O||void 0===O?void 0:O.colorsArr)&&O.colorsArr.forEach((function(t){t.label===r.cards[e].status&&(I=t.color)})),i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},i[c]),{},(C={},Object(a.a)(C,r.cards[e].status,(null===(E=i[c])||void 0===E?void 0:E[r.cards[e].status])?(null===(k=i[c])||void 0===k?void 0:k[r.cards[e].status])+1:1),Object(a.a)(C,"allTask",(null===(S=i[c])||void 0===S?void 0:S.allTask)?(null===(L=i[c])||void 0===L?void 0:L.allTask)+1:1),Object(a.a)(C,r.cards[e].status+"Color",I),C))));var T={label:r.cards[e].status,color:I};t.current.some((function(e){return e.label===T.label}))||(t.current=[].concat(Object(n.a)(t.current),[T]))}}}}))})),S!==i&&L(i))}),[e.planCards,e.load,O,y]);var I=(null===y||void 0===y?void 0:y.startDate)?m()(1e3*(null===y||void 0===y?void 0:y.startDate)).format("DD/MM/YYYY"):O.startDate?m()(1e3*O.startDate).format("DD/MM/YYYY"):m()().subtract(1,"month").format("DD/MM/YYYY"),T=(null===y||void 0===y?void 0:y.endDate)?m()(1e3*(null===y||void 0===y?void 0:y.endDate)).format("DD/MM/YYYY"):O.endDate?m()(1e3*O.endDate).format("DD/MM/YYYY"):m()().format("DD/MM/YYYY");return l.a.createElement("div",{style:{height:"100%",width:"100%"}},l.a.createElement(p.a,null,(function(r){return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){j(Object(o.a)(Object(o.a)({},O),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},O),t),{},{id:e.id}))},filterConfig:{filterSelect:Object.keys(S).length>0&&Object.values(S).length},tittle:Object(g.w)("$__"+e.tittle),icon:e.icon,styles:e.styles,indicators:O&&O,datafilter:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){j(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},O),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},!e.load&&r&&l.a.createElement("div",{style:{position:"absolute",right:"2%",top:"2%",padding:"5px",display:"flex",zIndex:"9",justifyContent:"center",alignContent:"center"}},l.a.createElement("div",{style:{marginTop:"2px",marginRight:"4px"}},I+" ~ ",T+" -- ",O.showQuantity<Object.keys(S).length?O.showQuantity+"/":Object.keys(S).length+"/",Object.keys(S).length>0&&l.a.createElement("span",null,Object.keys(S).length)),l.a.createElement(b.a,null,"person")),0!==O.index&&l.a.createElement(b.a,{onClick:function(){return j(Object(o.a)(Object(o.a)({},O),{},{index:O.index-1,finalIndex:O.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),Object.keys(S).length!==O.index+O.number&&Object.keys(S).length>O.showQuantity&&l.a.createElement(b.a,{onClick:function(){return j(Object(o.a)(Object(o.a)({},O),{},{index:O.index+1,finalIndex:O.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},Object.keys(S).length>0&&!e.load&&r?l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},l.a.createElement(u.a,{data:Object.values(S).sort((function(e,t){return e.allTask>t.allTask?-1:e.allTask<t.allTask?1:0})).slice(O.index,O.finalIndex),keys:["inProgress","completed","notStarted","paused","awaitAction"],colors:function(e){var t=e.id;return e.data["".concat(t,"Color")]},tooltip:function(e){return l.a.createElement("div",{style:{fontSize:"12px",width:"200px",marginBottom:"10px",zIndex:"99999"}},l.a.createElement("div",{style:{display:"flex",marginLeft:"5px",marginTop:"10px",textOverflow:"ellipsis",overflow:"hidden"}},l.a.createElement("div",{style:{display:"flex",width:"40px",height:"32px",backgroundImage:'url("'.concat(e.data.image,'")'),backgroundColro:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%",alignSelf:"center"}}),l.a.createElement("p",{style:{margin:"0px",marginLeft:"12px",fontSize:"20px",alignSelf:"center",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.data.name)),l.a.createElement("div",{style:{borderBottom:"1px solid #d1d1cf",marginTop:"10px"}}),l.a.createElement("div",{style:{width:"100%",fontSize:"18px",padding:"10px",marginBottom:"5px",marginTop:"4px"}},Object.entries(e.data).map((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.entries(e.data),r=Object(i.a)(t,2),n=r[0],a=r[1];if(["inProgress","completed","notStarted","paused","awaitAction"].includes(n)){var o="";switch(n){case"inProgress":o="#011E41";break;case"completed":o="#5A7F71";break;case"notStarted":o="#929497";break;case"paused":o="#EBA900";break;case"awaitAction":o="pink";break;default:o="white"}return O.colorsArr&&O.colorsArr.forEach((function(e){e.label===n&&(o=e.color)})),l.a.createElement("div",{style:{display:"flex",marginBottom:"8px"},key:n},l.a.createElement("div",{style:{borderRadius:"50%",backgroundColor:o,height:"20px",width:"20px",alignSelf:"center",marginRight:"10px"}}," "),l.a.createElement("div",{style:{marginLeft:"14x"}}," ",Object(g.w)("$__"+n)," : ",l.a.createElement("span",{style:{fontWeight:"bolder"}},a)))}return null}))))},indexBy:"id",margin:{top:40,right:20,bottom:30,left:40},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!1},enableLabel:!1,yScale:{max:100},minValue:0,theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}},fill:[{match:{id:"fries"},id:"dots"},{match:{id:"sandwich"},id:"lines"}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:32,format:function(e){return function(e){var t="";return Object.values(S).forEach((function(r){r.id===e&&(t=null===r||void 0===r?void 0:r.name.match(/\b(\w)/g).join(""))})),t}(e)}},axisLeft:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-40},role:"application"})," "):l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}},"  ",l.a.createElement("div",{className:"loader"}))))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(n.a)(t.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:null===O||void 0===O?void 0:O.colorsArr})))})))}},545:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(83),s=r(141),u=r(120),d=(r(156),r(96)),p=r(3),f=r(6),h=r.n(f),m=r(1);t.default=function(e){var t=e.tittle,r=e.preview,f=e.icon,g=h()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),b=window.location.hash.split("/");b[0]=b[0].replace("#","");var v=p.a.getState().db,y=Object(i.useState)([]),x=Object(o.a)(y,2),w=x[0],_=x[1],O=Object(i.useRef)([]),j=Object(i.useState)({}),E=Object(o.a)(j,2),k=E[0],S=E[1];return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&S(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(v.status.map((function(e){return{id:"await"===e.label.substring(3)?Object(m.w)("$__awaitAction"):Object(m.w)(e.label),label:"await"===e.label.substring(3)?"$__awaitAction":e.label,value:Object.keys(v.cards).filter((function(t){var r,n,a,o=(null===(r=v.cards[t].completed_at)||void 0===r?void 0:r.low)||v.cards[t].completed_at||(null===(n=v.cards[t].updated_at)||void 0===n?void 0:n.low)||v.cards[t].updated_at||(null===(a=v.cards[t].created_at)||void 0===a?void 0:a.low)||v.cards[t].created_at,i=h()(1e3*o),c=(null===k||void 0===k?void 0:k.startDate)?h()(1e3*(null===k||void 0===k?void 0:k.startDate)):h()().subtract(10,"years"),l=(null===k||void 0===k?void 0:k.endDate)?h()(1e3*(null===k||void 0===k?void 0:k.endDate)):h()();return v.cards[t]._planId===b[0]&&!v.cards[t].checklist&&!v.cards[t].deleted&&i.isBetween(c,l,null,"[]")&&"objective"===v.cards[t].type&&v.cards[t].status&&v.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(m.w)("$__late"),label:"$__late",value:Object.keys(v.cards).filter((function(e){var t,r,n,a=(null===(t=v.cards[e].completed_at)||void 0===t?void 0:t.low)||v.cards[e].completed_at||(null===(r=v.cards[e].updated_at)||void 0===r?void 0:r.low)||v.cards[e].updated_at||(null===(n=v.cards[e].created_at)||void 0===n?void 0:n.low)||v.cards[e].created_at,o=h()(1e3*a),i=(null===k||void 0===k?void 0:k.startDate)?h()(1e3*(null===k||void 0===k?void 0:k.startDate)):h()().subtract(10,"years"),c=(null===k||void 0===k?void 0:k.endDate)?h()(1e3*(null===k||void 0===k?void 0:k.endDate)):h()();return v.cards[e]._planId===b[0]&&!v.cards[e].checklist&&o.isBetween(i,c,null,"[]")&&!v.cards[e].deleted&&"completed"!==v.cards[e].status&&"objective"===v.cards[e].type&&v.cards[e].endDate&&h()(new Date(1e3*v.cards[e].endDate)).tz("America/Sao_Paulo").format()<=h()(new Date(g)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.forEach((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).forEach((function(e){var t={label:e.label.substring(3),color:e.color};O.current.some((function(e){return e.label===t.label}))||(O.current=[].concat(Object(n.a)(O.current),[t]))})),_(t)}),[e.planCards,e.filter,k]),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(d.a,null,(function(a){return c.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},c.a.createElement(l.a,{styles:e.styles,tittle:Object(m.w)("$__".concat(t)),icon:f,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),c.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),c.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},c.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},!e.load&&a?c.a.createElement(u.a,{data:w,colors:{datum:"data.color"},margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#333333",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]}}):c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))))),!r&&c.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},c.a.createElement(s.a,{legend:Object(n.a)(O.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:e.filter.colorsArr})))})))}},55:function(e,t,r){"use strict";var n=r(10),a=r(401),o=r.n(a);function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};u(x,c,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,c)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),u(O,s,"Generator"),u(O,c,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}o.a.defaults.headers.post["Content-Type"]="application/json; charset=UTF-8";var c=o.a.create({baseURL:"https://apimachen.azurewebsites.net/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 console.log(e.response),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},552:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},555:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(497),s=r(6),u=r.n(s),d=r(25),p=r(20),f=r(34),h=r(14),m=r(13),g=r(15),b=r(3),v=r(1),y=r(24),x=r(78),w=r(38),_=r(455);r(801);function O(){O=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(802);t.a=Object(h.b)((function(e){return{}}),(function(e){return Object(m.b)(g,e)}))(Object(f.a)(_.a)((function(e){var t=e.classes,r=b.a.getState(),i=r.session,s=r.db,f=c.a.useState(""),h=Object(o.a)(f,2),m=h[0],g=h[1],_=c.a.useState(0),j=Object(o.a)(_,2),E=j[0],k=j[1],S=e.timer||{},L=e.data||{},C=function(){var e=Object(a.a)(O().mark((function e(t,r){var n;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=String(E),(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)),k(n);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!L)return null;var I=function(){var t=Object(a.a)(O().mark((function t(){var r,a,o;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||m?(r=isNaN(E)?E.replace(",","."):E,a=Object(n.a)(Object(n.a)({_id:Object(l.a)(),cardId:L._id,idRel:L._id,value:e.PositiveValue?r:"-".concat(r),type:"kpi"},e.manualEntry?{manualEntry:!0}:{}),{},{kpi_type:L.kpi_type?L.kpi_type:null,message:m||""}),e.timer&&(a=Object(n.a)(Object(n.a)({},a),{},{value:S.diff,ini:S.created_at,fin:S.updated_at,type:"timer",kpi_type:"timer",to:S.to})),o=Object(n.a)(Object(n.a)({},a),{},{created_at:"".concat(u()().unix("x")),db:"cards",node:L._id,user:{_id:i._id,name:s.users[i._id].name,image:s.users[i._id].image||null}}),Object(x.h)({reduxFunction:e.reduxFunction},Object(n.a)(Object(n.a)({},a),{},{comment:o})),w.a.post("timeline/add",Object(n.a)({},a)),e.callBack&&e.callBack(),e.timer&&!e.manualAdd&&Object(y.v)(e,L._id,S._id),k(0),g("")):Object(v.c)({message:Object(v.w)("$__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?c.a.createElement("div",{className:t.dataSave},c.a.createElement("fieldset",null,c.a.createElement("legend",{style:{color:Object(v.d)("color")}},Object(v.w)("$__new",1)),!e.timer&&c.a.createElement(d.a,{placeholder:Object(v.w)("$__value",1),value:Object(v.h)(E||0,"time"===L.kpi_type?"number":L.kpi_type,L.kpi_currency?L.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){C(e,"ini")}}}),c.a.createElement(d.a,{multiline:!0,placeholder:Object(v.w)("$__description",1),onChange:function(e){return g(e.target.value)},value:m,InputProps:{autoComplete:"new-password"}}),c.a.createElement("div",{style:{display:"flex",textAlign:"right"}},c.a.createElement(p.a,{title:Object(v.w)("$__save",1),color:"green",icon:"save",onClick:function(){return I()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&c.a.createElement(p.a,{title:Object(v.w)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(){e.callBack&&e.callBack()},size:"25px",transparent:!0})))):c.a.createElement("div",null,"NO DATA RECEIVED")})))},556:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(3);r(211).config();var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"comment",r=n.a.getState(),a=r.session,o=r.timeline;return o&&o[e]?Object.keys(o[e]).filter((function(r){return o[e]&&o[e][r]&&o[e][r].type&&o[e][r].type===t&&!o[e][r].deleted&&o[e][r].user&&o[e][r].user._id&&o[e][r].user._id!==a._id&&(!o[e][r].readedBy||o[e][r].readedBy&&!o[e][r].readedBy[a._id])})).length:0}},565:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(378),s=r.n(l),u=r(1173),d=r.n(u),p=r(73),f=r.n(p),h=r(69),m=r(555),g=r(11),b=r(135),v=r(359),y=r(569),x=r(568),w=r(360),_=r(567),O=r(165),j=r(1),E=Object(O.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 k=function(e){var t=E(),r=c.a.useState(!1),n=Object(o.a)(r,2),a=n[0],i=n[1],l=c.a.useRef(null),s=function(e){l.current&&l.current.contains(e.target)||i(!1)};return c.a.createElement("div",{onClick:function(e){e.stopPropagation()},style:{zIndex:100}},c.a.createElement(b.a,{title:Object(j.w)("$__options",1)},c.a.createElement(v.a,{ref:l,"aria-controls":a?"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},c.a.createElement(g.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:Object(j.d)("menu"),icon:e.icon?e.icon:"design_services",title:e.title?e.title:"NO_ALIAS"}))),c.a.createElement(_.a,{open:a,anchorEl:l.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return c.a.createElement(x.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),c.a.createElement(w.a,null,c.a.createElement(y.a,{onClickAway:s},c.a.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault()}},c.a.cloneElement(e.children,{callBack:function(e){i(!1)}})))))})))},S=r(34),L=r(14),C=r(13),I=r(15),T=r(3),D=r(455),F=r(688),N=r(78);r(801);function A(){A=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(802);t.a=Object(L.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(C.b)(I,e)}))(Object(S.a)(D.a)((function(e){var t=e.classes,r=e.data,i=T.a.getState(),l=i.db,u=i.timeline,p=l.cards,g=c.a.useState(!1),b=Object(o.a)(g,2),v=b[0],y=b[1],x=c.a.useState(!1),w=Object(o.a)(x,2),_=w[0],O=w[1],E=c.a.useState([]),S=Object(o.a)(E,2),L=S[0],C=S[1],I=parseFloat(r.kpi_ini),D=parseFloat(r.kpi_fin);c.a.useEffect((function(){v||(y(!0),M(e.data._id),P())}),[]),c.a.useEffect((function(){M(e.data._id)}),[p]);var P=function(){var t=Object(a.a)(A().mark((function t(){var a,o;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a={ids:[r._id],db:"cards",reqChildrens:!0,type:"kpi",limit:!0},o=f()("".concat(JSON.stringify(a))).toString(),!u||u[r._id]&&(!u[r._id]||0!==Object.keys(u[r._id]).filter((function(e){return"kpi"===u[r._id][e].type})).length)||T.a.getState().timelineLoader&&(!T.a.getState().timelineLoader||T.a.getState().timelineLoader[o])){t.next=10;break}return O(!0),t.next=6,Object(N.f)(Object(n.a)(Object(n.a)({},e),{},{fnIdentification:"Timeline/Index/init()"}),a);case 6:t.sent&&(O(!1),e.onResize&&e.onResize()),t.next=12;break;case 10:O(!1),e.onResize&&e.onResize();case 12:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=[e.data._id],M=function(){var e=Object(a.a)(A().mark((function e(t,r){var n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object.keys(p).filter((function(e){return p[e].kpi_useParent&&p[e]._parent===t}))).length>0?n.map(function(){var e=Object(a.a)(A().mark((function e(t){return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M(t,!0),$.push(t),C(Array.from(new Set($)));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||C($),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 B=Object(n.a)({},F.model),z=[],Y=[],R={};L.forEach((function(e){R=Object(n.a)(Object(n.a)({},R),u[e]||{})})),R=Object.keys(R).filter((function(e){return"kpi"===R[e].type&&R[e].kpi_type===r.kpi_type})).map((function(e){return R[e]}));var G="time"!==r.kpi_type?parseFloat(I):0,H=parseFloat(I)-parseFloat(D),W=0;H<0&&(H*=-1),R&&Object.keys(R).length>0&&Object.keys(R).sort((function(e,t){return R[e].created_at<R[t].created_at?-1:1})).forEach((function(e,t){G=parseFloat(G)+parseFloat(R[e].value),W+=parseFloat(R[e].value),z.push({meta:R[e].value,total:G,value:parseFloat(I)>parseFloat(D)?100-Math.floor(100*G/H):Math.floor(100*G/H)}),Y.push(t+1),t+1===Object.keys(R).length&&(B=Object(n.a)(Object(n.a)({},B),{},{data:{labels:Y,series:[[].concat(z)]},options:Object(n.a)(Object(n.a)({},B.options),{},{low:0,high:100,plugins:[s.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+Object(j.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+Object(j.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var U=I<D?D-I:I-D,q=U;R&&Object.keys(R).length>0&&Object.keys(R).forEach((function(e){U=parseFloat(U)+parseFloat(R[e].value)}));var V=q-(U-q),J=q-(q-U),X=Math.ceil(I<D?D-I:I-D);if((X=100*Math.ceil(U)/X-100)<0&&(X*=-1),!e.data)return c.a.createElement("div",null,"NO DATA RECEIVED");if(_)return c.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px",height:152}},c.a.createElement(h.a,null));return c.a.createElement("div",{className:t.root},c.a.createElement(c.a.Fragment,null,e.chartShow&&"time"!==r.kpi_type&&"task"!==r.kpi_type&&R.length>0?c.a.createElement("div",{style:{backgroundColor:Object(j.d)("color"),height:152}},c.a.createElement(d.a,{className:"ct-chart-white-colors",data:B.data,type:"Line",options:B.options,listener:B.animation})):c.a.createElement(c.a.Fragment,null),"task"!==r.kpi_type&&c.a.createElement("fieldset",{style:{position:"relative"}},c.a.createElement("legend",{style:{color:Object(j.d)("color")}},Object(j.w)("$__progress",1)),c.a.createElement("div",{className:t.progress},c.a.createElement(h.a,{variant:"determinate",size:100,value:X,showText:!0,onClick:function(){}})),c.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:Object(j.d)("color")}},function(){var e=I&&parseInt(I)?parseInt(I):0,t=D&&parseInt(D)?parseInt(D):0;return c.a.createElement(c.a.Fragment,null,Object(j.w)("".concat(e>t?"$__balance":"$__targetValue"),1),": ",Object(j.h)(e<t?V:J||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null),"time"===r.kpi_type?c.a.createElement("span",{style:{marginLeft:5,fontSize:10,textTransform:"lowercase"}},Object(j.w)("$__minutes")):"")}()),c.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:W>0?Object(j.d)("green"):"red"}},Object(j.w)("$__accomplished",1),": ",W&&parseInt(W)>0?Object(j.h)(W,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null):0),c.a.createElement("div",{style:{position:"absolute",right:"0px",top:"-33px",display:"flex"}},c.a.createElement(k,{icon:"add_circle",title:Object(j.w)("$__increase"),iconColor:Object(j.d)("blue"),onClick:function(){},transparent:!0},c.a.createElement(m.a,{data:r,PositiveValue:!0,callBack:function(){}})),c.a.createElement(k,{icon:"remove_circle",iconColor:"orange",title:Object(j.w)("$__decrease"),onClick:function(){},transparent:!0},c.a.createElement(m.a,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&c.a.createElement("div",{className:t.time},"TASK")))})))},58:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(14),s=r(13),u=r(15),d=r(3),p=r(25),f=r(359),h=r(1222),m=r(294),g=r(1166),b=r.n(g),v=r(1),y=r(65);function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(y=_);var O=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(O,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var w=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var _=Object(l.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(s.b)(u,e)}))((function(e){var t=d.a.getState().session,r=c.a.useState(null),i=Object(o.a)(r,2),l=i[0],s=i[1],u=Boolean(l);c.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_SESSION",Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:"$__last7Days",dashboard:Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:"$__last7Days"})}))}}),[]);var p=function(){var t=Object(a.a)(x().mark((function t(r){var a;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(null),"string"!==typeof r){t.next=7;break}return e.reduxFunction("ASYNC","SET_SESSION",Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:r,dashboard:Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:r})})),a=(a=String(r).replace("$__last","")).replace("Days",""),t.next=7,Object(y.c)(e,a);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return c.a.createElement("div",null,c.a.createElement(f.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){s(e.currentTarget)},style:Object(n.a)({},e.style?e.style:{})},c.a.createElement(b.a,null)),c.a.createElement(h.a,{id:"long-menu",anchorEl:l,keepMounted:!0,open:u,onClose:p,PaperProps:{style:{maxHeight:216,width:"20ch"}}},w.map((function(e){return c.a.createElement(m.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return p(e)}},Object(v.w)(e,1))}))))})),O=r(20),j=r(335),E=r(165),k=r(101),S=r(135),L=r(7),C={header:Object(n.a)(Object(n.a)({},L.k),{},{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(v.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(v.d)("color"),fontWeight:"500",alignItems:"center"}}};function I(){I=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var T=Object(E.a)(C);t.a=Object(l.b)((function(e){return{users:e.db.users,groups:e.db.groups}}),(function(e){return Object(s.b)(u,e)}))((function(e){var t=e.title,r=e.icon,l=e.editable,s=e._id,u=e.onEdit,f=e.customButtons,h=d.a.getState(),m=h.functions,g=h.session,b=m.socket,y=T(),x=Object(i.useState)(t?t.trim():""),w=Object(o.a)(x,2),E=w[0],L=w[1],C=Object(i.useState)(r||null),D=Object(o.a)(C,2),F=D[0],N=D[1],A=Object(i.useState)(!1),P=Object(o.a)(A,2),$=P[0],M=P[1],B=Object(i.useState)(!1),z=Object(o.a)(B,2),Y=z[0],R=z[1],G=Object(i.useState)(!1),H=Object(o.a)(G,2),W=H[0],U=H[1],q=f&&f.filter((function(e){return!1!==e})),V=Object(i.useRef)(!0);Object(i.useEffect)((function(){return!t&&l&&M(!0),function(){V.current=!1}}),[t,l]);var J=function(){var e=Object(a.a)(I().mark((function e(){return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{s&&b.emit("data",{module:"node",method:"put",action:"update",noLog:!0},{_id:s,name:E}),u&&u(Object(n.a)({name:E},F?{icon:F}:{}),s||null)}catch(t){console.log(t)}M(!1);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return c.a.createElement("div",{className:y.header,style:Object(n.a)({minHeight:"30px",display:"flex",alignItems:"center"},e.style),onMouseEnter:function(){return U(!0)},onMouseLeave:function(){V.current&&!Y&&U(!1)}},c.a.createElement("div",{className:y.content},c.a.createElement("div",{className:y.info},e.searchText?c.a.createElement("div",{style:{marginLeft:"7px"}},Object(v.b)(e.title?e.title:"",e.searchText)):c.a.createElement("div",{className:y.headerTitle,style:{fontSize:e.fontSize?e.fontSize:"16px",color:e.color?e.color:Object(v.d)("colorText"),paddingRight:"7px",marginLeft:e.icon?"7px":"none",width:"100%"},onDoubleClick:function(){e.onEdit&&e.editable&&V.current&&(L(e.title?e.title.trim():""),M(!0))}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center"}},e.icon||e.permitIcon||e.iconOnEditable&&$?c.a.createElement(j.a,{icon:e.icon||"perm_media",color:e.color?e.color:Object(v.d)("colorText"),onChange:e.onChangeIcon||e.editable&&e.permitIcon?function(t){e.onChangeIcon&&e.onChangeIcon(t),e.onEdit&&e.onEdit(Object(n.a)({name:E},t?{icon:t}:{})),N(t)}:null,size:"calc(".concat(e.fontSize," + 4px)")||!1,style:{marginRight:7}}):c.a.createElement(c.a.Fragment,null),$?c.a.createElement(c.a.Fragment,null,c.a.createElement(p.a,{label:e.placeholder?e.placeholder:Object(v.w)("$__nameOfCard",1),variant:Object(v.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){L(e.target.value)},onKeyDown:function(t){13===t.keyCode&&E&&J(),27===t.keyCode&&(M(!1),L(e.title?e.title.trim():""))}},value:E,placeholder:e.placeholder?e.placeholder:Object(v.w)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),($||e.onSave)&&c.a.createElement(O.a,{title:Object(v.w)("$__save",1),color:"green",icon:"save",onClick:function(){$?e.noCancel?E&&J():J():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),($||e.onCancel)&&c.a.createElement(O.a,{title:Object(v.w)("$__close",1),color:Object(v.d)("colorText"),icon:"cancel",onClick:function(){$&&(e.onCancel?E&&M(!1):M(!1)),e.onCancel&&e.onCancel()},size:e.actionsSize||"25px",transparent:!0})):c.a.createElement(S.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},c.a.createElement("div",{style:Object(n.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(v.w)(e.title,1):e.title?Object(v.t)(e.title):"")))))),e.periodFilter&&g&&g.period&&c.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap",marginRight:7}},Object(v.w)(g.period),c.a.createElement(_,{style:{color:Object(v.d)("menu"),height:"20px",width:"20px"}})),c.a.createElement("div",{className:y.actionButtons,style:Object(n.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},e.actionsButtons&&e.onSave&&c.a.createElement(O.a,{title:Object(v.w)("$__save",1),color:"green",icon:"save",onClick:function(){$?e.noCancel?E&&J():J():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),e.actionsButtons&&e.onCancel&&c.a.createElement(O.a,{title:Object(v.w)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){$?e.noCancel?E&&M(!1):M(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!$&&e.timelineMessage&&W&&c.a.createElement("div",{className:y.button,style:{opacity:W?"1":"0"}},c.a.createElement(k.a,{overlap:"rectangular",onClick:function(){return R(!0)},icon:"add_comment",size:"20px",tooltipprops:Y?{open:Y,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,PopperProps:{disablePortal:!0},interactive:!0}:{}})),!$&&q&&q.map((function(e,t){return e&&e.component?e.component:e&&!1!==e&&null!==e&&(W||"hover"!==e.show)&&c.a.createElement("div",Object.assign({key:t,className:y.button},e.provided),c.a.createElement(O.a,{title:e.title?Object(v.w)(e.title,1):Object(v.w)(e.name,1),color:Object(v.d)(e.color||"colorText"),icon:e.icon,style:e.style,onClick:function(t){e.onClick&&e.onClick(t)},onMouseLeave:function(){Y||U(!1)},onClose:e.onClose?function(){e.onClose&&e.onClose(),U(!1)}:null,size:e.actionsSize||"16px",transparent:!0,badgeContent:e.count?e.count:null}))})),e.children)))}))},59:function(e,t,r){"use strict";var n=r(1898),a=r(34),o=r(1),i=Object(a.a)({switchBase:{color:Object(o.d)("medium"),"&$checked":{color:Object(o.d)("color")},"&$checked + $track":{backgroundColor:Object(o.d)("color")}},checked:{},track:{}})(n.a);t.a=i},64:function(e,t,r){"use strict";var n=r(19),a=r(2),o=r(10),i=r(5),c=r(0),l=r.n(c),s=r(3),u=r(336),d=r(20),p=r(11),f=r(153),h=r(687),m=r(25),g=r(359),b=r(165),v=r(101),y=r(135),x=r(1);function w(){w=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(y=_);var O=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(O,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var _=Object(b.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(x.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(x.d)("colorText"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));t.a=function(e){var t=e.noExpanding,r=e.onExpanding,c=e.isExpanded,b=e.options,O=e.title,j=e.editable,E=e.unlockedPrivates,k=e.style,S=e.backClick,L=e.private,C=e.onEdit,I=e._id,T=e.fontSize,D=e.iconTitle,F=e.privateTitle,N=e.color,A=e.optionsProps,P=e.setPrivate,$=e.colorPicker,M=e.moreButton,B=e.showOrder,z=e.value,Y=e.viewAllName,R=e.expanded,G=e.tooltipText,H=e.actionsSize,W=e.onSave,U=e.onCancel,q=e.multiline,V=e.icon,J=e.searchText,X=e.searchTextStyle,K=e.dark,Z=e.noAutoFocus,Q=e.fieldName,ee=e.inputStyle,te=e.textStyle,re=s.a.getState(),ne=re.functions,ae=re.db,oe=ne.socket,ie=_(),ce=l.a.useState((null===O||void 0===O?void 0:O.trim())||null),le=Object(i.a)(ce,2),se=le[0],ue=le[1],de=l.a.useState(!1),pe=Object(i.a)(de,2),fe=pe[0],he=pe[1],me=l.a.useState(!1),ge=Object(i.a)(me,2),be=ge[0],ve=ge[1];l.a.useEffect((function(){E&&ve(!0)}),[E]),l.a.useEffect((function(){!O&&j&&he(!0)}),[O]);var ye=function(){var e=Object(o.a)(w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{I&&oe.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(a.a)({_id:I},t)),C&&C(se,I)}catch(r){console.log(r)}he(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),xe=b&&b.length>0;return l.a.createElement("div",{className:ie.header,style:Object(a.a)(Object(a.a)({minHeight:k&&k.minHeight?k.minHeight:"30px"},k),S?{cursor:"pointer"}:{})},l.a.createElement("div",{className:!r||fe?ie.content:ie.contentWithExpand},l.a.createElement("div",{className:ie.info},!L||s.a.getState().controls.lockPrivate||be?l.a.createElement(l.a.Fragment,null,V&&l.a.createElement("div",{className:ie.headerIcon,style:Object(a.a)({color:N||Object(x.d)("colorText")},S?{cursor:"pointer"}:{})},l.a.createElement(v.a,{overlap:"rectangular",size:"calc(".concat(T," + 4px)")||!1,icon:V,color:"parent",title:D?D.substring(0,1).toUpperCase().concat(D.substring(1)):""})),J?l.a.createElement("div",{style:Object(a.a)({marginLeft:"7px"},X||{})},Object(x.b)(O||"",J,!!K)):l.a.createElement("div",{className:ie.headerTitle,style:Object(a.a)(Object(a.a)({fontSize:T||"14px",color:N||Object(x.d)("colorText"),marginLeft:V?"7px":"none"},te||{}),S?{cursor:"pointer"}:{}),onClick:S?function(e){S(),e.stopPropagation()}:null},fe?l.a.createElement("div",{style:Object(a.a)({position:"relative",float:"left",width:"100%",paddingTop:"10px",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between"},ee||{}),onClick:function(e){e.stopPropagation()}},l.a.createElement(m.a,{style:{width:"calc(100% - 60px)"},label:Q||Object(x.w)("$__nameOfCard",1),variant:Object(x.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){ue(e.target.value)},onKeyDown:function(e){13===e.keyCode&&se&&ye({name:se}),27===e.keyCode&&(he(!1),ue(z||(O?null===O||void 0===O?void 0:O.trim():"")))}},value:se,placeholder:Object(x.w)("$__titleOfCard_placeholder",1),autoFocus:!Z,multiline:!!q}),l.a.createElement(v.a,{color:Object(x.d)("medium"),onClick:function(){return fe?he(!1):U()},icon:"cancel",title:Object(x.w)("$__close","*"),size:H||"25px"}),l.a.createElement(v.a,{overlap:"rectangular",color:"green",icon:"save",onClick:function(){fe?ye({name:se}):W()},title:Object(x.w)("$__save"," * "),size:H||"25px"})):l.a.createElement(y.a,{title:G||(O||"")},l.a.createElement("div",{style:Object(a.a)({},R?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:Y&&!0===Y?"":"nowrap"}),onDoubleClick:function(){C&&j&&(ue(z||(O?null===O||void 0===O?void 0:O.trim():"")),he(!0))}},"".concat(B?"".concat(B,". "):"").concat(O&&O.indexOf("$__")>-1?Object(x.w)(O,1):O?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(O):""))))):l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:ie.headerIcon,style:{color:"lightgray"}},l.a.createElement(v.a,{overlap:"rectangular",size:"calc(".concat(T," + 4px)")||!1,icon:"private_connectivity",color:"parent",title:D?D.substring(0,1).toUpperCase().concat(D.substring(1)):""})),l.a.createElement("div",{style:{marginLeft:"7px",fontSize:12,color:"lightgray"}},F||Object(x.w)("$__privateActivity"))))),!fe&&l.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()}},!M&&l.a.createElement(h.a,{nodeId:I}),M&&l.a.createElement("div",{style:{position:"absolute",top:0,right:0,display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation()}},!L||s.a.getState().controls.lockPrivate||be?l.a.createElement(l.a.Fragment,null,$&&l.a.createElement("div",{style:{zIndex:1e3}},l.a.createElement(u.a,{color:I&&ae.cards[I]&&ae.cards[I].color?ae.cards[I].color:null,_id:I,onChange:function(e){$(e)},style:{zIndex:5e3}})),xe&&b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)})).length>0&&l.a.createElement(y.a,{title:Object(x.w)(b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)}))[0].name)},l.a.createElement(g.a,{onClick:function(e){b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)}))[0].onClick()},className:ie.iconButtonStyle},l.a.createElement(p.a,{size:"22px",color:Object(x.d)("menu"),icon:b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)}))[0].icon,usePropagation:!0}))),b&&b.filter((function(e){return e&&e.show&&"fixed"===e.show})).length>0?b.filter((function(e){return e&&e.show&&"fixed"===e.show})).map((function(e,t){return l.a.createElement(y.a,{key:"opt".concat(t),title:Object(x.w)(e.name)},l.a.createElement(g.a,{onClick:function(){return e.onClick()},className:ie.iconButtonStyle},l.a.createElement(p.a,{size:"22px",color:e.color||Object(x.d)("menu"),icon:e.icon,usePropagation:!0})))})):l.a.createElement(l.a.Fragment,null),!t&&r&&l.a.createElement(y.a,{title:Object(x.w)(c?"$__collapse":"$__expand")},l.a.createElement(g.a,{onClick:function(e){r()},className:ie.iconButtonStyle},l.a.createElement(p.a,{size:"22px",color:Object(x.d)("menu"),icon:c?"expand_less":"expand_more",usePropagation:!0}))),xe&&l.a.createElement(f.a,Object.assign({noButton:!0,options:[].concat(Object(n.a)(b),Object(n.a)(L&&be?[{color:"lightblue",icon:"lock",name:"$__lockThisPrivateCard",onClick:function(){ve((function(e){return!e})),P&&P(!be)},show:"hover"}]:[]))},A||{}))):l.a.createElement(l.a.Fragment,null,l.a.createElement(d.a,{title:Object(x.w)("$__showPrivateActivity","*"),color:"lightGray",icon:"lock_open",onClick:function(){ve((function(e){return!e})),P&&P(!be)},size:"21px",style:{padding:"0px !important"}})))))}},65: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 g}));var n=r(8),a=r(2),o=r(10),i=r(73),c=r.n(i),l=r(6),s=r.n(l),u=r(3),d=r(55);function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}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,w,_,O,j,E,k,S,L,C,I,T,D,F,N,A,P,$,M,B,z,Y,R,G,H,W,U,q,V,J;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,w=r.deleted,_=void 0!==w&&w,O=r.archived,j=void 0!==O&&O,E=r.templates,k=void 0!==E&&E,S=r.allStatus,L=void 0!==S&&S,C=r.search,I=void 0===C?"":C,T=r.completedDays,D=void 0===T?7:T,F=r.limit,N=void 0===F?0:F,A=r.skip,P=void 0===A?0:A,$=r.startDate,M=void 0===$?null:$,B=r.endDate,z=void 0===B?null:B,Y=r.searchParams,R=void 0===Y?null:Y,G=!!r.ignoreLoader,("search"===b||t.ignoreLoader)&&(G=!0),H=u.a.getState(),W=H.sessionLoads,U=Object(a.a)({},W.cards.load),q=c()("".concat(JSON.stringify(r))).toString(),!(Object.keys(U).length>0&&U[q])){e.next=8;break}return e.abrupt("return",!0);case 8:return G||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)({},q,G?"completed":"loading"))})})),V=(V=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)(Object(a.a)({idRel:i,adminView:s,load:b,completed:y,archived:j,templates:k,status:x,allStatus:L,limit:N,skip:P,startDate:M,endDate:z},y?{completedDays:D||V}:{}),I?{search:I}:{}),_?{deleted:!0}:{}),{},{searchParams:R}));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)({},q,"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(!(J=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",J);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)})).forEach((function(t,s){var d,p,f=t.data._id,h={},m={},g=[];t.users.length>0&&t.users.filter((function(e){return e._id})).forEach((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)({},r?{myDay:r}:{}),e)))})),"step"===t.data.type&&(null===(d=t.showGroups)||void 0===d?void 0:d.filter((function(e){return e.value})).length)>0&&(g=t.showGroups.filter((function(e){return e.value}))),(null===(p=t.groups)||void 0===p?void 0:p.filter((function(e){return e._id})).length)>0&&t.groups.filter((function(e){return e._id})).forEach((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)({},f,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)(Object(a.a)(Object(a.a)(Object(a.a)({},u.a.getState().db.cards[f]||{}),u.a.getState().db.cards[f]&&u.a.getState().db.cards[f]._selected?{_selected:!0}:{}),t.data),{},{_cardCode:t.cardCode,_requireApproval:t.requireApproval||t.data.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}:{}),t.data&&t.data.status?{status:t.data.status}:{status:"notStarted"}),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}:{}),{},{type:t.data.type||"task"}))),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("/forms"===window.location.pathname&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"completed"!==n[1]){e.next=15;break}return e.next=14,f(t,{cardLoad:"plans",completed:!0,completedDays:r});case 14:a(!0);case 15:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=19;break}return e.next=18,f(t,{cardLoad:"templates",templates:!0});case 18:a(!0);case 19:if("/sp"!==window.location.pathname||36===n[0].length||"admin"!==n[1]){e.next=23;break}return e.next=22,f(t,{cardLoad:"plans",adminView:!0});case 22:a(!0);case 23:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=27;break}return e.next=26,f(t,{cardLoad:"plans",deleted:!0});case 26:a(!0);case 27:if("/d"!==window.location.pathname&&"/login"!==window.location.pathname&&"/"!==window.location.pathname||"dayTasks"===n[1]){e.next=35;break}return e.next=30,f(t,{cardLoad:"dashboard"});case 30:return e.next=32,f(t,{cardLoad:"showIn"});case 32:return e.next=34,f(t,{cardLoad:"channel"});case 34:a(!0);case 35:if("/d"!==window.location.pathname||"dayTasks"!==n[1]){e.next=39;break}return e.next=38,f(t,{adminView:!0,cardLoad:"myDay"});case 38:a(!0);case 39:if("/d"!==window.location.pathname||"ourTasks"!==n[1]){e.next=43;break}return e.next=42,f(t,{adminView:!0,cardLoad:"myDay"});case 42:a(!0);case 43:if("/sp"!==window.location.pathname||!n[0]||36!==n[0].length){e.next=49;break}return e.next=46,f(t,{idRel:n[0],cardLoad:"plan"});case 46:return e.next=48,f(t,{idRel:n[0],cardLoad:"plan",completed:!0});case 48:a(!0);case 49:if("/sp"===window.location.pathname&&36!==n[0].length&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=53;break}return e.next=53,f(t,{cardLoad:"plans",archived:!0});case 53:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=56;break}return e.next=56,f(t,{cardLoad:"templates"});case 56: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=61;break}return e.next=60,f(t,{cardLoad:"plans"});case 60:a(!0);case 61:if("/calendar"!==window.location.pathname){e.next=65;break}return e.next=64,f(t,{cardLoad:"calendar",startDate:null,endDate:null});case 64:a(!0);case 65:if("/p"!==window.location.pathname&&"/acc"!==window.location.pathname||a(!0),"/c"!==window.location.pathname){e.next=71;break}if("tab"!==n[0]||"users"===n[1]){e.next=70;break}return e.next=70,f(t,{cardLoad:"plans"});case 70:a(!0);case 71:if("/t"!==window.location.pathname){e.next=88;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=76;break}return e.next=75,f(t,{cardLoad:"myResponsible"});case 75:a(!0);case 76:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=80;break}return e.next=79,f(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 79:a(!0);case 80:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=88;break}return e.next=83,f(t,{cardLoad:"in"});case 83:return e.next=85,f(t,{cardLoad:"in",completed:!0,completedDays:r});case 85:return e.next=87,f(t,{cardLoad:"myResponsible"});case 87:a(!0);case 88:if("/tags"!==window.location.pathname){e.next=93;break}if(36!==n[0].length&&!u.a.getState().searchs.tagsView){e.next=92;break}return e.next=92,f(t,{cardLoad:"tags",idRel:n[0],searchParams:u.a.getState().searchs.tagsView});case 92:a(!0);case 93:"/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),a(!0);case 98: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)}}()},659:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(0),i=r.n(o),c=r(246),l=r.n(c),s=r(6),u=r.n(s),d=r(3),p=r(20),f=r(1);t.a=function(e){var t=l.a.ExcelFile,r=l.a.ExcelFile.ExcelSheet,o=l.a.ExcelFile.ExcelColumn,c=e.data,s=[],h=[],m=0,g=0,b=0,v=0;if(c&&Object.keys(c).length>0){Object.keys(c).forEach((function(e){var t=[];c[e]._times&&Object.keys(c[e]._times>0)&&Object.keys(c[e]._times).forEach((function(r){var n=d.a.getState().db.cards[c[e]._times[r].cardId],a=parseInt(c[e]._times[r].fin)-parseInt(c[e]._times[r].ini);m+=a;var o=a,i="",l=0,p=0,h=0;a<60?i="".concat(o," ").concat(Object(f.w)("$__seconds",1)):a>3600?(o-=3600*(l=Math.trunc(o/3600)),h=(o-=60*(p=Math.trunc(o/60)>0?Math.trunc(o/60):0))>0?o:0,i="".concat(l," ").concat(Object(f.w)("$__hour",1)).concat(l>1?"s":""," ").concat(p," ").concat(Object(f.w)("$__minutes",1)," ").concat(h," ").concat(Object(f.w)("$__seconds",1))):(h=(o-=60*(p=Math.trunc(o/60)>0?Math.trunc(o/60):0))>0?o:0,i="".concat(p," ").concat(Object(f.w)("$__minutes",1)," ").concat(h," ").concat(Object(f.w)("$__seconds",1))),s.push({name:c[e].name,type:Object(f.w)("$__".concat(n.type),1),card:n.name,description:c[e]._times[r].message,iniData:u()(1e3*c[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:u()(1e3*c[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:i,hours:l,minutes:p,seconds:h,calc:(parseInt(c[e]._times[r].fin)-parseInt(c[e]._times[r].ini))/3600}),t.push({name:c[e].name,type:Object(f.w)("$__".concat(n.type),1),card:n.name,description:c[e]._times[r].message,iniData:u()(1e3*c[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:u()(1e3*c[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:i,hours:l,minutes:p,seconds:h,calc:(parseInt(c[e]._times[r].fin)-parseInt(c[e]._times[r].ini))/3600})})),console.log(c[e]),t.push({name:"",email:"",type:"",card:"",description:"",iniData:"",finalData:"",total:c[e].timerText,hours:"",minutes:"",seconds:"",calc:parseInt(c[e].totalTimer)/3600}),h=Object(a.a)(Object(a.a)({},h),{},Object(n.a)({},e,t))}));var y=m,x="";m<60?(v=y,x="".concat(y," ").concat(Object(f.w)("$__seconds",1))):m>3600?(y-=3600*(g=Math.trunc(y/3600)),v=(y-=60*(b=Math.trunc(y/60)>0?Math.trunc(y/60):0))>0?y:0,x="".concat(g," ").concat(Object(f.w)("$__hour",1)).concat(g>1?"s":""," ").concat(b," ").concat(Object(f.w)("$__minutes",1)," ").concat(v," ").concat(Object(f.w)("$__seconds",1))):(v=(y-=60*(b=Math.trunc(y/60)>0?Math.trunc(y/60):0))>0?y:0,x="".concat(b," ").concat(Object(f.w)("$__minutes",1)," ").concat(v," ").concat(Object(f.w)("$__seconds",1))),s.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:x,hours:"",minutes:"",seconds:"",calc:""})}return i.a.createElement(t,{filename:"".concat(u()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_timeSheet"),element:i.a.createElement(p.a,{title:Object(f.w)("$__export"),text:Object(f.w)("$__export"),icon:"file_download",size:"25px"})},i.a.createElement(r,{data:s,name:"timeSheet"},i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__name",1)),value:"name"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__type",1)),value:"type"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__card",1)),value:"card"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__description",1)),value:"description"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__initialTimer",1)),value:"iniData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__finalTimer",1)),value:"finalData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__totalTime",1)),value:"total"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__hours",1)),value:"hours"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__minutes",1)),value:"minutes"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__seconds",1)),value:"seconds"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__valueForCalculation",1)),value:"calc"})),h&&Object.keys(h).length>0&&Object.keys(h).map((function(e,t){var n=h[e][0].name;return i.a.createElement(r,{data:h[e],name:n,key:e},i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__name",1)),value:"name"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__type",1)),value:"type"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__card",1)),value:"card"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__description",1)),value:"description"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__initialTimer",1)),value:"iniData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__finalTimer",1)),value:"finalData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__totalTime",1)),value:"total"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__hours",1)),value:"hours"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__minutes",1)),value:"minutes"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__seconds",1)),value:"seconds"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.w)("$__valueForCalculation",1)),value:"calc"}))})))}},662:function(e,t,r){"use strict";var n=r(2),a=r(879),o=r.n(a),i=r(880),c=r.n(i),l=r(881),s=r.n(l),u=r(882),d=r.n(u),p=r(1153),f=r.n(p),h=r(1154),m=r.n(h),g=r(1155),b=r.n(g),v=r(1156),y=r.n(v),x=r(124),w=r.n(x),_=r(1157),O=r.n(_),j=r(159),E=r.n(j),k=r(671),S={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"},{label:"$__crm",value:"crm",swot:!1,kanban:!0,overview:!1,description:"$__crmPlanDescription"}],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:{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}}},{value:"p1",label:"$__saasPlanName1",settings:{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}}},{value:"p2",label:"$__saasPlanName2",settings:{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}}},{value:"p3",label:"$__saasPlanName3",settings:{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}}},{value:"p4",label:"$__saasPlanName4",settings:{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}}},{value:"p5",label:"$__saasPlanName5",settings:{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}}}],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:w.a,color:null,calendar:!0},{value:"guidelineD",label:"$__guidelineD",icon:o.a,color:null,calendar:!0},{value:"guidelineR",label:"$__guidelineR",icon:s.a,color:null,calendar:!0},{value:"guidelineC",label:"$__guidelineC",icon:c.a,color:null,calendar:!0},{value:"guidelineE",label:"$__guidelineE",icon:d.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:E.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"},{value:"removeAll",label:"$__removeAll"}],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:f.a,title:"Microsoft Word",viewer:"microsoft"},{ext:["xls","xlt","ooxml","xlsx"],icon:m.a,title:"Microsoft Excel",viewer:"microsoft"},{ext:["ppt","pptx","ppsx","sldx"],icon:b.a,title:"Microsoft PowerPoint",viewer:"microsoft"},{ext:["pdf"],icon:O.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:"departments",icon:"groups",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:["independentAccount"],data:{type:"group"}},{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","forms","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:E.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:w.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:o.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:s.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:d.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:c.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:y.a,db:"cards",hash:["matrix"]},{name:"matrix",icon:w.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]:S,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}},671:function(e){e.exports=JSON.parse('{"name":"machen","version":"3.1.284","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/bump":"^0.83.0","@nivo/circle-packing":"^0.70.1","@nivo/core":"^0.70.1","@nivo/funnel":"^0.80.0","@nivo/line":"^0.83.0","@nivo/pie":"^0.70.1","@nivo/sankey":"^0.70.1","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","d3-shape":"^3.2.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","i":"^0.3.7","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.29.2","moment-timezone":"^0.5.31","nouislider":"14.0.2","pdf-lib":"^1.16.0","perfect-scrollbar":"1.4.0","rc-color-picker":"^1.2.6","react":"^17.0.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-copy-to-clipboard":"^5.1.0","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.14.1","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-grid-layout":"^1.3.4","react-image-file-resizer":"^0.4.7","react-jvectormap":"0.0.12","react-keyed-file-browser":"^1.10.0","react-linear-gradient-picker":"^3.0.1","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.4","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-virtualized-auto-sizer":"^1.0.15","react-virtuoso":"^3.1.5","react-webcam":"^7.1.1","react-window":"^1.8.9","react-window-infinite-loader":"^1.0.8","reactjs-pdf-reader":"^1.0.12","reactour":"^1.19.0","redux-saga":"^1.1.3","sass":"^1.65.1","simple-peer":"^9.11.1","socket.io-client":"^4.4.1","styled-components":"^5.2.0","utf-8-validate":"^6.0.3","utf8":"^3.0.0","uuid":"^8.3.2","xlsx":"^0.18.5"},"scripts":{"start":"react-scripts start","build":"react-scripts build --passWithNoTests","test":"react-scripts test --env=jsdom","eject":"react-scripts eject","deploy":"npm run build --passWithNoTests ","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 --no-package-lock  && npm start"},"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-plugin-react-hooks":"^4.6.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":[]}}')},674: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="},687:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(20),i=r(15),c=r(13),l=r(14),s=r(165),u=r(1),d=r(24),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,timeline:e.timeline}}),(function(e){return Object(c.b)(i,e)}))((function(e){var t=p(),r=Object(d.j)(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}))}))},688:function(e,t,r){var n=r(378),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"}}}},689:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(1),i={container:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",border:"0.5px solid ".concat(Object(o.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",padding:"3px",minWidth:"150px",display:"flow-root"}),cardContainer:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",minWidth:"150px",display:"flow-root"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(o.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(o.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(o.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=i},69:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(1899),c=r(165),l=r(1);t.a=function(e){var t={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(Object(l.d)("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(l.d)("color")}},bar:{borderRadius:7}},r=Object(c.a)(t)(),a=Object(n.a)({},e);return a.showText&&delete a.showText,a.customColor&&delete a.customColor,o.a.createElement("div",{className:r.root,style:e.showText?{width:"calc(100% - 40px)"}:{}},o.a.createElement(i.a,a),e.showText&&o.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))}},690:function(e,t,r){"use strict";var n=r(10),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(15),s=r(43),u=r(3),d=r(13),p=r(14),f=r(46),h=r(25),m=r(201),g=r(11),b=r(64),v=r(69),y=r(570),x=r(360),w=r(34),_=r(345),O=r(1),j=r(24),E=r(65);function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=Object(p.b)((function(){return{}}),(function(e){return Object(d.b)(l,e)}))(Object(w.a)(_.a)((function(e){var t=u.a.getState().db,r=c.a.useState({}),i=Object(o.a)(r,2),l=i[0],d=i[1];c.a.useEffect((function(){d(Object(a.a)(Object(a.a)(Object(a.a)({},e.toTemplate&&t.cards[e.cardId].name?{name:"".concat(Object(O.w)("$__template")," - ").concat(t.cards[e.cardId].name)}:{}),e.toTemplate&&t.cards[e.cardId].description?{description:t.cards[e.cardId].description}:{}),e.toTemplate&&t.cards[e.cardId].image?{image:t.cards[e.cardId].image}:{}))}),[]);var p=c.a.useState({}),w=Object(o.a)(p,2),_=w[0],S=w[1],L=c.a.useState(0),C=Object(o.a)(L,2),I=C[0],T=C[1],D=u.a.getState().db.cards[e.cardId]&&u.a.getState().db.cards[e.cardId].type?t.dataType.filter((function(t){return t.name===u.a.getState().db.cards[e.cardId].type}))[0]:{},F=function(){var r=Object(n.a)(k().mark((function r(){var n,o;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!l||l.name){r.next=4;break}S(Object(a.a)(Object(a.a)({},_),{},{name:!0})),r.next=15;break;case 4:return T(1),r.prev=5,n=Object(a.a)(Object(a.a)(Object(a.a)({},t.cards[e.cardId]),l),{},{templateId:t.cards[e.cardId]._id,created_at:null,isTemplate:!!e.toTemplate||null,order:null,updated_at:null,_id:null,_planId:null}),r.next=9,Object(j.F)(e,!0,n);case 9:(o=r.sent)&&o._id&&(T(2),setTimeout((function(){N(o._id)}),1500)),r.next=15;break;case 13:r.prev=13,r.t0=r.catch(5);case 15:case"end":return r.stop()}}),r,null,[[5,13]])})));return function(){return r.apply(this,arguments)}}(),N=function(){var t=Object(n.a)(k().mark((function t(r){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(j.i)(e,e.cardId,r);case 3:t.sent&&(T(3),setTimeout((function(){A(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)}}(),A=function(){var t=Object(n.a)(k().mark((function t(r){var n,a;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(E.b)(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,Object(E.b)(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(T(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?s.a.push("sp#tab/templates"):s.a.push("sp#".concat(r,"/dashboard"))}),500));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return I>0?c.a.createElement(x.a,{style:{padding:"7px"}},c.a.createElement(b.a,{title:"".concat(l.name?l.name:t.cards[e.cardId].name," "),icon:D&&D.icon?D.icon:"help",iconTitle:"$__".concat(t.cards[e.cardId].type),color:Object(O.d)("medium"),fontSize:"16px"}),1===I&&c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",clear:"both"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(O.w)("$__installingTemplate")),c.a.createElement(v.a,null)),2===I&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(O.w)("$__templateInstalled")),c.a.createElement(g.a,{icon:"done_all",color:"green"})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(O.w)("$__copyingData")),c.a.createElement(v.a,null))),3===I&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(O.w)("$__templateInstalled")),c.a.createElement(g.a,{icon:"done_all",color:"green"})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",marginTop:"15px"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(O.w)("$__copiedData")),c.a.createElement(g.a,{icon:"done_all",color:"green"})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(O.w)("$__preparingToRedirect")),c.a.createElement(v.a,null))),4===I&&c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{position:"relative",float:"left",padding:"15px",display:"flex",justifyContent:"center",borderRadius:"50%",border:"solid 1px green"}},c.a.createElement(g.a,{icon:"done_all",color:"green",size:"50px"}))),c.a.createElement("div",{style:{clear:"both"}})):c.a.createElement(x.a,{style:{padding:"7px"}},c.a.createElement(b.a,{title:"".concat(Object(O.w)("$__template",1),": ").concat(t.cards[e.cardId].name),icon:D&&D.icon?D.icon:"help",iconTitle:"$__".concat(t.cards[e.cardId].type),color:Object(O.d)("medium"),fontSize:"16px"}),c.a.createElement("div",null,c.a.createElement(m.a,{img:e.toTemplate&&t.cards[e.cardId].image?t.cards[e.cardId].image:null,onChange:function(e,t){d(Object(a.a)(Object(a.a)({},l),{},{image:e,file:t}))},placeholder:""}),c.a.createElement(h.a,{error:_&&_.name,label:"".concat(Object(O.w)("$__customName",1)),variant:Object(O.d)("fieldVariant"),name:"name",defaultValue:e.toTemplate&&t.cards[e.cardId].name?"".concat(Object(O.w)("$__template")," - ").concat(t.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(y.a,{position:"start"},c.a.createElement(g.a,{icon:"view_headline"})),onChange:function(e){d(Object(a.a)(Object(a.a)({},l),{},{name:e.target.value})),_&&_.name&&S(Object(a.a)(Object(a.a)({},_),{},{name:!1}))}},placeholder:Object(O.w)(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),c.a.createElement(h.a,{label:"".concat(Object(O.w)("$__customDescription",1)),variant:Object(O.d)("fieldVariant"),name:"description",defaultValue:e.toTemplate&&t.cards[e.cardId].description?t.cards[e.cardId].description:null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(y.a,{position:"start"},c.a.createElement(g.a,{icon:"toc"})),onChange:function(e){d(Object(a.a)(Object(a.a)({},l),{},{description:e.target.value}))}},placeholder:Object(O.w)(e.toTemplate?"$__templateDescription_placeholder":"$__planDescription_placeholder",1),multiline:!0})),c.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"#4caf50",marginTop:"7px",cursor:"pointer"},onClick:function(e){F(),e.stopPropagation()}},c.a.createElement(f.a,{text:Object(O.w)("$__ready","*"),icon:"done_all",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),c.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"lightgrey",cursor:"pointer"},onClick:function(t){e.onComplete(),t.stopPropagation()}},c.a.createElement(f.a,{text:Object(O.w)("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})))},691:function(e,t,r){"use strict";var n=r(7),a=r(1);t.a=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:n.I,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:n.I,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(a.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.b)+", 0.4)"},info:{backgroundColor:n.s[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.s[0])+", 0.4)"},success:{backgroundColor:n.B[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.B[0])+", 0.4)"},danger:{backgroundColor:n.i[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.i[0])+", 0.4)"},warning:{backgroundColor:n.H[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.H[0])+", 0.4)"},primary:{backgroundColor:n.w[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.w[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(n.q)(n.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(n.q)(n.b)+", 0.87)",background:Object(a.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(n.q)(n.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(n.q)(n.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(a.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",height:"auto",width:"calc(100% - 0px)",zIndex:10,padding:"7px"},files:{display:"inline-table",position:"relative"},textEditorIcon:{cursor:"pointer",color:Object(a.d)("color")},progressBar:{backgroundColor:"".concat(Object(a.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(a.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(a.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"}}}}},692:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(1),i={labelTop:Object(n.a)(Object(n.a)({},a.k),{},{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(o.d)("color")},"& label.MuiFormLabel-filled":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(o.d)("fieldVariant")?"0px":"filled"===Object(o.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(o.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}}),noLabel:Object(n.a)(Object(n.a)({},a.k),{},{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(o.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(o.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}}),labelTopLight:Object(n.a)(Object(n.a)({},a.k),{},{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(o.d)("color")},"& label.MuiFormLabel-filled":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(o.d)("fieldVariant")?"0px":"filled"===Object(o.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}}),noLabelLight:Object(n.a)(Object(n.a)({},a.k),{},{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(o.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}})};t.a=i},7:function(e,t,r){"use strict";r.d(t,"q",(function(){return a})),r.d(t,"l",(function(){return o})),r.d(t,"D",(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,"k",(function(){return s})),r.d(t,"w",(function(){return u})),r.d(t,"H",(function(){return d})),r.d(t,"i",(function(){return p})),r.d(t,"B",(function(){return f})),r.d(t,"s",(function(){return h})),r.d(t,"z",(function(){return m})),r.d(t,"p",(function(){return g})),r.d(t,"b",(function(){return b})),r.d(t,"I",(function(){return v})),r.d(t,"F",(function(){return y})),r.d(t,"n",(function(){return x})),r.d(t,"o",(function(){return w})),r.d(t,"t",(function(){return _})),r.d(t,"u",(function(){return O})),r.d(t,"J",(function(){return j})),r.d(t,"E",(function(){return E})),r.d(t,"a",(function(){return k})),r.d(t,"m",(function(){return S})),r.d(t,"x",(function(){return L})),r.d(t,"G",(function(){return P})),r.d(t,"A",(function(){return $})),r.d(t,"h",(function(){return M})),r.d(t,"r",(function(){return B})),r.d(t,"v",(function(){return z})),r.d(t,"y",(function(){return Y})),r.d(t,"g",(function(){return R})),r.d(t,"j",(function(){return G})),r.d(t,"C",(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",w="#dd4b39",_="#0976b4",O="#cc2127",j="#e52d27",E="#35465c",k="#1769ff",S="#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)"},D={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(f[0])+",.4)"},F={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(d[0])+",.4)"},N={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]+")"},F),$=Object(n.a)({background:"linear-gradient(60deg, "+f[1]+", "+f[2]+")"},D),M=Object(n.a)({background:"linear-gradient(60deg, "+p[1]+", "+p[2]+")"},N),B=Object(n.a)({background:"linear-gradient(60deg, "+h[1]+", "+h[2]+")"},T),z=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"})})},70:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var n=r(8),a=r(61),o=r(0),i=r.n(o),c=r(100),l=r.n(c),s=r(165),u=r(7),d={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+Object(u.q)(u.b)+", 0.87)",background:u.I,width:"100%",boxShadow:"0 1px 4px 0 rgba("+Object(u.q)(u.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(u.q)(u.b)+", 0.56), 0 4px 25px 0px rgba("+Object(u.q)(u.b)+", 0.12), 0 8px 10px -5px rgba("+Object(u.q)(u.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(u.q)(u.b)+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+Object(u.q)(u.I)+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+Object(u.q)(u.b)+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:u.p[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+Object(u.q)(u.p[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:u.p[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:u.I,borderColor:"rgba("+Object(u.q)(u.I)+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:u.I,fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+u.w[1]+","+u.w[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},info:{background:"linear-gradient(60deg,"+u.s[1]+","+u.s[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},success:{background:"linear-gradient(60deg,"+u.B[1]+","+u.B[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},warning:{background:"linear-gradient(60deg,"+u.H[1]+","+u.H[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},danger:{background:"linear-gradient(60deg,"+u.i[1]+","+u.i[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},rose:{background:"linear-gradient(60deg,"+u.z[1]+","+u.z[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+Object(u.q)(u.b)+")",transition:"all 300ms linear"}},p=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],f=Object(s.a)(d);function h(e){var t,r=f(),o=e.className,c=e.children,s=e.plain,u=e.profile,d=e.blog,h=e.raised,m=e.background,g=e.pricing,b=e.color,v=e.product,y=e.testimonial,x=e.chart,w=e.login,_=Object(a.a)(e,p),O=l()((t={},Object(n.a)(t,r.card,!0),Object(n.a)(t,r.cardPlain,s),Object(n.a)(t,r.cardProfile,u||y),Object(n.a)(t,r.cardBlog,d),Object(n.a)(t,r.cardRaised,h),Object(n.a)(t,r.cardBackground,m),Object(n.a)(t,r.cardPricingColor,g&&void 0!==b||g&&void 0!==m),Object(n.a)(t,r[b],b),Object(n.a)(t,r.cardPricing,g),Object(n.a)(t,r.cardProduct,v),Object(n.a)(t,r.cardChart,x),Object(n.a)(t,r.cardLogin,w),Object(n.a)(t,o,void 0!==o),t));return i.a.createElement("div",Object.assign({className:O},_),c)}},723:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(10),i=r(5),c=r(0),l=r.n(c),s=r(14),u=r(13),d=r(15),p=r(3),f=r(1226),h=r(70),m=r(74),g=r(58),b=r(11),v=r(1),y=r(24);function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(y=_);var O=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(O,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(s.b)(null,(function(e){return Object(u.b)(d,e)}))((function(e){var t=l.a.useState({editor:!1,text:"",height:"auto"}),r=Object(i.a)(t,2),s=r[0],u=r[1],d=l.a.useState(!1),w=Object(i.a)(d,2),_=w[0],O=w[1],j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=p.a.getState().db,k=function(){var t=Object(o.a)(x().mark((function t(r){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!s.text&&!r){t.next=6;break}return t.next=3,Object(y.F)(e,!1,Object(a.a)(Object(a.a)({},E.cards[j[0]]),{},{note:r?null:s.text}));case 3:t.sent&&Object(v.c)({message:Object(v.w)("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),u({editor:!1,text:r?"":s.text,height:"auto"});case 6:O(!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(c.useEffect)((function(){var e;u({editor:!1,text:(null===(e=p.a.getState().db.cards[j[0]])||void 0===e?void 0:e.note)?p.a.getState().db.cards[j[0]].note:"",height:"auto"})}),[]),l.a.createElement("div",{style:{width:"100%",height:"100%"}},l.a.createElement(h.a,{style:{marginTop:"0",height:"100%"}},e.edit?l.a.createElement("div",{style:{width:"100%",height:"48px",minHeight:"48px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},l.a.createElement(b.a,{size:24,style:{alignSelf:"center",marginLeft:"19.5px",color:e.styles.color?e.styles.color:"grey",marginTop:"2px"}},"note"),l.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"grey",fontSize:"16px"}},Object(v.w)("$__notes",1)),l.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},l.a.createElement(b.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),l.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},l.a.createElement(b.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):l.a.createElement(g.a,{title:Object(v.w)("$__notes",1),icon:"note",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",height:"58px",minHeight:"48px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},customButtons:[].concat(Object(n.a)(s.text&&!s.editor?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){k(!0)},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},{title:"$__edit",icon:"edit",onClick:function(){u(Object(a.a)(Object(a.a)({},s),{},{editor:!0}))},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}]:[]),[_&&{title:"$__saveNote",icon:"save",onClick:function(){k()},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},s.editor&&{title:"$__cancel",icon:"cancel",onClick:function(){u(Object(a.a)(Object(a.a)({},s),{},{text:E.cards[j[0]].note,editor:!1})),O(!1)},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}])}),l.a.createElement(m.a,{style:{display:"flex",justifyContent:"center",height:"100%"}},s.text||s.editor?s.editor?l.a.createElement(f.a,{style:{borderRadius:"7px",border:"0px",padding:"7px",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontSize:"16px",width:"100%",overflow:"scroll",height:"100%",minWidth:"calc(100% - 0px)",maxWidth:"calc(100% - 0px)"},placeholder:Object(v.w)("$__planNotePlaceholder"),onChange:function(e){O(!0),u(Object(a.a)(Object(a.a)({},s),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==E.cards[j[0]].note||(O(!1),u(Object(a.a)(Object(a.a)({},s),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},s.text):l.a.createElement("div",{style:{fontSize:"16px",width:"100%",height:"100%",overflow:"scroll",maxHeight:"90%"},onClick:function(){u(Object(a.a)(Object(a.a)({},s),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:Object(v.p)(s.text)}}):l.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer",height:"100%"},onClick:function(){u(Object(a.a)(Object(a.a)({},s),{},{editor:!0}))}},l.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},l.a.createElement(b.a,{size:"33px",color:"rgba(0,0,0,0.2)"},"add")),l.a.createElement("div",{style:{color:"rgba(0,0,0,0.2)",fontSize:"22px",fontWeight:"bold",marginLeft:"15px"}},Object(v.w)("$__addNote"))))))}))},724:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},732:function(e,t,r){"use strict";var n=r(19),a=r(8),o=r(2),i=r(10),c=r(5),l=r(0),s=r.n(l),u=r(1167),d=r(912),p=r(497),f=r(1168),h=r.n(f),m=r(6),g=r.n(m),b=r(14),v=r(13),y=r(15),x=r(3),w=r(11),_=r(135),O=r(359),j=r(165),E=r(1),k=Object(j.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function S(e){var t=k();return s.a.createElement(_.a,{title:e.title?e.title:""},s.a.createElement(O.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle,style:e.style||{}},s.a.createElement(w.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:Object(E.d)("menu"),icon:e.icon?e.icon:"circle"})))}var L=r(20),C=r(143),I=r(150),T=r(1899),D=r(2001),F={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:{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(E.d)("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},N=r(7),A=function(e){var t,r;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(a.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(a.a)(t,"color",N.I),Object(a.a)(t,"width","30px"),Object(a.a)(t,"height","30px"),Object(a.a)(t,"lineHeight","25px"),Object(a.a)(t,"fontSize","12px"),Object(a.a)(t,"textAlign","center"),Object(a.a)(t,"position","absolute"),Object(a.a)(t,"bottom","23px"),Object(a.a)(t,"left","50%"),Object(a.a)(t,"marginLeft","-24px"),Object(a.a)(t,"zIndex","1"),Object(a.a)(t,"borderTopRightRadius","50%"),Object(a.a)(t,"borderTopLeftRadius","50%"),Object(a.a)(t,"borderBottomRightRadius","50%"),Object(a.a)(t,"borderBottomLeftRadius","50%"),Object(a.a)(t,"display","flex"),Object(a.a)(t,"alignItems","center"),Object(a.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(E.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.b)+", 0.4)"},info:{backgroundColor:N.s[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.s[0])+", 0.4)"},success:{backgroundColor:N.B[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.B[0])+", 0.4)"},danger:{backgroundColor:N.i[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.i[0])+", 0.4)"},warning:{backgroundColor:N.H[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.H[0])+", 0.4)"},primary:{backgroundColor:N.w[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.w[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(a.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(a.a)(r,"width","45%"),Object(a.a)(r,"float","left"),Object(a.a)(r,"padding","7px"),Object(a.a)(r,"marginBottom","5px"),Object(a.a)(r,"position","relative"),Object(a.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(N.q)(N.b)+", 0.14)"),Object(a.a)(r,"borderRadius","6px"),Object(a.a)(r,"color","rgba("+Object(N.q)(N.b)+", 0.87)"),Object(a.a)(r,"background",N.I),Object(a.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+N.p[10],borderRight:"0 solid "+N.p[10],borderBottom:"15px solid transparent",content:'" "'}),Object(a.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+N.I,borderRight:"0 solid "+N.I,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(a.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:N.I,"&: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(E.d)("medium")},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: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(E.d)("color")},progressBar:{backgroundColor:"".concat(Object(E.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(E.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(E.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(o.a)(Object(o.a)({},N.k),{},{"& textarea":Object(o.a)(Object(o.a)({},N.k),{},{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":{padding:"0.7rem 1rem",border:0,resize:"none",outline:"none",fontSize:"0.9rem",color:"#7288a3",borderColor:" #3a546f",overflow:"hidden","&& :: placeholder":{color:"#7288a3"}}}}}},P=r(75),$=r(180),M=r(78),B=r(55),z=r(38),Y=r(152),R=r.n(Y),G=r(33),H=r(22),W=r(35);function U(){U=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var q=Object(j.a)(A);t.a=Object(b.b)((function(e,t){return{draft:e.chats&&e.chats.drafts?e.chats.drafts[t.nodeId]:{}}}),(function(e){return Object(v.b)(y,e)}))((function(e){var t=x.a.getState(),r=t.db,l=t.session,f=s.a.useState(""),m=Object(c.a)(f,2),b=m[0],v=m[1],y=s.a.useState(!1),_=Object(c.a)(y,2),O=_[0],j=_[1],k=s.a.useState(!1),N=Object(c.a)(k,2),A=N[0],Y=N[1],V=s.a.useState([]),J=Object(c.a)(V,2),X=J[0],K=J[1],Z=s.a.useState([]),Q=Object(c.a)(Z,2),ee=Q[0],te=Q[1],re=s.a.useState({}),ne=Object(c.a)(re,2),ae=ne[0],oe=ne[1],ie=s.a.useState(null),ce=Object(c.a)(ie,2),le=ce[0],se=ce[1],ue=s.a.useState(null),de=Object(c.a)(ue,2),pe=de[0],fe=de[1],he=s.a.useState(!1),me=Object(c.a)(he,2),ge=me[0],be=me[1],ve=s.a.useState([]),ye=Object(c.a)(ve,2),xe=ye[0],we=ye[1],_e=s.a.useState(!1),Oe=Object(c.a)(_e,2),je=Oe[0],Ee=Oe[1],ke=s.a.useState(58),Se=Object(c.a)(ke,2),Le=Se[0],Ce=Se[1],Ie=q(),Te=s.a.createRef(),De=s.a.createRef(),Fe=s.a.useRef(!0);s.a.useEffect((function(){return Fe.current=!0,function(){Fe.current=!1}}),[]);var Ne=Object(E.j)(),Ae=0;l._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(l._id)>-1}))]&&(Ae=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(l._id)>-1}))]);var Pe=window.location.hash.split("/");Pe[0]=Pe[0].replace("#",""),s.a.useEffect((function(){var t;return Fe.current&&(e.draft&&e.draft.message?v(e.draft.message):v("")),(null===e||void 0===e||null===(t=e.draft)||void 0===t?void 0:t.files)?K(e.draft.files):K([]),function(){v("")}}),[e.nodeId]);var $e=s.a.createRef();s.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=b){var r=e.split("@[");r.length>0&&r.forEach((function(e){if(e){var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},Be=function(){var t=Object(i.a)(U().mark((function t(){var n,c,s,u,d,f,h,m;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],c={_id:Object(p.a)(),idRel:e.nodeId,replyData:e.draft&&e.draft.reply&&x.a.getState().timeline[e.nodeId][e.draft.reply]?x.a.getState().timeline[e.nodeId][e.draft.reply]:{},reply:e.draft&&e.draft.reply?e.draft.reply:null,message:b,type:"comment",mentions:Me(),notifyUsers:n,filesCount:X.length>0?X.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"},pe&&(c=Object(o.a)(Object(o.a)({},c),{},{urlPreview:JSON.stringify(pe)}),fe(null)),v(""),Ee(!1),X.length>0&&j(!0),s=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!==l._id&&-1===s.indexOf(e)})).forEach((function(e){n.push(e)})),e.onSending&&e.onSending(Object(o.a)(Object(o.a)({},c),{},{user:{_id:l._id,name:r.users[l._id].name,image:r.users[l._id].image||null}})),(u=Object(o.a)(Object(o.a)({},c),{},{created_at:"".concat(g()().unix("x")),user:{_id:l._id,name:r.users[l._id].name,image:r.users[l._id].image||null}})).mentions&&delete u.mentions,u.notifyUsers&&delete u.notifyUsers,u.db&&delete u.db,Object(M.h)({reduxFunction:e.reduxFunction},Object(o.a)(Object(o.a)({},c),{},{comment:u})),e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,{message:null,reply:null,files:null}))})),t.next=17,z.a.post("timeline/add",c);case 17:return(d=t.sent)&&d.data&&(f=d.data)._id&&(h=Object(o.a)(Object(o.a)({},f.comment),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null}),m=2,Ae<2&&(m=Ae),s.map(function(){var t=Object(i.a)(U().mark((function t(n){return U().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])&&Object(P.b)(e,n,m,e.nodeId,!0);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),X.length>0?Re({comment:h,dataMessage:c}):(e.onSending&&e.onSending(),te([]),K([]),we([]),fe(null),be(!1),j(!1),e.onSending&&e.onSending())),t.abrupt("return",!1);case 20:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ze=function(){var e=Object(i.a)(U().mark((function e(t,r){var n;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),oe(Object(o.a)(Object(o.a)({},ae),{},Object(a.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ye=function(){var e=Object(i.a)(U().mark((function e(t,r){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:se({options:t,fi:r}),oe({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Re=function(){var t=Object(i.a)(U().mark((function t(r){var n,a,o,c,l,s=arguments;return U().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]:[],o=r.comment,c=r.dataMessage,(l=Array.from(X)).map(function(){var t=Object(i.a)(U().mark((function t(i,s){var u,d;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s!==n){t.next=5;break}return t.next=3,Object($.a)(o._id,i,!0,{onUploadProgress:function(e){return ze(e,s)},onUploadError:function(e){Ye(r,s)}});case 3:(u=t.sent)&&((d=Array.from(a)).push(u),te(d),l.length>n+1?Re(r,n+1,d):l.length===n+1&&(c.files=d,setTimeout((function(){z.a.post("timeline/add",c)}),1e3),te([]),K([]),fe(null),be(!1),j(!1),e.onSending&&e.onSending()));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ge=function(){var t=Object(i.a)(U().mark((function t(r){var i,c;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=!1,K([].concat(Object(n.a)(X),Object(n.a)(Object.keys(r).filter((function(e){return!(r[e].size>100663296)||(c=!0,!1)})).map((function(e){return r[e]}))))),c&&Object(E.c)({message:Object(E.w)("$__filesSentCannotExceed100mbEach",1),variant:"warning",persist:!1,horizontal:"center"}),e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},(null===(i=x.a.getState().chats.drafts)||void 0===i?void 0:i[e.nodeId])||{}),{},{files:[].concat(Object(n.a)(X),Object(n.a)(Object.keys(r).filter((function(e){return!(r[e].size>100663296)})).map((function(e){return r[e]}))))})))})),Y(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),He=function(){var e=Object(i.a)(U().mark((function e(t){var r,n,a,o,i,c;return U().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=28;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.forEach((function(e){var t=e.replace(":","");(t.indexOf("http://")>-1||t.indexOf("https://")>-1)&&a.test(t)&&(r=e)}));case 8:if(!(!pe&&r&&-1===xe.indexOf(r)||r&&pe&&-1===xe.indexOf(r)&&pe.link!==r)){e.next=28;break}if(be(!0),-1!==t.indexOf("youtube.com/watch?")){e.next=27;break}return e.prev=11,e.next=14,B.a.post("/URL_DATA",{url:r});case 14:(o=e.sent)&&o.data&&(i=o.data)&&i.title&&i.img&&i.contentSnippet?fe(i):(be(!1),fe(null)),e.next=27;break;case 18:e.prev=18,e.t0=e.catch(11),be(!1),fe(null),(c=xe).push(r),we(c),Object(E.c)({message:Object(E.w)("$__couldNotLoadDataFromURL",1),variant:"warning",persist:!1,horizontal:"center"}),console.log(e.t0);case 27:t.indexOf("youtube.com/watch?")>-1&&be(!1);case 28:t.indexOf("youtube.com/watch?")>-1&&be(!1);case 29:case"end":return e.stop()}}),e,null,[[11,18]])})));return function(t){return e.apply(this,arguments)}}(),We=[];return r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).forEach((function(t){if(t&&null!==t&&void 0!==t&&t!==l._id&&r.cards[e.nodeId]._users[t].name&&(!r.users[t]||r.users[t]&&!r.users[t].deleted)){var n=r.cards[e.nodeId]._users[t]._id,a=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;n&&0===Object.keys(We).filter((function(e){return We[e].id===n})).length&&We.push({id:n,display:a})}})),r.cards[e.nodeId]&&!r.cards[e.nodeId].private&&(Ne&&(Ne.owner||Ne.planAdmin||Ne.planModerate)||Ae&&Ae.access&&parseInt(Ae.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))})).forEach((function(t){t&&null!==t&&void 0!==t&&t!==l._id&&0===Object.keys(We).filter((function(e){return We[e].id===t})).length&&We.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).forEach((function(t){t&&null!==t&&void 0!==t&&t!==l._id&&0===Object.keys(We).filter((function(e){return We[e].id===t})).length&&We.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).forEach((function(t){t&&null!==t&&void 0!==t&&t!==l._id&&0===Object.keys(We).filter((function(e){return We[e].id===t})).length&&We.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})})),s.a.createElement(u.FileDrop,{ref:Te,className:e.relative?Ie.rootRelative:Ie.root,onDragOver:function(){!e.disabledSend&&Y(!0)},onDrop:Ge,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"},s.a.createElement(s.a.Fragment,null,e.nodeId&&!e.disabledSend?s.a.createElement("div",{className:e.relative?Ie.editorRelative:Ie.editor,style:Object(o.a)(Object(o.a)({},e.editorStyle?e.editorStyle:{}),{},{backgroundColor:"#F0F0F0"})},s.a.createElement("div",{className:Ie.textEditor},ge&&!pe&&s.a.createElement("div",{className:Ie.urlPreview,style:{width:"100%",height:"150px"}},s.a.createElement("div",{style:{display:"flex"}},s.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},s.a.createElement(D.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),s.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},s.a.createElement(D.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),s.a.createElement(D.a,{variant:"text",height:10}),s.a.createElement(D.a,{variant:"text",height:10}),s.a.createElement(D.a,{variant:"text",height:10}),s.a.createElement(D.a,{variant:"text",height:10}),s.a.createElement(D.a,{variant:"text",height:10}),s.a.createElement(D.a,{variant:"text",height:10})))),e.draft&&e.draft.reply||X&&X.length>0?s.a.createElement("div",{style:{position:"absolute",right:0,left:0,height:"auto",padding:7,bottom:Le+4,backgroundColor:"#f0f0f0",display:"flex",justifyContent:"space-between"}},e.draft&&e.draft.reply?s.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},s.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},s.a.createElement("div",{style:{color:Object(E.d)("menu"),display:"flex",alignItems:"center"}},s.a.createElement(w.a,{icon:"reply",color:Object(E.d)("menu"),size:"22px"}),s.a.createElement("span",{style:{marginLeft:10}},Object(E.w)("$__reply")))),s.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(E.d)("menu"))}},s.a.createElement(W.a,null,s.a.createElement(C.a,{storie:x.a.getState().timeline[e.nodeId][e.draft.reply],hideCards:!0,db:e.db,nodeId:e.nodeId,showUserName:!0,noReactions:!0}),s.a.createElement("div",{style:{position:"absolute",top:0,right:0}},s.a.createElement(L.a,{title:Object(E.w)("$__cancelReply"),color:"red",icon:"cancel",size:"17px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts[e.nodeId]||{}),{},{reply:null})))}))},transparent:!0}))))):s.a.createElement(s.a.Fragment,null),X&&X.length>0?s.a.createElement("div",{style:{position:"relative",maxHeight:"100%",width:"100%"}},s.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,display:"flex",justifyContent:"flex-end"}},s.a.createElement(L.a,{title:Object(E.w)("$__clearFiles",1),text:Object(E.w)("$__clearFiles"),color:"gray",icon:"clear_all",onClick:function(){Object(E.c)({message:Object(E.w)("$__confirmClearFiles",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t;K([]),e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},(null===(t=x.a.getState().chats.drafts)||void 0===t?void 0:t[e.nodeId])||{}),{},{files:null})))}))}})},size:"25px"})),s.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,overflow:"auto",display:"flex"}},X.map((function(e,t){var n=e.name.split("."),a="attachment";return r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(a=r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(e)),s.a.createElement("div",{key:t,title:e.name,style:{position:"relative",padding:7,width:"100px",justifyContent:"center"}},s.a.createElement("div",{style:{position:"relative",width:"50px",height:"50px",margin:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},"string"===typeof a&&-1===a.indexOf("blob:")&&-1===a.indexOf("svg")?s.a.createElement(w.a,{icon:a,size:"50px"}):s.a.createElement("img",{alt:"MACHEN_IMAGE",src:a,style:{width:"100%",height:"100%"}})),s.a.createElement("div",{style:{position:"relative",margin:"auto",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"calc(100% - 30px)",overflow:"hidden"}},e.name),s.a.createElement("div",{style:{position:"absolute",top:0,right:3,display:"flex"}},ee&&ee.length>0&&ee[t]?s.a.createElement(w.a,{icon:"cloud_done",color:"green"}):O?s.a.createElement(s.a.Fragment,null):s.a.createElement(w.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(X);t.splice(e,1),K(t)}(t)}})),le&&le.fi===t?s.a.createElement(L.a,{title:Object(E.w)("$__uploadFiles",1),text:Object(E.w)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Re({comment:le.options.comment},le.fi,ee),se(null)},size:"25px"}):ae&&String(ae[t])&&ae[t]<100?s.a.createElement("div",{style:{display:"flex",alignItems:"center"}},s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{style:{minWidth:177}},s.a.createElement(T.a,{variant:"buffer",className:Ie.progressBar,value:ae[t]<90?ae[t]:90,valueBuffer:ae[t]})),s.a.createElement("div",{style:{color:Object(E.d)("color"),fontSize:10,marginLeft:15}},ae[t]<90?ae[t]:90,"%"))):s.a.createElement(s.a.Fragment,null))})))):s.a.createElement(s.a.Fragment,null)):s.a.createElement(s.a.Fragment,null),pe&&s.a.createElement(G.a,{style:{marginBottom:15,backgroundColor:"#f0f0f0",padding:7}},s.a.createElement("div",{style:{position:"absolute",right:"20px"}},s.a.createElement(L.a,{title:Object(E.w)("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){fe(null),be(!1)}})),pe.img&&s.a.createElement(H.a,{xs:12,sm:6,md:4,lg:3,xl:2},s.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(pe.img?pe.img:R.a),alt:pe.title||pe.link})),s.a.createElement(H.a,{xs:12,sm:6,md:8,lg:9,xl:10},s.a.createElement("div",{style:{fontSize:"14px",color:Object(E.d)("menu"),fontWeight:"bold"}},pe.title),pe.site&&s.a.createElement("div",{style:{fontSize:"12px"}},pe.site),pe.contentSnippet&&s.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},pe.contentSnippet),s.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:pe.link,target:"_blank",rel:"noopener noreferrer"},Object(E.w)("$__openLink","*")))),le?s.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},s.a.createElement(L.a,{title:Object(E.w)("$__fileSendErrorClickToReSend",1),text:Object(E.w)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Re({comment:le.options.comment},le.fi,ee),se(null)},size:"25px"})):O?s.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},Object(E.w)("$__sending",1),s.a.createElement(T.a,{className:Ie.progressBar})):s.a.createElement("div",{ref:De,style:{position:"relative",height:"auto",borderRadius:"7px",display:"flex",alignItems:"center",padding:"3px 0px 4px 0px"}},s.a.createElement(d.b,{id:"sendingInput_".concat(e.nodeId),value:b.trim().length>0?b:"",inputRef:$e,onChange:function(e){He(e.target.value),De.current&&De.current.clientHeight&&Ce(De.current.clientHeight)},onBlur:function(t){t.target.value&&e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts[e.nodeId]||{}),{},{message:t.target.value})))}))},onPaste:function(e){Ge(e.clipboardData.files)},placeholder:Object(E.w)("$__writeMessage"),style:Object(o.a)(Object(o.a)({},F),{},{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():b.length>0&&b.trim()&&b.trim().length>0?Be():v(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},s.a.createElement(d.a,{trigger:"@",data:We,renderSuggestion:function(t,n,a){var o=r.users[t.id]?r.users[t.id]:t;if(t&&t.id)return s.a.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},s.a.createElement(I.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}),s.a.createElement("div",null,s.a.createElement("div",null,a),o&&o._parent&&x.a.getState().db.users[o._parent]&&x.a.getState().db.users[o._parent].name?s.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},x.a.getState().db.users[o._parent].name):s.a.createElement(s.a.Fragment,null)),o&&o._parent&&x.a.getState().db.users[o._parent]&&x.a.getState().db.users[o._parent].image?s.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(x.a.getState().db.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):s.a.createElement(s.a.Fragment,null))},style:{backgroundColor:Object(E.d)("color",.5),lineHeight:"17px",borderRadius:"7px",padding:"3px 2px",marginLeft:"-4px",fontWeight:"bold",maxHeight:250,overflow:"auto"}})),s.a.createElement("div",{style:{cursor:"pointer",zIndex:100,display:"flex",alignItems:"center"}},s.a.createElement(S,{title:Object(E.w)("$__emojis",1),icon:je?"highlight_off":"sentiment_very_satisfied",color:Object(E.d)("medium"),onClick:function(){Ee(!je)}}),!O&&s.a.createElement("div",{className:Ie.actionButton},s.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 Ge(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"}),s.a.createElement(w.a,{icon:"attachment",color:Object(E.d)("medium"),size:"22px"})),!O&&(b.trim().length>0||X.length>0)&&s.a.createElement(S,{title:Object(E.w)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(E.d)("menu"),onClick:function(){return Be()}}),e.closeOption&&s.a.createElement(w.a,{title:Object(E.w)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(E.d)("color"),onClick:function(){return e.onClose()}}),je&&s.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},s.a.createElement(h.a,{onEmojiClick:function(e,t){v("".concat(b," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):s.a.createElement("div",{className:e.relative?Ie.editorRelative:Ie.editor,style:{backgroundColor:"#f0f0f0"}},Object(E.w)("$__avaiableForViewingOnly")),s.a.createElement("div",{className:A?Ie.onDropFile:Ie.dropFile,onDragLeave:function(){!e.disabledSend&&Y(!1)}},Object(E.w)("$__dropTheFileToAttach","*"))))}))},735:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(15),d=r(3),p=r(13),f=r(14),h=r(101),m=r(352),g=r(457),b=r(11),v=r(565),y=r(69),x=r(165),w=r(2038),_=r(7),O=r(1),j={root:Object(n.a)({},_.k),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:Object(O.d)("color"),display:"flex",alignItems:"center"}},E=Object(x.a)(j);var k=Object(f.b)(null,(function(e){return Object(p.b)(u,e)}))((function(e){var t=d.a.getState().db,r=E(),n=c.a.useState([]),a=Object(o.a)(n,2),i=a[0],l=a[1];c.a.useEffect((function(){var r=[];e.data&&e.data.length>0&&e.data.forEach((function(e){r.push(t.cards[e])})),l(r)}),[e.data]);var s="guidelineD"===e.type||"guidelineR"===e.type?i.filter((function(e){return e&&"strength"===e.type})):i.filter((function(e){return e&&"weakness"===e.type})),u="guidelineD"===e.type||"guidelineE"===e.type?i.filter((function(e){return e&&"threat"===e.type})):i.filter((function(e){return e&&"opportunity"===e.type})),p="guidelineD"===e.type||"guidelineR"===e.type?"strength":"weakness",f="guidelineD"===e.type||"guidelineE"===e.type?"threat":"opportunity",h="guidelineD"===e.type||"guidelineR"===e.type?"forces":"weaknesses",m="guidelineD"===e.type||"guidelineE"===e.type?"threats":"opportunities";return c.a.createElement("div",{className:r.root},c.a.createElement("div",{className:r.aspectsTitle},c.a.createElement(b.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(O.d)("color"),title:Object(O.w)(p,1)}),c.a.createElement("span",{style:{marginLeft:"5px"}},Object(O.w)("$__internalAspects",1)," - ",Object(O.w)("$__".concat(h),1))),s&&s.length>0&&s.sort((function(e,t){return e.name-t.name})).map((function(e,t){return c.a.createElement(w.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})),c.a.createElement("div",{className:r.aspectsTitle},c.a.createElement(b.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(O.d)("color"),title:Object(O.w)(f,1)}),c.a.createElement("span",{style:{marginLeft:"5px"}},Object(O.w)("$__externalAspects",1)," - ",Object(O.w)("$__".concat(m),1))),u&&u.length>0&&u.sort((function(e,t){return e.name-t.name})).map((function(e,t){return c.a.createElement(w.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),S=r(135),L=r(34),C=r(345),I=r(152),T=r.n(I),D=r(883),F=r.n(D),N=r(159),A=r.n(N),P=r(176),$=r(65),M=r(78);function B(){B=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=Object(f.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(p.b)(u,e)}))(Object(L.a)(C.a)((function(e){var t=e.classes,r=d.a.getState(),i=r.db,l=r.session,u=c.a.useState(null),p=Object(o.a)(u,2),f=p[0],x=p[1],w=c.a.useState(!0),_=Object(o.a)(w,2),j=_[0],E=_[1],L=c.a.useState(!1),C=Object(o.a)(L,2),I=C[0],D=C[1],N=c.a.useRef(!0),z=c.a.createRef();c.a.useEffect((function(){return function(){N.current=!1}}),[]);var Y=d.a.getState().db.cards[e.cardId||e.data._id]||{},R=window.location.hash.split("/");R[0]=R[0].replace("#",""),c.a.useEffect((function(){N.current&&(Y._parent&&(!R[0]||R[0]&&36!==R[0].length)?G():D(!1))}),[]);var G=function(){var t=Object(a.a)(B().mark((function t(){var r;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(!Y._loadTimeline||Y._loadTimeline&&!Y._loadTimeline.kpi)&&Y.kpi_type&&"task"!==Y.kpiType&&"timer"!==Y.kpiType&&"time"!==Y.kpiType&&Object(M.f)(Object(n.a)(Object(n.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[Y._id],db:"cards",type:"kpi"}),r=function(){var t=Object(a.a)(B().mark((function t(a){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.cards[a]){t.next=8;break}return N.current&&D(!0),t.next=4,Object($.b)(Object(n.a)(Object(n.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:t.sent&&N.current&&D(!1),t.next=9;break;case 8:i.cards[a]&&i.cards[a]._parent?r(i.cards[a]._parent)&&N.current&&D(!1):D(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(a.a)(B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(Y._parent);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),e.onResize&&e.onResize();case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(I)return c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},c.a.createElement("span",{style:{color:Object(O.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(O.w)("$__loadingData")),c.a.createElement(y.a,null));if(!Y&&!Y._id)return null;var H=!1,W=c.a.createElement(c.a.Fragment,null);if(Y&&Y.url&&(Y.url.indexOf(".youtube.com/watch?")>-1||Y.url.indexOf("youtu.be")>-1)){var U=Y.url.indexOf(".youtube.com/watch?")>-1?Y.url.split("?")[1].split("v=")[1].split("&")[0]:Y.url.split(".be/")[1];U&&(W=c.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(U),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),H=!0)}if(Y&&Y.url&&Y.url.indexOf("https://vimeo.com")>-1){var q=Y.url.replace("https://","").split("/")[1];q&&(W=c.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(q),title:"Vimeo video player",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0}),H=!0)}return c.a.createElement("div",{ref:z},c.a.createElement("div",null,c.a.createElement("div",Object.assign({},e.provided&&e.provided.dragHandleProps,{style:{display:"none"}})),c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:t.infos,onClick:function(t){e.onClick&&e.onClick()}},c.a.createElement("div",{style:{position:"relative",display:"flex"}},H||Y.image&&(Y.image||e.Avatar||Y.image||e.Avatar)&&!l.cards.hide.image?c.a.createElement("div",{className:t.imagePreview,style:f?{backgroundImage:'url("'.concat(f||T.a,'")')}:{background:Object(O.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},H?W:Y.image&&!f?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===Y.type||"link"===Y.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===Y.type||"link"===Y.type?c.a.createElement(b.a,{icon:A.a,size:"39px",color:"rgba(250,250,250,0.77)"}):c.a.createElement("img",{alt:"MACHEN_IMAGE",src:F.a,style:{width:"25%"}}),c.a.createElement("div",{style:{clear:"both"}})),!j&&c.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},c.a.createElement(P.a,null),c.a.createElement("div",{style:{clear:"both"}}))):c.a.createElement(c.a.Fragment,null),!H&&(!f||e.Avatar||Y.image!==f)&&c.a.createElement(c.a.Fragment,null,c.a.createElement("img",{alt:"MACHEN_IMAGE",className:t.image,src:"".concat(Y.image?Y.image:T.a),onError:function(e){Y.image?x(null):E(!0)},onLoad:function(t){x("".concat(e.Avatar&&!Y.image?T.a:Y.image))},width:"100%"})),c.a.createElement("div",{style:{clear:"both"}})):e.Avatar&&!l.cards.hide.image&&c.a.createElement("div",{className:i.viewList?t.imagePreviewList:t.imagePreview,style:{background:Object(O.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},c.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},"insight"===Y.type||"link"===Y.type?c.a.createElement(b.a,{icon:A.a,size:"39px",color:"rgba(250,250,250,0.77)"}):c.a.createElement("img",{alt:"MACHEN_IMAGE",src:F.a,style:{width:"25%"}}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),Y.image?c.a.createElement("div",{style:{position:"absolute",bottom:0,right:0,padding:"2px 7px",backgroundColor:"rgba(0,0,0,0.7)",color:"#FFFFFF",borderRadius:"10px 0px 0px 0px",fontSize:10}},"# ",Y._cardCode):c.a.createElement(c.a.Fragment,null),Object.keys(d.a.getState().db.cards).filter((function(e){return d.a.getState().db.cards[e]&&"step"===d.a.getState().db.cards[e].type&&d.a.getState().db.cards[e]._parent===Y._id})).length>0&&c.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,padding:"2px 7px",backgroundColor:"rgba(0,0,0,0.7)",color:"#FFFFFF",borderRadius:"0px 10px 0px 0px",fontSize:10,display:"flex",alignItems:"center"},onClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(n.a)(Object(n.a)({},d.a.getState().control),{},{board:Y._id})),t.preventDefault(),t.stopPropagation()}},c.a.createElement(b.a,{size:"10px",color:"#FFFFFF",icon:"open_in_new"}),Object(O.w)("$__openTaskList"))),"swot"!==i.dataType.filter((function(e){return e.name===Y.type}))[0].module&&(Y._parent&&Y._parent!==Y._id||Y._planId&&Y._planId!==Y._id)&&c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},i.cards[Y._parent]?c.a.createElement(g.a,{id:Y._parent&&d.a.getState().db.cards[Y._parent]?Y._parent:Y._planId&&d.a.getState().db.cards[Y._planId]?Y._planId:null,loading:I,showLegend:!e.Resume}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:!i.viewList||e.ignoreList?{}:{position:"relative",float:"left",width:"100%"}},Y.type.indexOf("guideline")>-1&&(Y._aspects&&Y._aspects.length>0||Y._aspects&&Y._aspects.length>0)?c.a.createElement(k,{data:Y._aspects,type:Y.type}):c.a.createElement(c.a.Fragment,null),e.searchText||!Y.description&&"plan"!==Y.type?c.a.createElement(c.a.Fragment,null):c.a.createElement(S.a,{title:Y.description||""},e.Resume?c.a.createElement("div",{className:t.description,style:Object(n.a)({display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",height:90},Y.description?{}:{color:"lightgray"})},Y.description?"".concat(Y.description):"plan"===Y.type?Object(O.w)("$__planDescriptionCardPlaceholder"):c.a.createElement(c.a.Fragment,null)):c.a.createElement("div",{className:t.description,style:{wordBreak:"break-word",height:90,display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis"},dangerouslySetInnerHTML:{__html:Y.description?Object(O.p)(Y.description):""}})),Y.kpi_type&&!l.cards.hide.kpi&&c.a.createElement(v.a,{data:Y,chartShow:!l.cards.hide.kpiChart,onResize:function(){}}),("link"===Y.type||"insight"===Y.type)&&c.a.createElement("div",{className:t.dates},c.a.createElement("div",{className:t.dateInfo},c.a.createElement(h.a,{overlap:"rectangular",className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),s()(1e3*Y.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"))),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))),"plan"!==Y.type&&Object.keys(d.a.getState().db.cards).filter((function(e){return d.a.getState().db.cards[e]&&d.a.getState().db.cards[e].checklist&&d.a.getState().db.cards[e]._parent===Y._id})).length>0&&0===Object.keys(d.a.getState().db.cards).filter((function(e){return d.a.getState().db.cards[e]&&"step"===d.a.getState().db.cards[e].type&&d.a.getState().db.cards[e]._parent===Y._id})).length&&c.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},c.a.createElement("div",{style:{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",fontSize:"16px",borderTopLeftRadius:7,borderTopRightRadius:7}},Object(O.w)("$__list",1)),c.a.createElement(m.a,{nodeId:Y._id,db:"cards",noDelete:!0,showProgress:!0}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))})))},737:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(10),i=r(5),c=r(0),l=r.n(c),s=r(81),u=(r(73),r(20)),d=r(58),p=r(231),f=r(240),h=r(50),m=r(46),g=r(121),b=r(14),v=r(13),y=r(15),x=r(3),w=(r(1118),r(1)),_=r(24);function O(e){var t=e.draggableStyle,r=e.virtualStyle,n=e.isDragging,o=Object(a.a)(Object(a.a)({},r),t);return Object(a.a)(Object(a.a)({},o),{},{height:n?o.height:o.height-8,left:n?o.left:o.left+8,width:n?t.width:"calc(".concat(o.width," - ").concat(16,"px)"),marginBottom:8})}var j=function(e){var t=e.provided,r=e.item,n=e.style,a=e.isDragging;return l.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:O({draggableStyle:t.draggableProps.style,virtualStyle:n,isDragging:a}),className:"item ".concat(a?"is-dragging":""),ref:t.innerRef}),l.a.createElement(h.a,{data:r,db:"cards",isDragging:a,manualExpanded:e.manualExpanded||!1,onResize:function(t,r){e.onResize&&e.onResize(t)},onExpand:function(t){e.onExpand&&e.onExpand(t)}}))},E=l.a.memo((function(e){var t=e.index,r=e.column,o=e.discount,i=Object(c.useRef)(),u=Object(c.useRef)({}),d=Object(c.useRef)({});Object(c.useLayoutEffect)((function(){var e=i.current;e&&e.scrollTo(0)}),[t]);var h=function(t){var r=t.data,o=t.index,c=t.style,p=r[o];return p?l.a.createElement(s.b,{draggableId:p._id,index:o,key:p._id},(function(t){return l.a.createElement(j,{provided:t,item:p,style:c,manualExpanded:e.cardsExpanded||(null===d||void 0===d?void 0:d.current[p._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),u.current=Object(a.a)(Object(a.a)({},u.current),{},Object(n.a)({},e,t))}(p._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),d.current=Object(a.a)(Object(a.a)({},d.current),{},Object(n.a)({},e,t)))}(p._id,e)}})})):null},m=r.items;return l.a.createElement(s.c,{droppableId:r.id,mode:"virtual",renderClone:function(t,r,n){var a=m[n.source.index];return l.a.createElement(j,{provided:t,isDragging:r.isDragging,item:a,manualExpanded:e.cardsExpanded||(null===d||void 0===d?void 0:d.current[a._id])||!1,snapshot:r})}},(function(t,r){var n=r.isUsingPlaceholder?m.length+1:m.length;return l.a.createElement(p.a,{style:{width:"100%",height:"calc(100% - ".concat(o+47,"px)"),overflowY:"auto",position:"relative"}},(function(r){var o=r.height;r.width;return l.a.createElement(f.b,{width:279,height:o,itemCount:n,itemSize:function(e){var t,r;return r=(null===(t=m[e])||void 0===t?void 0:t._id)||null,u.current[r]+7||67},itemData:m,className:"task-list",ref:i,style:Object(a.a)(Object(a.a)({},e.style?e.style:{}),{},{height:"100%"}),outerRef:t.innerRef},h)}))}))})),k=l.a.memo((function(e){var t=e.column,r=e.index,n=x.a.getState(),o=(n.session,n.db),c=l.a.useState(!1),u=Object(i.a)(c,2),p=u[0],f=u[1],h=Object(w.j)(),b=Object(_.t)(t.id),v=!!(h.plan&&h.planAdmin||parseInt(b)>4),y=x.a.getState().db.cards[t.id],O=l.a.useRef();l.a.useEffect((function(){var e=new ResizeObserver((function(){f(O.current.clientHeight)}));return e.observe(O.current),function(){return e.disconnect()}}),[O]);var j=0;y.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})).forEach((function(e){j+=parseFloat(e.value)}));var k="R$";return y._planId&&o.cards[y._planId]&&o.cards[y._planId].default_currency&&(k=o.currency.filter((function(e){return String(e.value)===String(o.cards[y._planId].default_currency)}))[0].symbol),l.a.createElement(s.b,{draggableId:t.id,index:r},(function(n){return l.a.createElement("div",Object.assign({className:"column"},n.draggableProps,{ref:n.innerRef}),l.a.createElement("div",Object.assign({ref:O},n.dragHandleProps),l.a.createElement(d.a,{title:"".concat(t.name," (").concat(t.items.length,")"),icon:t.icon||null,color:Object(w.d)("menu"),style:{padding:"7px",width:"100%"},placeholder:Object(w.w)("$__columnName"),customButtons:v?[{name:Object(w.w)("$__columnSettings",1),icon:"more_vert",color:Object(w.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},x.a.getState().sideModule),{},{db:"cards",id:t.id,module:"columnEdit",activeModule:"columnEdit",data:x.a.getState().db.cards[t.id]}))},show:"hover",style:{right:"3px",position:"absolute",backgroundColor:"#e1e1e1"}}]:[]}),y&&y.description?l.a.createElement(g.a,{arrow:!0,title:l.a.createElement(l.a.Fragment,null,y.description)},l.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10,padding:"0px 15px",maxHeight:68,textOverflow:"ellipsis",overflow:"hidden",paddingBottom:15}},y.description.substr(0,133),"...")):l.a.createElement(l.a.Fragment,null),y.showSumValues&&j>0?l.a.createElement("div",{style:{position:"relative",width:"100%",color:"black",fontWeight:"bold",fontSize:12,padding:"0px 15px",paddingBottom:15}},k," ",j):l.a.createElement(l.a.Fragment,null),l.a.createElement("div",{style:{clear:"both"}})),l.a.createElement(E,Object.assign({column:t,index:r},e,{discount:p||0})),l.a.createElement("div",{id:"AgileKanbanColumn_304",style:{position:"relative",float:"left",width:"100%",padding:"15px 7px"}},l.a.createElement(m.a,{text:Object(w.w)("$__add","*"),icon:"add_box",iconColor:Object(w.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(a.a)(Object(a.a)({},x.a.getState().control),{},{addCard:{_parent:t.id,rows:t.items.length}}))}})))}))})),S=Object(b.b)((function(e,t){return{cards:e.db.cards,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(v.b)(y,e)}))(k),L=r(179),C=r(182);function I(){I=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var _=v.prototype=g.prototype=Object.create(y);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(_,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},O(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),L(r),m}},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;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function T(e,t,r){var n=Array.from(e),a=n.splice(t,1),o=Object(i.a)(a,1)[0];return n.splice(r,0,o),n}t.a=Object(b.b)((function(e,t){return{cards:e.db.cards,cardsExpanded:e.db.cardsExpanded,searchs:e.searchs}}),(function(e){return Object(v.b)(y,e)}))((function(e){var t=e.searchs&&e.searchs[e.nodeId]?e.searchs[e.nodeId]:null,r=Object(c.useState)(Object(C.d)(e.nodeId,{deleted:!1},e.cards,t)),p=Object(i.a)(r,2),f=p[0],h=p[1],m=x.a.getState().db,g=Object(c.useState)("order"),b=Object(i.a)(g,1)[0],v=Object(c.useState)(!1),y=Object(i.a)(v,1)[0],O=Object(c.useState)(!1),j=Object(i.a)(O,2),E=j[0],k=j[1],D=Object(w.j)(),F=Object(_.t)(e.nodeId),N=l.a.useRef({lock:!1,updateCards:!1});function A(){return(A=Object(o.a)(I().mark((function t(r){var o,i,c,l,s,u,d,p,h,m,g,b,v,y,w;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(N.current=Object(a.a)(Object(a.a)({},N.current),{},{lock:!1}),r.destination){t.next=3;break}return t.abrupt("return");case 3:if("column"!==r.type){t.next=18;break}if(!(F<5)){t.next=6;break}return t.abrupt("return");case 6:if(i=T(f.columnOrder,r.source.index,r.destination.index),c={},i.forEach((function(e,t){c=Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},e,Object(a.a)(Object(a.a)({},x.a.getState().db.cards[e]),{},{step:"".concat(t)})))})),e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},x.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},x.a.getState().db.cards),c)})),l=x.a.getState().db.cards[i[r.source.index]],s=x.a.getState().db.cards[i[r.destination.index]],!l||!l.showInPanel&&!l.onConcludedStepMoveTo){t.next=14;break}return t.abrupt("return");case 14:if(!s||!s.showInPanel&&!s.onConcludedStepMoveTo){t.next=16;break}return t.abrupt("return");case 16:return JSON.stringify(i)!==JSON.stringify(f.columnOrder)&&Object(C.f)(i,"step"),t.abrupt("return");case 18:if(u=f.columns[r.source.droppableId],d=u.items[r.source.index],p=x.a.getState().db.cards[r.destination.droppableId],h=x.a.getState().db.cards[u.items[r.source.index]._id],m=x.a.getState(),g=m.session,!(parseInt(p.step)>=parseInt(x.a.getState().db.cards[r.source.droppableId].step)&&h._requireApproval&&h._users&&h._users[g._id])||h._users[g._id].approvalResponsible){t.next=25;break}return t.abrupt("return");case 25:if(r.source.droppableId!==r.destination.droppableId){t.next=33;break}return b=Array.from(T(f.columns[r.source.droppableId].items,r.source.index,r.destination.index)),v={},y=[],b.forEach((function(e,t){v=Object(a.a)(Object(a.a)({},v),{},Object(n.a)({},e._id,Object(a.a)(Object(a.a)({},x.a.getState().db.cards[e._id]),{},{order:"".concat(t)}))),-1===y.indexOf(e._id)&&y.push(e._id)})),e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},x.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},x.a.getState().db.cards),v)})),Object(C.f)(y,"order"),t.abrupt("return");case 33:if(!(parseInt(p.step)>parseInt(x.a.getState().db.cards[r.source.droppableId].step)&&h._requireApproval&&h._users&&h._users[g._id])||h._users[g._id].approvalResponsible){t.next=35;break}return t.abrupt("return");case 35:w=Object(C.c)(e,(null===h||void 0===h?void 0:h._id)||null,(null===p||void 0===p?void 0:p._id)||null,(null===h||void 0===h||null===(o=h._createdBy)||void 0===o?void 0:o._id)||null),p.requireApproval?w=Object(a.a)(Object(a.a)({},w),{},{_requireApproval:!0}):!p.requireApproval&&d._requireApproval&&(w=Object(a.a)(Object(a.a)({},w),{},{_requireApproval:null})),e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},x.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},x.a.getState().db.cards),{},Object(n.a)({},d._id,Object(a.a)(Object(a.a)(Object(a.a)({},x.a.getState().db.cards[d._id]),w),{},{_parent:r.destination.droppableId})))}));case 38:case"end":return t.stop()}}),t)})))).apply(this,arguments)}l.a.useEffect((function(){N.current.lock||h(Object(C.d)(e.nodeId,{deleted:y,orderBy:b},e.cards,t))}),[e.cards,e.nodeId,e.searchs]);var P=function(){var t=Object(o.a)(I().mark((function t(r){var n;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(C.b)(r);case 2:(n=t.sent)&&e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},x.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},x.a.getState().db.cards),n)}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),$=[];return $=e.nodeId&&m.cards[e.nodeId]&&"plan"===m.cards[e.nodeId].type&&m.cards[e.nodeId].refs?["text","ref1","ref2","date","tags","status","priority","impact","risk","complexity","users"]:["text","date","tags","status","priority","impact","risk","complexity","users"],l.a.createElement(s.a,{onBeforeDragStart:function(e){N.current=Object(a.a)(Object(a.a)({},N.current),{},{lock:!0})},onDragEnd:function(e){return A.apply(this,arguments)}},l.a.createElement("div",{className:"app",style:{overflowY:"auto",height:"-webkit-fill-available",paddingTop:50}},l.a.createElement(s.c,{droppableId:"all-droppables",direction:"horizontal",type:"column"},(function(t){return l.a.createElement("div",Object.assign({},t.droppableProps,{className:"columns",ref:t.innerRef}),f.columnOrder.map((function(t,r){return l.a.createElement(S,Object.assign({},e,{key:t,column:f.columns[t],index:r,nodeId:e.nodeId},e.columProps?e.columProps:{}))})),D.admin&&D.planAdmin||F>3?l.a.createElement("div",{className:"column",style:{display:"flex",justifyContent:"center"}},E?l.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFFFFF",width:279,padding:7}},l.a.createElement("div",{id:"AgileKanbanIndex_282"},l.a.createElement(d.a,{style:{width:"100%"},title:null,color:Object(w.d)("menu"),editable:!0,permitIcon:!0,onEdit:function(t){k(!1),P(Object(a.a)(Object(a.a)({},t),{},{_parent:e.nodeId,type:"step",step:String(f.columnOrder.length),checklist:!0}))},placeholder:Object(w.w)("$__columnName"),onCancel:function(){k(!1)}}))):l.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFFFFF",color:"black",padding:15,width:279}},l.a.createElement("div",{id:"AgileKanbanIndex_256"},l.a.createElement(u.a,{title:Object(w.w)("$__addColumn"),text:Object(w.w)("$__addColumn"),color:"lightgrey",textColor:"lightgrey",icon:"add_box",onClick:function(){k(!0)},size:"25px"})))):l.a.createElement(l.a.Fragment,null),t.placeholder)}))),l.a.createElement("div",{style:{position:"absolute",top:15,left:15,height:"50px",width:"50px"}},l.a.createElement(L.a,{nodeId:e.nodeId,fields:$,showFilters:!0})))}))},739:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(14),l=r(13),s=r(15),u=r(20),d=r(8),p=r(6),f=r.n(p),h=r(232),m=r(3),g=r(238),b=r(155),v=r(11),y=r(144),x=r(59),w=r(25),_=r(301),O=r(1932),j=r(1921),E=r(1920),k=r(1922),S=r(1241),L=r(570),C=r(135),I=r(165),T=r(469),D=(r(514),r(1)),F=Object(I.a)(T.a);var N=JSON.stringify({priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}}),A=function(e){var t,r=e.field,o=F(),c=m.a.getState().db,l=i.a.useState(Object(n.a)({},JSON.parse(N))),s=Object(a.a)(l,2),u=s[0],p=s[1],I=i.a.useState(null),T=Object(a.a)(I,2),A=T[0],P=T[1],$=e.indicators?e.indicators:JSON.parse(N);i.a.useEffect((function(){e.indicators&&p(e.indicators)}),[e.indicators]),i.a.useEffect((function(){var t;if(e.onChange&&JSON.stringify(e.indicators)!==JSON.stringify(u)){var r={};Object.keys(u).forEach((function(e){$[e]||(r=Object(n.a)(Object(n.a)(Object(n.a)({},$),r),{},Object(d.a)({},e,u[e]))),$[e]&&JSON.stringify($[e])!==JSON.stringify(u[e])&&(r=Object(n.a)(Object(n.a)(Object(n.a)({},$),r),{},Object(d.a)({},e,u[e])))})),JSON.stringify(r)!==JSON.stringify({})&&e.onChange(r)}null===e||void 0===e||null===(t=e.preffers)||void 0===t||t.searchButton}),[u]);var M=function(t,r){var a,o,i=u[t]||{};"all"===r?Object.keys(i).forEach((function(e){i[e]=!0})):(i.all&&Object.keys(i).forEach((function(e){i[e]=!1})),i.all=!1),(null===e||void 0===e||null===(a=e.preffers)||void 0===a||null===(o=a.unique)||void 0===o?void 0:o.status)&&Object.keys(i).forEach((function(e){i[e]=!1})),p(Object(n.a)(Object(n.a)({},u),{},Object(d.a)({},t,Object(n.a)(Object(n.a)({},i),{},Object(d.a)({},r,"all"===r||!i[r])))))},B=function(t){var r;return i.a.createElement(O.a,{style:{width:"100%"},expanded:A===t,onChange:function(){P(A===t?null:t)}},i.a.createElement(E.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(v.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:Object(D.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},Object(D.w)("$__".concat(t))),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(u[t]).filter((function(e,r){return u[t][e]&&"all"!==e})).map((function(e,t){return i.a.createElement(C.a,{title:Object(D.w)(c.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:c.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(j.a,{style:{minWidth:"100%"}},i.a.createElement(S.a,{style:{width:"100%"}},(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.unique[t])?i.a.createElement(i.a.Fragment,null):i.a.createElement(k.a,{style:{minWidth:"100%"},control:i.a.createElement(b.a,{checked:!(!u[t]||!u[t].all),onChange:function(){M("priority","all")},color:"default"}),label:Object(D.w)("$__allPriorities")}),c.priority.map((function(e,r){return i.a.createElement(i.a.Fragment,{key:r},i.a.createElement(k.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:i.a.createElement(b.a,{indeterminate:!(!u[t]||!u[t].all),checked:!(!u[t]||!u[t][e.value]),onChange:function(){M(t,e.value)},color:"default"}),label:Object(D.w)(e.label)}))})))))};return"admin"===r?i.a.createElement(x.a,{checked:!!u.admin,onChange:function(e){p(Object(n.a)(Object(n.a)({},u),{},{admin:!u.admin}))},name:"adminView",inputProps:{"aria-label":"secondary checkbox"}}):"tagsByText"===r?i.a.createElement("div",{className:o.textField,style:{width:"100%"}},i.a.createElement(w.a,{className:o.noLabelLight,label:Object(D.w)("$__searchTags","*"),value:u.tagsByText||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:i.a.createElement(L.a,{position:"start"},i.a.createElement(v.a,{color:Object(D.d)("color")},"search")),onChange:function(e){p(Object(n.a)(Object(n.a)({},u),{},{tagsByText:e.target.value}))}}})):"text"===r?i.a.createElement("div",{className:o.textField,style:{width:"100%"}},i.a.createElement(w.a,{className:o.noLabelLight,label:Object(D.w)("$__search","*"),autoFocus:!0,value:u.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:i.a.createElement(L.a,{position:"start"},i.a.createElement(v.a,{color:Object(D.d)("color")},"search")),onChange:function(e){p(Object(n.a)(Object(n.a)({},u),{},{text:e.target.value}))},onKeyDown:function(e){}}})):"date"===r?i.a.createElement(i.a.Fragment,null,i.a.createElement(h.a,{type:"datetime",onChangeStartDate:function(t){var r,a={startDate:f()(t).unix("x")};(!(null===(r=m.a.getState().searchs[e.nodeId])||void 0===r?void 0:r.endDate)||m.a.getState().searchs[e.nodeId].endDate<f()(t).unix("x"))&&(a=Object(n.a)(Object(n.a)({},a),{},{endDate:f()("".concat(f()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),p(Object(n.a)(Object(n.a)({},u),a))},onChangeEndDate:function(e){p(Object(n.a)(Object(n.a)({},u),{},{endDate:f()(e).unix("x")}))},range:!0,horizontal:!0,startDate:(null===u||void 0===u?void 0:u.startDate)?new Date(1e3*u.startDate):null,endDate:(null===u||void 0===u?void 0:u.endDate)?new Date(1e3*u.endDate):null,onClear:function(){p(Object(n.a)(Object(n.a)({},u),{},{startDate:null,endDate:null}))}})):"tags"===r?i.a.createElement(g.a,{dbNode:"tag",options:m.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:(null===u||void 0===u?void 0:u.tags)||[],placeholder:Object(D.w)("$__tags"),onChange:function(e){p(Object(n.a)(Object(n.a)({},u),{},{tags:e}))}}):"status"===r?i.a.createElement(O.a,{style:{width:"100%",padding:0},expanded:"status"===A,onChange:function(){P("status"===A?null:"status")}},i.a.createElement(E.a,{style:{minWidth:"100%"},expandIcon:i.a.createElement(v.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},i.a.createElement("div",{style:{color:Object(D.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},i.a.createElement("div",{style:{position:"relative",float:"left"}},Object(D.w)("$__status")),i.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},(null===u||void 0===u?void 0:u.status)&&Object.keys(u.status).filter((function(e,t){return(u.status[e]||u.status.all)&&"all"!==e})).map((function(e,t){return i.a.createElement(C.a,{title:Object(D.w)(c.status.filter((function(t){return t.value===e}))[0].label,1),key:t},i.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:c.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))),i.a.createElement(j.a,{style:{minWidth:"100%"}},i.a.createElement(S.a,{style:{width:"100%"}},c.status.map((function(e,t){return i.a.createElement(i.a.Fragment,{key:t},i.a.createElement(k.a,{style:{minWidth:"100%"},control:i.a.createElement(b.a,{indeterminate:!(!u.status||!u.status.all),checked:!(!u.status||!u.status[e.value]),onChange:function(){M("status",e.value)},color:"default"}),label:Object(D.w)(e.label)}))}))))):"priority"===r?B("priority"):"complexity"===r?B("complexity"):"risk"===r?B("risk"):"impact"===r?B("impact"):"users"===r?i.a.createElement("div",{style:{marginTop:5}},i.a.createElement(y.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:null,noLimit:!0,multiple:!0,onSelect:function(e){p(Object(n.a)(Object(n.a)({},u),{},{users:e}))},selected:(null===u||void 0===u?void 0:u.users)||[],transparent:!0})):"responsible"===r?i.a.createElement("div",{style:{marginTop:5}},i.a.createElement(y.a,Object.assign({text:Object(D.w)("$__FilterByResponsible"),includeMe:!0,avatarSize:"23px",permission:!0,data:m.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!1,onSelect:function(e){p(Object(n.a)(Object(n.a)({},u),{},{responsible:e}))},selected:(null===u||void 0===u?void 0:u.responsible)||[],transparent:!0},(null===e||void 0===e||null===(t=e.fieldsProps)||void 0===t?void 0:t.responsible)||{}))):"userGroups"===r?i.a.createElement(_.a,{data:{values:u.userGroups||[]},options:m.a.getState().db.userGroup?m.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",colorPickerCallBack:function(e){},noAdd:!0}):i.a.createElement(i.a.Fragment,null)};var P=JSON.stringify({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},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}});t.a=Object(c.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(l.b)(s,e)}))((function(e){var t,r,o=i.a.useState(!1),c=Object(a.a)(o,2),l=c[0],s=c[1],d=i.a.useState(Object(n.a)({},e.indicators)),p=Object(a.a)(d,2),f=p[0],h=p[1],m=i.a.useRef(!0);return i.a.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]),i.a.useEffect((function(){e.onChange&&e.onChange(Object(n.a)({},f||{}))}),[f]),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},null===(t=e.fields)||void 0===t?void 0:t.map((function(t,r){return i.a.createElement("div",{key:"".concat(t,"_").concat(r),style:{position:"relative"}},i.a.createElement(A,{field:t,indicators:f,onChange:e.onChange?function(e){m.current&&h(e)}:null}))})),JSON.stringify(f)!==P?i.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){s(!l)}}):i.a.createElement(i.a.Fragment,null),(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.searchButton)?i.a.createElement(u.a,{color:Object(D.d)("menu"),icon:"search",onClick:function(){e.onSearch&&e.onSearch()},size:"15px",title:"".concat(Object(D.w)("$__search")),text:"".concat(Object(D.w)("$__search"))}):i.a.createElement(i.a.Fragment,null)))}))},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var n=r(8),a=r(61),o=r(0),i=r.n(o),c=r(100),l=r.n(c),s=r(165),u=r(7),d={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(u.q)(u.I)+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},p=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],f=Object(s.a)(d);function h(e){var t,r=f(),o=e.className,c=e.children,s=e.background,u=e.plain,d=e.formHorizontal,h=e.pricing,m=e.signup,g=e.color,b=e.profile,v=e.calendar,y=Object(a.a)(e,p),x=l()((t={},Object(n.a)(t,r.cardBody,!0),Object(n.a)(t,r.cardBodyBackground,s),Object(n.a)(t,r.cardBodyPlain,u),Object(n.a)(t,r.cardBodyFormHorizontal,d),Object(n.a)(t,r.cardPricing,h),Object(n.a)(t,r.cardSignup,m),Object(n.a)(t,r.cardBodyColor,g),Object(n.a)(t,r.cardBodyProfile,b),Object(n.a)(t,r.cardBodyCalendar,v),Object(n.a)(t,o,void 0!==o),t));return i.a.createElement("div",Object.assign({className:x},y),c)}},749:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},75:function(e,t,r){"use strict";r.d(t,"m",(function(){return p})),r.d(t,"n",(function(){return f})),r.d(t,"q",(function(){return D})),r.d(t,"a",(function(){return N})),r.d(t,"d",(function(){return A})),r.d(t,"j",(function(){return C})),r.d(t,"k",(function(){return I})),r.d(t,"b",(function(){return L})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return v})),r.d(t,"g",(function(){return x})),r.d(t,"f",(function(){return _})),r.d(t,"h",(function(){return k})),r.d(t,"i",(function(){return F})),r.d(t,"l",(function(){return T})),r.d(t,"o",(function(){return h})),r.d(t,"p",(function(){return m})),r.d(t,"r",(function(){return j}));var n=r(8),a=r(2),o=r(10),i=r(3),c=r(38),l=r(55),s=r(180),u=r(24);function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var p=function(){var e=Object(o.a)(d().mark((function e(t,r){var c,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.a.post("/M_User_List_V3",{id:r});case 3:if(!(c=e.sent)||!c.data){e.next=9;break}return s={},c.data.map(function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},t.data._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},i.a.getState().db.users&&i.a.getState().db.users[t.data._id]?i.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!==i.a.getState().session.account?{_parent:t._parent}:{})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),s)})),e.abrupt("return",!0);case 9:e.next=16;break;case 11:e.prev=11,e.t0=e.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(e.t0),console.groupEnd();case 16:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,r){return e.apply(this,arguments)}}(),f=function(){var e=Object(o.a)(d().mark((function e(t,r){var c,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.a.post("/UsersList",{id:r});case 3:if(!(c=e.sent)||!c.data){e.next=9;break}return s={},c.data.map(function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},t.data._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},i.a.getState().db.users&&i.a.getState().db.users[t.data._id]?i.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!==i.a.getState().session.account?{_parent:t._parent}:{})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),s)})),e.abrupt("return",!0);case 9:e.next=16;break;case 11:e.prev=11,e.t0=e.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(e.t0),console.groupEnd();case 16:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,r){return e.apply(this,arguments)}}(),h=function(){var e=Object(o.a)(d().mark((function e(t){var r,n,c,l,u,p,f,h;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket),n=i.a.getState(),c=n.sideModule,l=c.data,u=i.a.getState().db[c.db][c.id]||{},(p=window.location.hash.split("/"))[0]=p[0].replace("#",""),"user"===l.type&&p&&p.length>2&&p[2]&&36===p[2].length&&(l.type="user",l._parent=p[2]),Object.keys(l).forEach((function(e){(l[e]&&l[e].low||l[e]&&l[e].low&&"0"===String(l[e].low))&&(l[e]=l[e].low)})),f=l.file||null,delete l.file,"new"!==l._id&&l._id){e.next=21;break}return e.prev=11,r.emit("data",{module:"user",method:"post",action:"add"},Object(a.a)(Object(a.a)({},l),{},{oldData:u}),function(){var e=Object(o.a)(d().mark((function e(n){var o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l._id=n.id,l._token={_id:n.tokenId},!f){e.next=8;break}return e.next=5,Object(s.a)(l._id,f);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=l.image;case 9:o=e.t0,l.image=o,g(t,l),r.emit("data",{module:"user",method:"put",action:"update"},Object(a.a)(Object(a.a)({},l),{},{image:o,oldData:u})),t.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},i.a.getState().sideModule),{},{id:n.id,data:Object(a.a)(Object(a.a)({},i.a.getState().sideModule.data),{},{_id:n.id})}));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 16:e.prev=16,e.t0=e.catch(11),console.log(e.t0);case 19:e.next=31;break;case 21:if(!f){e.next=27;break}return e.next=24,Object(s.a)(l._id,f);case 24:e.t1=e.sent,e.next=28;break;case 27:e.t1=l.image;case 28:return h=e.t1,(f&&h||!f)&&(g(t,l),t.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},i.a.getState().sideModule),{},{id:l._id,data:Object(a.a)(Object(a.a)({},i.a.getState().sideModule.data),{},{_id:l._id})})),r.emit("data",{module:"user",method:"put",action:"update"},Object(a.a)(Object(a.a)({},l),{},{image:h,oldData:u}))),e.abrupt("return",!0);case 31:case"end":return e.stop()}}),e,null,[[11,16]])})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(o.a)(d().mark((function e(t){var r,c,l,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket),c=i.a.getState(),l=c.sideModule,s=l.data,r.emit("data",{module:"user",method:"post",action:"access"},{_id:s._id,email:s.email,name:s.name,access:s._access,safety:s._safety},function(){var e=Object(o.a)(d().mark((function e(o){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),{},Object(n.a)({},s._id,Object(a.a)(Object(a.a)({},i.a.getState().db.users[s._id]||{}),s||{})))})),r.emit("user.ACCESS",Object(n.a)({_id:s._id},s._id,Object(a.a)({},s)));case 2: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)}}(),g=function(e,t){e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),{},Object(n.a)({},t._id,Object(a.a)(Object(a.a)({},i.a.getState().db.users[t._id]||{}),t||{})))}))},b=function(e,t){e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),{},Object(n.a)({},t._id,Object(a.a)({},t[t._id]?t[t._id]:{})))}))};function v(e){return y.apply(this,arguments)}function y(){return(y=Object(o.a)(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.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,l.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:case"end":return e.stop()}}),e,null,[[5,11]])})))).apply(this,arguments)}function x(e){return w.apply(this,arguments)}function w(){return(w=Object(o.a)(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.a.getState().db.users,1!==Object.keys(r).filter((function(e){return r[e].email===t})).length){e.next=3;break}return e.abrupt("return",{exists:!0});case 3:return e.prev=3,e.next=6,l.a.get("/M_User_Verify_MailExist/?email=".concat(t));case 6:return e.abrupt("return",{exists:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.log(e.t0),e.abrupt("return",{exists:!0});case 13:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function _(e){return O.apply(this,arguments)}function O(){return(O=Object(o.a)(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.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 j(e,t){return E.apply(this,arguments)}function E(){return(E=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.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 k(e,t){return S.apply(this,arguments)}function S(){return(S=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.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 L=function(e,t,r,n,a){var c,l=i.a.getState().db.users[t]?i.a.getState().db.users[t]:a;c=(e&&e.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket);var s=i.a.getState().db;return Object(u.c)(e,{cardId:n,userId:t,access:r,userData:{_id:t,name:l.name,image:l.image?l.image:null}}),c.emit("data",{module:"cards",method:"post",action:"access"},{cardType:s.cards[n].type,cardId:n,parentUser:s.cards[n]._parent,userId:t,access:r,userData:{_id:t,name:l.name,image:l.image?l.image:null}},function(){var e=Object(o.a)(d().mark((function e(t){return d().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},C=function(){var e=Object(o.a)(d().mark((function e(t,r,o){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.a.post("/card/groupAccess",{groupId:r,cardId:o}),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},i.a.getState().db.cards),{},Object(n.a)({},o,Object(a.a)(Object(a.a)({},i.a.getState().db.cards[o]),{},{_groups:Object(a.a)(Object(a.a)({},i.a.getState().db.cards[o]._groups||{}),{},Object(n.a)({},r,{_id:r}))})))}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),I=function(){var e=Object(o.a)(d().mark((function e(t,r,o){var l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.a.post("/card/groupAccessRemove",{groupId:r,cardId:o}),delete(l=i.a.getState().db.cards[o]._groups)[r],t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},i.a.getState().db.cards),{},Object(n.a)({},o,Object(a.a)(Object(a.a)({},i.a.getState().db.cards[o]),{},{_groups:l})))}));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),T=function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"userResponsible"},Object(a.a)({},r)),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),D=function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"userParam"},Object(a.a)({},r),function(){var e=Object(o.a)(d().mark((function e(t){return d().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 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=i.a.getState(),o=r.db,c={};if(Object.keys(o.users).filter((function(e){return!o.users[e]._parent&&o.users[e]._access&&o.users[e]._access.admin})).forEach((function(e){c=Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},e,o.users[e]))})),(!e||e&&!e.isArray)&&c){var l={};return Object.keys(c).forEach((function(e){(!t||t&&t.indexOf(c[e].type)>-1)&&(l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},e,c[e])))})),l}if(e&&e.isArray&&c){var s=[];return Object.keys(c).forEach((function(e){(!t||t&&t.indexOf(c[e].type)>-1)&&0===s.filter((function(t){return t._id===e})).length&&s.push(c[e])})),s}return{}},N=function(e){var t=i.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)},A=function(e){try{return c.a.delete("/user/unique/".concat(e)),!0}catch(t){return console.log(t),!1}}},78:function(e,t,r){"use strict";r.d(t,"h",(function(){return y})),r.d(t,"g",(function(){return O})),r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return w})),r.d(t,"d",(function(){return j})),r.d(t,"c",(function(){return _})),r.d(t,"e",(function(){return v})),r.d(t,"f",(function(){return x}));var n=r(8),a=r(2),o=r(10),i=r(6),c=r.n(i),l=r(497),s=r(73),u=r.n(s),d=r(3),p=r(55),f=r(38),h=r(65),m=r(1);function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(211).config();var b=function(){var e=Object(o.a)(g().mark((function e(t,r){var o,i,l,s,u,p;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o={},i=d.a.getState(),l=i.db,s=i.session,(d.a.getState().timeline[r.id]||d.a.getState().timeline[r.readedBy])&&(o=d.a.getState().timeline,u=r.id,p={},"cards"!==r.db?(u=o[r.readedBy]?r.readedBy:r.id,p={_id:r.readedBy,name:l.users[r.readedBy].name,image:l.users[r.readedBy].image}):l.cards[r.id]&&l.cards[r.id]._users&&l.cards[r.id]._users[r.readedBy]&&(p=l.cards[r.id]._users[r.readedBy]),o&&o[u]&&Object.keys(o[u]).filter((function(e){return!!(r&&r.type&&("all"!==r.type&&o[u][e].type===r.type||"all"===r.type)&&o[u][e].user._id!==r.readedBy&&(!o[u][e].readedBy||s&&s._id&&o[u][e].readedBy&&!o[u][e].readedBy[s._id]))})).forEach((function(e,t){o[u]&&o[u][e]&&(o[u][e]=Object(a.a)(Object(a.a)({},o[u][e]||{}),{},{readedBy:Object(a.a)(Object(a.a)({},o[u]&&o[u][e]&&o[u][e].readedBy?o[u][e].readedBy:{}),{},Object(n.a)({},r.readedBy,Object(a.a)(Object(a.a)(Object(a.a)({},o[u]&&o[u][e]&&o[u][e].readedBy&&o[u][e].readedBy[r.readedBy]?o[u][e].readedBy[r.readedBy]:{}),p),{},{readedDate:{low:c()().unix("x")}})))}))}))),t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)({},o)),d.a.getState().db.cards[r.id]&&r.type&&d.a.getState().db.cards[r.id]._notifications&&(d.a.getState().db.cards[r.id]._notifications[r.type]||"all"===r.type)&&t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},d.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},d.a.getState().db.cards),{},Object(n.a)({},r.id,Object(a.a)(Object(a.a)({},d.a.getState().db.cards[r.id]),"all"===r.type?{notifications:{}}:{_notifications:Object(a.a)(Object(a.a)({},d.a.getState().db.cards[r.id]&&d.a.getState().db.cards[r.id]._notifications?d.a.getState().db.cards[r.id]._notifications:{}),{},Object(n.a)({},r.type,0))})))}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),v=function(){var e=Object(o.a)(g().mark((function e(t,r){var o,i,l,s,u,p,f,h;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=d.a.getState(),i=o.db,l=o.timeline,s=o.session,u={},p=r.nodeId!==s._id?r.nodeId:r.user,i.users[r.user]?u=i.users[r.user]:r.user&&i[r.db]&&l[p]&&l[p]._users&&l[p]._users[r.user]&&(u=l[p]._users[r.user]),p&&r.message&&l&&l[s._id]&&l[s._id][r.message]&&(p=s._id),i[r.db]&&l[p]&&l[p][r.message]&&(f=Object(a.a)(Object(a.a)({},l[p][r.message]&&l[p][r.message]._reactions?l[p][r.message]._reactions:{}),{},Object(n.a)({},r.react,Object(a.a)(Object(a.a)({},l[p][r.message]&&l[p][r.message]._reactions&&l[p][r.message]._reactions[r.react]?l[p][r.message]._reactions[r.react]:{}),{},Object(n.a)({},r.user,Object(a.a)(Object(a.a)({},u),{},{reactDate:{low:c()().tz("America/Sao_Paulo").unix("x")}}))))),Object.keys(f).forEach((function(e){e!==r.react&&Object.keys(f[e]).forEach((function(t){f[e][t]&&t===r.user&&delete f[e][t]}))})),h=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},p,Object(a.a)(Object(a.a)({},l[p]),{},Object(n.a)({},r.message,Object(a.a)(Object(a.a)({},l[p][r.message]),{},{_reactions:f}))))),t.reduxFunction("ASYNC","SET_TIMELINE",h));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=Object(o.a)(g().mark((function e(t,r){var i,c,l,s;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(o.a)(g().mark((function e(n,a){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||"cards"!==r.db||d.a.getState().db.cards[r.idRel]){e.next=7;break}return e.next=3,Object(h.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=12;break}return i=r,c=d.a.getState(),l=c.session,(s=i._parent?i._parent:i.cardId?i.cardId:i.node)===l._id&&(s=i.comment.user._id),i.to&&(i.to.forEach((function(e){var t=d.a.getState().db.users[e];i._toUser=Object(a.a)(Object(a.a)({},i._toUser?i._toUser:{}),{},Object(n.a)({},e,{_id:e,name:t.displayName?t.displayName:t.name,image:t.image?t.image:null}))})),delete i.to),console.log(),s&&i.comment&&t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)(Object(a.a)({},d.a.getState().timeline),{},Object(n.a)({},s,Object(a.a)(Object(a.a)({},d.a.getState().timeline[s]||{}),{},Object(n.a)({},i.comment._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]?d.a.getState().timeline[s][i.comment._id]:{}),i.comment),i._toUser?{_toUser:i._toUser}:{}),{},{type:d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]&&d.a.getState().timeline[s][i.comment._id].type?d.a.getState().timeline[s][i.comment._id].type:i&&i.comment&&i.comment.type?i.comment.type:d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]&&d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id].type?d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id].type:"comment",readedBy:Object(a.a)(Object(a.a)({},d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]&&d.a.getState().timeline[s][i.comment._id].readedBy?d.a.getState().timeline[s][i.comment._id].readedBy:{}),i.comment&&i.comment.readedBy?i.comment.readedBy:{}),idRel:null})))))),e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),x=function(){var e=Object(o.a)(g().mark((function e(t,r){var i,c,l,s,f,h,m,b,v,y,x,w,_,O,j,E,k,S,L,C,I,T,D,F;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(null===(i=d.a.getState().chat)||void 0===i?void 0:i.lastMessageDate)||0,l=d.a.getState().timelineLoader,!r.type||"kpi"!==r.type){e.next=7;break}if(s=u()("".concat(JSON.stringify(r))).toString(),!l[s]){e.next=6;break}return e.abrupt("return",{result:!0,total:0});case 6:t.reduxFunction("ASYNC","SET_TIMELINE_LOADER",Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},s,!0)));case 7:if(f=r.ids,h=r.db,m=r.type,b=r.limit,v=void 0===b?0:b,y=r.skip,x=void 0===y?0:y,w=r.toId,_=void 0===w?null:w,O=r.ini,j=void 0!==O&&O,E=r.reqChildrens,k=void 0!==E&&E,S=r.newUpdates,L=void 0!==S&&S,C=d.a.getState(),I=C.session,T=[],D=[],"string"===typeof f?D.push(f):D=f,D&&D.length>0&&D.forEach((function(e){-1===T.indexOf(e)&&T.push(e)})),!(T.length>0)){e.next=22;break}return e.next=16,new Promise(function(){var e=Object(o.a)(g().mark((function e(o,i){var l,s,u;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(T.length>0)){e.next=13;break}return e.prev=1,e.next=4,p.a.post("/M_Timeline_Get_V3",{nodesIds:T,db:h,type:m||"comment",skip:parseInt(x),limit:v,toId:_,ini:j,newUpdates:L,reqChildrens:k,lastDate:L?r.lastDate?r.lastDate:c:null});case 4:(l=e.sent)&&l.data&&l.data.length>0?(s=Object(a.a)({},d.a.getState().timeline),u=null,l.data.forEach((function(e){var t=e.nodeId!==I._id?e.nodeId:e.params.user._id,o=s&&s[t]&&s[t][e.data._id]&&s[t][e.data._id].readedBy?s[t][e.data._id].readedBy:{},i={};e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.forEach((function(e){o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.forEach((function(e){i=Object(a.a)(Object(a.a)({},i),{},Object(n.a)({},e.type,Object(a.a)(Object(a.a)({},i[e.type]),{},Object(n.a)({},e._id,e))))}));var l={};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})).forEach((function(e){l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},e._id,e))})),I&&I._id&&o&&!o[I._id]&&s[t]&&Object.keys(s[t]).forEach((function(r){s[t][r]&&s[t][r].readedBy&&s[t][r].readedBy[I._id]&&parseInt(s[t][r].created_at)>parseInt(e.data.created_at)&&(o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},I._id,Object(a.a)({},s[t][r].readedBy[I._id]))))})),(r.ini||r.newUpdates)&&parseInt(e.data.created_at)>parseInt(c)&&(c=parseInt(e.data.created_at),(d.a.getState().db.cards[t]&&"chatGroup"===d.a.getState().db.cards[t].type||d.a.getState().db.users[t])&&(u=t)),s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},t,Object(a.a)(Object(a.a)({},s&&s[t]?s[t]:{}),{},Object(n.a)({},e.data._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.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:o,_reactions:i},Object.keys(l).length>0?{_toUser:l}:{})))))})),t.noReg||t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)(Object(a.a)({},d.a.getState().timeline),s)),o({result:!0,total:l.data.length,timelines:s,chatOpenId:u,lastMessageDate:c})):o({result:!0,total:l.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 16:if((F=e.sent)&&(F.chatOpenId||F.lastMessageDate)&&t.reduxFunction("IMMEDIATE","SET_CHAT",Object(a.a)(Object(a.a)(Object(a.a)({},d.a.getState().chat),(r.ini||r.newUpdates)&&F.lastMessageDate?{lastMessageDate:F.lastMessageDate}:{}),r.ini&&F.chatOpenId?{nodeId:F.chatOpenId}:{})),!F){e.next=20;break}return e.abrupt("return",F);case 20:e.next=23;break;case 22:return e.abrupt("return",{result:!0,total:0});case 23:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w=function(){var e=d.a.getState(),t=e.db,r=e.session,n=e.timeline,a=0,o=0;return Object.keys(n).forEach((function(e){Object.keys(n[e]).forEach((function(i){n[e]&&n[e][i]&&n[e][i].type&&"comment"===n[e][i].type&&!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}},_=function(){var e=Object(o.a)(g().mark((function e(t,r){var i,c;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(t&&t.store&&d.a.getState().functions&&d.a.getState().functions.socket,d.a.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(o.a)(g().mark((function e(o,c){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.emit("data",{module:"chat",method:"put",action:"cancel"},r,(function(e){var i=r.idRel,c=d.a.getState().session;d.a.getState().timeline[c._id]&&d.a.getState().timeline[c._id][r.id]&&(i=c._id),t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)(Object(a.a)({},d.a.getState().timeline),{},Object(n.a)({},i,Object(a.a)(Object(a.a)({},d.a.getState().timeline[i]),{},Object(n.a)({},r.id,Object(a.a)(Object(a.a)({},d.a.getState().timeline&&d.a.getState().timeline[i]&&d.a.getState().timeline[i][r.id]),{},{deleted:!0},r.deletedReason?{deletedReason:r.deletedReason}:{})))))),o(!0)}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(c=e.sent)){e.next=6;break}return e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),O=function(e,t){var r,n,a=d.a.getState(),o=a.db,i=a.session;if(t&&t._parent&&o.cards[t._parent]?r=t._parent:t&&t.idRel&&o.cards[t.idRel]&&(r=t.idRel),n=e,e){var c=e.split("@[");c.length>0&&c.map((function(e){if(e){var t="@[".concat(e.split(")")[0],")"),a=e.split("](")[1];if(a)if((a=a.split(")")[0])&&36===a.length&&o.cards[r]&&o.cards[r]._users&&o.cards[r]._users[a]){var c=o.cards[r]._users&&o.cards[r]._users[a]&&o.cards[r]._users[a].name||o.cards[r]._users&&o.cards[r]._users[a]&&o.cards[r]._users[a].name?o.cards[r]._users[a].name:e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&d.a.getState().db.users[a]&&d.a.getState().db.users[a].deleted&&(c=Object(m.w)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(m.d)("menu"),'"><b>').concat(c,"</b></span>"))}else if(a&&36===a.length&&o.users[a]){var l=o.users[a]&&o.users[a].name?o.users[a].name:e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&d.a.getState().db.users[a]&&d.a.getState().db.users[a].deleted&&(l=Object(m.w)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(m.d)("menu"),'"><b>').concat(l,"</b></span>"))}else{var s=e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&d.a.getState().db.users[a]&&d.a.getState().db.users[a].deleted&&(s=Object(m.w)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(m.d)("menu"),'"><b>').concat(s,"</b></span>"))}}return!0}))}return n},j=function(e,t){var r=Object(a.a)(Object(a.a)({},t),{},{forwardedId:t._id,_id:Object(l.a)(),created_at:"".concat(c()().tz("America/Sao_Paulo").unix("x"))});r._reactions&&delete r._reactions,r.readedBy&&delete r.readedBy,r._reactions&&delete r._reactions,r._toUser&&delete r._toUser,t._forwardToId.forEach((function(t){y(e,{comment:Object(a.a)(Object(a.a)({},r),{},{idRel:t}),node:t}),f.a.post("timeline/add",Object(a.a)(Object(a.a)({},r),{},{idRel:t}))}))}},801:function(e,t,r){},83:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(11),i=r(122),c=r(739),l=r(25),s=r(570);t.a=function(e){var t,r,u,d,p,f,h,m,g,b,v,y,x,w,_,O,j,E,k,S,L,C,I,T,D=e.tittle,F=e.icon,N=e.datafilter,A=e.handleSetoption,P=e.handleSetSelected,$=Object(n.useRef)();return a.a.createElement("div",{ref:$,style:{height:"47px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",background:e.styles.backgroundColor?e.styles.backgroundColor:"white",display:"flex",fontWeight:"bolder",position:"relative",overflow:"visible"}},a.a.createElement("div",{style:{width:"40px",height:"40px",alignSelf:"center",display:"flex"}},a.a.createElement(o.a,{size:28,icon:F&&F,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey",maxWidth:"30px"}})),e.edit?a.a.createElement("div",null,a.a.createElement(l.a,{variant:"outlined",name:"name",id:"edit_693",InputLabelProps:{shrink:!0},onBlur:function(e){return P&&P({name:e.target.value})},linecolor:"#D3D3D3",style:{minWidth:"0px",width:"160px"},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(s.a,{position:"end"},a.a.createElement(o.a,{icon:"edit"}))},defaultValue:(null===(t=e.indicators)||void 0===t?void 0:t.name)?null===(r=e.indicators)||void 0===r?void 0:r.name:D,placeholder:"TESTEEEEE"})):a.a.createElement("p",{style:{margin:"0px",marginLeft:"10px",alignSelf:"center",padding:"0px",fontSize:"14px",fontWeight:"bolder"}},(null===(u=e.indicators)||void 0===u?void 0:u.name)?null===(d=e.indicators)||void 0===d?void 0:d.name:D),e.edit&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(o.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(o.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with")),N&&a.a.createElement(i.a,{text:"Filtro",icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement("div",{style:{marginLeft:"11px",marginBottom:"12px"}},(null===e||void 0===e||null===(p=e.filterConfig)||void 0===p?void 0:p.filterSelect)&&a.a.createElement("select",{placeholder:"Quantidade de usuarios por exibi\xe7\xe3o",onChange:function(e){return P({finalIndex:parseInt(e.target.value),showQuantity:parseInt(e.target.value),index:0,number:parseInt(e.target.value)})},style:{padding:"10px 10px 10px 3px",alignSelf:"center",border:"1px solid #dde2e6",color:"#bebebe",fontSize:"14px"}},a.a.createElement("option",{disabled:!0,selected:!0},"Quantidade de ",(null===e||void 0===e||null===(f=e.filterConfig)||void 0===f?void 0:f.filterName)?null===e||void 0===e||null===(h=e.filterConfig)||void 0===h?void 0:h.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(m=e.filterConfig)||void 0===m?void 0:m.filterSelect)>5&&a.a.createElement("option",null," 5 ",(null===e||void 0===e||null===(g=e.filterConfig)||void 0===g?void 0:g.filterName)?null===e||void 0===e||null===(b=e.filterConfig)||void 0===b?void 0:b.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(v=e.filterConfig)||void 0===v?void 0:v.filterSelect)>10&&a.a.createElement("option",null," 10 ",(null===e||void 0===e||null===(y=e.filterConfig)||void 0===y?void 0:y.filterName)?null===e||void 0===e||null===(x=e.filterConfig)||void 0===x?void 0:x.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(w=e.filterConfig)||void 0===w?void 0:w.filterSelect)>15&&a.a.createElement("option",null," 15 ",(null===e||void 0===e||null===(_=e.filterConfig)||void 0===_?void 0:_.filterName)?null===e||void 0===e||null===(O=e.filterConfig)||void 0===O?void 0:O.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(j=e.filterConfig)||void 0===j?void 0:j.filterSelect)>10&&a.a.createElement("option",null," 20 ",(null===e||void 0===e||null===(E=e.filterConfig)||void 0===E?void 0:E.filterName)?null===e||void 0===e||null===(k=e.filterConfig)||void 0===k?void 0:k.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(S=e.filterConfig)||void 0===S?void 0:S.filterSelect)>10&&a.a.createElement("option",null," 25 ",(null===e||void 0===e||null===(L=e.filterConfig)||void 0===L?void 0:L.filterName)?null===e||void 0===e||null===(C=e.filterConfig)||void 0===C?void 0:C.filterName:"usuarios"," por exibi\xe7\xe3o"))),a.a.createElement(c.a,{fields:(null===e||void 0===e||null===(I=e.filterConfig)||void 0===I?void 0:I.filterItems)?null===e||void 0===e||null===(T=e.filterConfig)||void 0===T?void 0:T.filterItems:["date","users"],showFilters:!0,style:{position:"absolute",zIndex:"999"},nodeId:"barChart",indicators:null===e||void 0===e?void 0:e.indicators,onChange:function(e){A(e)}})),style:{alignSelf:"center",position:"absolute",right:"107px"},textColor:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",btColor:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}),a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},(null===e||void 0===e?void 0:e.table)&&a.a.createElement(o.a,{onClick:function(){return e.handleModal()},style:{height:"25px",cursor:"pointer",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"232px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"table_rows")),a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},(null===e||void 0===e?void 0:e.vertical)&&a.a.createElement(o.a,{onClick:function(){return P({mode:!e.indicators.mode||!1})},style:{height:"25px",cursor:"pointer",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"278px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"vertical_split"))))}},865:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(200),s=(r(156),r(3)),u=r(6),d=r.n(u);t.default=function(e){var t=Object(i.useState)(),r=Object(o.a)(t,2),u=r[0],p=r[1],f=e.tittle,h=e.preview,m=e.icon,g=window.location.hash.split("/"),b=Object(i.useState)({}),v=Object(o.a)(b,2),y=v[0],x=v[1];g[0]=g[0].replace("#","");var w=s.a.getState().db;return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&x(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var e=Object(n.a)(w.status.map((function(e,t){return{value:Object.keys(w.cards).filter((function(t){var r,n,a,o=(null===(r=w.cards[t].completed_at)||void 0===r?void 0:r.low)||w.cards[t].completed_at||(null===(n=w.cards[t].updated_at)||void 0===n?void 0:n.low)||w.cards[t].updated_at||(null===(a=w.cards[t].created_at)||void 0===a?void 0:a.low)||w.cards[t].created_at,i=d()(1e3*o),c=(null===y||void 0===y?void 0:y.startDate)?d()(1e3*(null===y||void 0===y?void 0:y.startDate)):d()().subtract(10,"years"),l=(null===y||void 0===y?void 0:y.endDate)?d()(1e3*(null===y||void 0===y?void 0:y.endDate)):d()();return w.cards[t]._planId===g[0]&&!w.cards[t].deleted&&w.cards[t].status&&i.isBetween(c,l,null,"[]")&&w.cards[t].status===e.value&&("iniciative"===w.cards[t].type||"task"===w.cards[t].type||"meeting"===w.cards[t].type||"iniciative"===w.cards[t].type||"myTask"===w.cards[t].type)&&(!w.cards[t].checklist||w.cards[t].checklist&&w.cards[t].showCard)})).length}}))),t=0;e.forEach((function(e){t=e.value+t})),p(t)}),[e.planCards,y]),c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(l.default,{load:e.load,data:u&&u.toString(),tittle:f,preview:h,icon:m,edit:e.edit,id:e.id,styles:e.styles,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))}},866:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(1),d=r(64),p=r(70),f=r(74),h=r(120),m=r(11),g=(r(156),r(96)),b=r(14),v=r(13),y=r(15),x=r(3);t.default=Object(b.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(v.b)(y,e)}))((function(e){var t,r=s()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),l=window.location.hash.split("/");l[0]=l[0].replace("#","");var b=x.a.getState().db,v={},y=Object(i.useState)({}),w=Object(o.a)(y,2),_=w[0],O=w[1],j=Object(i.useState)([]),E=Object(o.a)(j,2),k=E[0],S=E[1],L=Object(i.useRef)([]);return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&O(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(b.status.map((function(t,r){return{id:"await"===t.label.substring(3)?Object(u.w)("$__awaitAction"):Object(u.w)(t.label),label:"await"===t.label.substring(3)?"$__awaitAction":t.label,value:Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=b.cards[e].completed_at)||void 0===r?void 0:r.low)||b.cards[e].completed_at||(null===(n=b.cards[e].updated_at)||void 0===n?void 0:n.low)||b.cards[e].updated_at||(null===(a=b.cards[e].created_at)||void 0===a?void 0:a.low)||b.cards[e].created_at,i=s()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?s()(1e3*(null===_||void 0===_?void 0:_.startDate)):s()().subtract(10,"years"),u=(null===_||void 0===_?void 0:_.endDate)?s()(1e3*(null===_||void 0===_?void 0:_.endDate)):s()();return b.cards[e]._planId===l[0]&&i.isBetween(c,u,null,"[]")&&!b.cards[e].deleted&&b.cards[e].status&&b.cards[e].status===t.value&&("iniciative"===b.cards[e].type||"task"===b.cards[e].type||"meeting"===b.cards[e].type||"iniciative"===b.cards[e].type||"myTask"===b.cards[e].type)&&(!b.cards[e].checklist||b.cards[e].checklist&&b.cards[e].showCard)})).length,color:t.color}}))),[{id:Object(u.w)("$__late"),label:"$__late",value:Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=b.cards[e].completed_at)||void 0===t?void 0:t.low)||b.cards[e].completed_at||(null===(n=b.cards[e].updated_at)||void 0===n?void 0:n.low)||b.cards[e].updated_at||(null===(a=b.cards[e].created_at)||void 0===a?void 0:a.low)||b.cards[e].created_at,i=s()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?s()(1e3*(null===_||void 0===_?void 0:_.startDate)):s()().subtract(10,"years"),u=(null===_||void 0===_?void 0:_.endDate)?s()(1e3*(null===_||void 0===_?void 0:_.endDate)):s()();return b.cards[e]._planId===l[0]&&!b.cards[e].deleted&&i.isBetween(c,u,null,"[]")&&"completed"!==b.cards[e].status&&("iniciative"===b.cards[e].type||"task"===b.cards[e].type||"meeting"===b.cards[e].type||"iniciative"===b.cards[e].type||"myTask"===b.cards[e].type)&&(!b.cards[e].checklist||b.cards[e].checklist&&b.cards[e].showCard)&&b.cards[e].endDate&&s()(new Date(1e3*b.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.forEach((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).forEach((function(e){var t={label:e.label.substring(3),color:e.color};L.current.some((function(e){return e.label===t.label}))||(L.current=[].concat(Object(n.a)(L.current),[t]))})),S(t)}),[e.planCards,e.filter,_]),(null===(t=b.cards[l[0]])||void 0===t?void 0:t.customColumns)&&(v=JSON.parse(b.cards[l[0]].customColumns)),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(g.a,null,(function(t){var n,a,o,i;return c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(p.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?c.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},c.a.createElement(m.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"play_arrow"),c.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(u.w)("$__actions",1)),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(m.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(m.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):c.a.createElement(d.a,{title:(null===(n=v)||void 0===n||null===(a=n.actions)||void 0===a?void 0:a.name)?v.actions.name:Object(u.w)("$__actions",1),icon:(null===(o=v)||void 0===o||null===(i=o.actions)||void 0===i?void 0:i.icon)?v.actions.icon:"play_arrow",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),c.a.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto"}},e.load&&c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))),!e.load&&t&&c.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundColor:"#f5f5f5"}},c.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},c.a.createElement(h.a,{data:k,colors:{datum:"data.color"},margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})))),!e.load&&t&&c.a.createElement(f.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},c.a.createElement("h3",null,c.a.createElement("small",null,Object(u.w)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){var t,r,n,a=(null===(t=b.cards[e].completed_at)||void 0===t?void 0:t.low)||b.cards[e].completed_at||(null===(r=b.cards[e].updated_at)||void 0===r?void 0:r.low)||b.cards[e].updated_at||(null===(n=b.cards[e].created_at)||void 0===n?void 0:n.low)||b.cards[e].created_at,o=s()(1e3*a),i=(null===_||void 0===_?void 0:_.startDate)?s()(1e3*(null===_||void 0===_?void 0:_.startDate)):s()().subtract(10,"years"),c=(null===_||void 0===_?void 0:_.endDate)?s()(1e3*(null===_||void 0===_?void 0:_.endDate)):s()();return b.cards[e]._planId===l[0]&&!b.cards[e].deleted&&o.isBetween(i,c,null,"[]")&&("iniciative"===b.cards[e].type||"task"===b.cards[e].type||"meeting"===b.cards[e].type||"iniciative"===b.cards[e].type||"myTask"===b.cards[e].type)&&(!b.cards[e].checklist||b.cards[e].checklist&&b.cards[e].showCard)})).length)),b.status.map((function(t,r){return c.a.createElement("div",{key:"".concat(r,"_").concat(t.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(m.a,{color:t.color},t.icon),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(u.w)(t.label,1))),c.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=b.cards[e].completed_at)||void 0===r?void 0:r.low)||b.cards[e].completed_at||(null===(n=b.cards[e].updated_at)||void 0===n?void 0:n.low)||b.cards[e].updated_at||(null===(a=b.cards[e].created_at)||void 0===a?void 0:a.low)||b.cards[e].created_at,i=s()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?s()(1e3*(null===_||void 0===_?void 0:_.startDate)):s()().subtract(10,"years"),u=(null===_||void 0===_?void 0:_.endDate)?s()(1e3*(null===_||void 0===_?void 0:_.endDate)):s()();return b.cards[e]._planId===l[0]&&!b.cards[e].deleted&&i.isBetween(c,u,null,"[]")&&("iniciative"===b.cards[e].type||"task"===b.cards[e].type||"meeting"===b.cards[e].type||"iniciative"===b.cards[e].type||"myTask"===b.cards[e].type)&&(!b.cards[e].checklist||b.cards[e].checklist&&b.cards[e].showCard)&&b.cards[e].status&&b.cards[e].status===t.value})).length))})),c.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(m.a,{color:"red"},"assignment_late"),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(u.w)("$__late",1))),c.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=b.cards[e].completed_at)||void 0===t?void 0:t.low)||b.cards[e].completed_at||(null===(n=b.cards[e].updated_at)||void 0===n?void 0:n.low)||b.cards[e].updated_at||(null===(a=b.cards[e].created_at)||void 0===a?void 0:a.low)||b.cards[e].created_at,i=s()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?s()(1e3*(null===_||void 0===_?void 0:_.startDate)):s()().subtract(10,"years"),u=(null===_||void 0===_?void 0:_.endDate)?s()(1e3*(null===_||void 0===_?void 0:_.endDate)):s()();return b.cards[e]._planId===l[0]&&!b.cards[e].deleted&&i.isBetween(c,u,null,"[]")&&"completed"!==b.cards[e].status&&("iniciative"===b.cards[e].type||"task"===b.cards[e].type||"meeting"===b.cards[e].type||"iniciative"===b.cards[e].type||"myTask"===b.cards[e].type)&&(!b.cards[e].checklist||b.cards[e].checklist&&b.cards[e].showCard)&&b.cards[e].endDate&&s()(new Date(1e3*b.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}))},867:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(200),s=r(3),u=r(6),d=r.n(u);t.default=function(e){var t=e.tittle,r=e.preview,u=e.icon,p=Object(i.useState)([]),f=Object(o.a)(p,2),h=f[0],m=f[1],g=Object(i.useState)({}),b=Object(o.a)(g,2),v=b[0],y=b[1];return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&y(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#","");var t=s.a.getState().db,r=Object(n.a)(t.status.map((function(r,n){return{value:Object.keys(t.cards).filter((function(n){var a,o,i,c=(null===(a=t.cards[n].completed_at)||void 0===a?void 0:a.low)||t.cards[n].completed_at||(null===(o=t.cards[n].updated_at)||void 0===o?void 0:o.low)||t.cards[n].updated_at||(null===(i=t.cards[n].created_at)||void 0===i?void 0:i.low)||t.cards[n].created_at,l=d()(1e3*c),s=(null===v||void 0===v?void 0:v.startDate)?d()(1e3*(null===v||void 0===v?void 0:v.startDate)):d()().subtract(10,"years"),u=(null===v||void 0===v?void 0:v.endDate)?d()(1e3*(null===v||void 0===v?void 0:v.endDate)):d()();return t.cards[n]._planId===e[0]&&!t.cards[n].checklist&&!t.cards[n].deleted&&l.isBetween(s,u,null,"[]")&&"goal"===t.cards[n].type&&t.cards[n].status&&t.cards[n].status===r.value})).length}}))),a=0;r.forEach((function(e){a=e.value+a})),m(a)}),[e.planCards,v]),c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(l.default,{load:e.load,data:h&&h.toString(),tittle:t,preview:r,icon:u,edit:e.edit,styles:e.styles,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))}},868:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(64),s=r(70),u=r(74),d=r(120),p=r(11),f=r(96),h=r(6),m=r.n(h),g=r(1),b=r(3);t.default=function(e){var t,r=m()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),h=window.location.hash.split("/");h[0]=h[0].replace("#","");var v=b.a.getState().db,y={},x=Object(i.useState)({}),w=Object(o.a)(x,2),_=w[0],O=w[1],j=Object(i.useState)([]),E=Object(o.a)(j,2),k=E[0],S=E[1],L=Object(i.useRef)([]);return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&O(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(v.status.map((function(t,r){return{id:"await"===t.label.substring(3)?Object(g.w)("$__awaitAction"):Object(g.w)(t.label),label:"await"===t.label.substring(3)?"$__awaitAction":t.label,value:Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=v.cards[e].completed_at)||void 0===r?void 0:r.low)||v.cards[e].completed_at||(null===(n=v.cards[e].updated_at)||void 0===n?void 0:n.low)||v.cards[e].updated_at||(null===(a=v.cards[e].created_at)||void 0===a?void 0:a.low)||v.cards[e].created_at,i=m()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?m()(1e3*(null===_||void 0===_?void 0:_.startDate)):m()().subtract(10,"years"),l=(null===_||void 0===_?void 0:_.endDate)?m()(1e3*(null===_||void 0===_?void 0:_.endDate)):m()();return v.cards[e]._planId===h[0]&&"goal"===v.cards[e].type&&i.isBetween(c,l,null,"[]")&&!v.cards[e].checklist&&!v.cards[e].deleted&&v.cards[e].status&&v.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(g.w)("$__late"),label:"$__late",value:Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=v.cards[e].completed_at)||void 0===t?void 0:t.low)||v.cards[e].completed_at||(null===(n=v.cards[e].updated_at)||void 0===n?void 0:n.low)||v.cards[e].updated_at||(null===(a=v.cards[e].created_at)||void 0===a?void 0:a.low)||v.cards[e].created_at,i=m()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?m()(1e3*(null===_||void 0===_?void 0:_.startDate)):m()().subtract(10,"years"),l=(null===_||void 0===_?void 0:_.endDate)?m()(1e3*(null===_||void 0===_?void 0:_.endDate)):m()();return v.cards[e]._planId===h[0]&&!v.cards[e].checklist&&i.isBetween(c,l,null,"[]")&&!v.cards[e].deleted&&"completed"!==v.cards[e].status&&"goal"===v.cards[e].type&&v.cards[e].endDate&&m()(new Date(1e3*v.cards[e].endDate)).tz("America/Sao_Paulo").format()<=m()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.map((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).map((function(e){var t={label:e.label.substring(3),color:e.color};L.current.some((function(e){return e.label===t.label}))||(L.current=[].concat(Object(n.a)(L.current),[t]))})),S(t)}),[e.planCards,e.filter,_]),(null===(t=v.cards[h[0]])||void 0===t?void 0:t.customColumns)&&(y=JSON.parse(v.cards[h[0]].customColumns)),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(f.a,null,(function(t){var n,a,o,i;return c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(s.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?c.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},c.a.createElement(p.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey"}},"flag"),c.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(g.w)("$__goals",1)),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(p.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(p.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):c.a.createElement(l.a,{title:(null===(n=y)||void 0===n||null===(a=n.goals)||void 0===a?void 0:a.name)?y.goals.name:Object(g.w)("$__goals",1),icon:(null===(o=y)||void 0===o||null===(i=o.goals)||void 0===i?void 0:i.icon)?y.goals.icon:"flag",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),c.a.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))),c.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&t&&c.a.createElement(d.a,{data:k,colors:{datum:"data.color"},margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1}))),!e.load&&t&&c.a.createElement(u.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},c.a.createElement("h3",null,c.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(g.w)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){var t,r,n,a=(null===(t=v.cards[e].completed_at)||void 0===t?void 0:t.low)||v.cards[e].completed_at||(null===(r=v.cards[e].updated_at)||void 0===r?void 0:r.low)||v.cards[e].updated_at||(null===(n=v.cards[e].created_at)||void 0===n?void 0:n.low)||v.cards[e].created_at,o=m()(1e3*a),i=(null===_||void 0===_?void 0:_.startDate)?m()(1e3*(null===_||void 0===_?void 0:_.startDate)):m()().subtract(10,"years"),c=(null===_||void 0===_?void 0:_.endDate)?m()(1e3*(null===_||void 0===_?void 0:_.endDate)):m()();return v.cards[e]._planId===h[0]&&!v.cards[e].checklist&&o.isBetween(i,c,null,"[]")&&!v.cards[e].deleted&&"goal"===v.cards[e].type})).length)),v.status.map((function(t,r){return c.a.createElement("div",{key:"".concat(r,"_").concat(t.value),style:{color:"black",display:"flex",fontSize:"14px",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(p.a,{color:t.color},t.icon),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(g.w)(t.label,1))),c.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=v.cards[e].completed_at)||void 0===r?void 0:r.low)||v.cards[e].completed_at||(null===(n=v.cards[e].updated_at)||void 0===n?void 0:n.low)||v.cards[e].updated_at||(null===(a=v.cards[e].created_at)||void 0===a?void 0:a.low)||v.cards[e].created_at,i=m()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?m()(1e3*(null===_||void 0===_?void 0:_.startDate)):m()().subtract(10,"years"),l=(null===_||void 0===_?void 0:_.endDate)?m()(1e3*(null===_||void 0===_?void 0:_.endDate)):m()();return v.cards[e]._planId===h[0]&&"goal"===v.cards[e].type&&i.isBetween(c,l,null,"[]")&&!v.cards[e].checklist&&!v.cards[e].deleted&&v.cards[e].status&&v.cards[e].status===t.value})).length))})),c.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",fontSize:"14px",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(p.a,{color:"red"},"assignment_late"),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(g.w)("$__late",1))),c.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=v.cards[e].completed_at)||void 0===t?void 0:t.low)||v.cards[e].completed_at||(null===(n=v.cards[e].updated_at)||void 0===n?void 0:n.low)||v.cards[e].updated_at||(null===(a=v.cards[e].created_at)||void 0===a?void 0:a.low)||v.cards[e].created_at,i=m()(1e3*o),c=(null===_||void 0===_?void 0:_.startDate)?m()(1e3*(null===_||void 0===_?void 0:_.startDate)):m()().subtract(10,"years"),l=(null===_||void 0===_?void 0:_.endDate)?m()(1e3*(null===_||void 0===_?void 0:_.endDate)):m()();return v.cards[e]._planId===h[0]&&i.isBetween(c,l,null,"[]")&&!v.cards[e].checklist&&!v.cards[e].deleted&&"completed"!==v.cards[e].status&&"goal"===v.cards[e].type&&v.cards[e].endDate&&m()(new Date(1e3*v.cards[e].endDate)).tz("America/Sao_Paulo").format()<=m()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}},869:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(200),s=r(124),u=r.n(s),d=r(3),p=r(6),f=r.n(p);t.default=function(e){var t=e.tittle,r=e.preview,s=Object(i.useState)({}),p=Object(o.a)(s,2),h=p[0],m=p[1],g=window.location.hash.split("/");g[0]=g[0].replace("#","");var b=d.a.getState().db;Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&m(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]);var v=Object(n.a)(b.status.map((function(e,t){return{value:Object.keys(b.cards).filter((function(t){var r,n,a,o=(null===(r=b.cards[t].completed_at)||void 0===r?void 0:r.low)||b.cards[t].completed_at||(null===(n=b.cards[t].updated_at)||void 0===n?void 0:n.low)||b.cards[t].updated_at||(null===(a=b.cards[t].created_at)||void 0===a?void 0:a.low)||b.cards[t].created_at,i=f()(1e3*o),c=(null===h||void 0===h?void 0:h.startDate)?f()(1e3*(null===h||void 0===h?void 0:h.startDate)):f()().subtract(10,"years"),l=(null===h||void 0===h?void 0:h.endDate)?f()(1e3*(null===h||void 0===h?void 0:h.endDate)):f()();return b.cards[t]._planId===g[0]&&!b.cards[t].checklist&&i.isBetween(c,l,null,"[]")&&!b.cards[t].deleted&&"guideline"===b.cards[t].type&&b.cards[t].status&&b.cards[t].status===e.value})).length}}))),y=0;return v.forEach((function(e){y=e.value+y})),c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(l.default,{data:y,tittle:t,load:e.load,preview:r,icon:u.a,edit:e.edit,id:e.id,styles:e.styles,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))}},870:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(6),s=r.n(l),u=r(1),d=r(70),p=r(74),f=r(11),h=r(193),m=r(124),g=r.n(m),b=r(64),v=r(120),y=(r(156),r(96)),x=r(3);t.default=function(e){var t,r=s()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),l=window.location.hash.split("/");l[0]=l[0].replace("#","");var m=x.a.getState().db,w={},_=Object(i.useState)({}),O=Object(o.a)(_,2),j=O[0],E=O[1],k=Object(i.useState)([]),S=Object(o.a)(k,2),L=S[0],C=S[1],I=Object(i.useRef)([]);return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&E(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(m.status.map((function(e,t){return{id:"await"===e.label.substring(3)?Object(u.w)("$__awaitAction"):Object(u.w)(e.label),label:"await"===e.label.substring(3)?"$__awaitAction":e.label,value:Object.keys(m.cards).filter((function(t){var r,n,a,o=(null===(r=m.cards[t].completed_at)||void 0===r?void 0:r.low)||m.cards[t].completed_at||(null===(n=m.cards[t].updated_at)||void 0===n?void 0:n.low)||m.cards[t].updated_at||(null===(a=m.cards[t].created_at)||void 0===a?void 0:a.low)||m.cards[t].created_at,i=s()(1e3*o),c=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),u=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return m.cards[t]._planId===l[0]&&i.isBetween(c,u,null,"[]")&&!m.cards[t].deleted&&m.cards[t].type.indexOf("guideline")>-1&&m.cards[t].status&&m.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(u.w)("$__late"),label:"$__late",value:Object.keys(m.cards).filter((function(e){var t,n,a,o=(null===(t=m.cards[e].completed_at)||void 0===t?void 0:t.low)||m.cards[e].completed_at||(null===(n=m.cards[e].updated_at)||void 0===n?void 0:n.low)||m.cards[e].updated_at||(null===(a=m.cards[e].created_at)||void 0===a?void 0:a.low)||m.cards[e].created_at,i=s()(1e3*o),c=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),u=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return m.cards[e]._planId===l[0]&&!m.cards[e].deleted&&i.isBetween(c,u,null,"[]")&&m.cards[e].type.indexOf("guideline")>-1&&m.cards[e].endDate&&s()(new Date(1e3*m.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.map((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).map((function(e){var t={label:e.label.substring(3),color:e.color};I.current.some((function(e){return e.label===t.label}))||(I.current=[].concat(Object(n.a)(I.current),[t]))})),C(t)}),[e.planCards,e.filter,j]),(null===(t=m.cards[l[0]])||void 0===t?void 0:t.customColumns)&&(w=JSON.parse(m.cards[l[0]].customColumns)),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(y.a,null,(function(t){var n,a,o,i;return c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(d.a,{style:{height:"100%",marginTop:"0",display:"flex",overflow:"hidden"}},e.edit?c.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},c.a.createElement("div",{style:{width:"40px",height:"40px",alignSelf:"center",display:"flex"}},c.a.createElement(f.a,{size:28,icon:g.a,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey",maxWidth:"30px"}})),c.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(u.w)("$__guidelines",1)),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(f.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(f.a,{className:"drag-handle",style:{height:"25px",cursor:"move",position:"absolute",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):c.a.createElement(b.a,{title:(null===(n=w)||void 0===n||null===(a=n.guidelines)||void 0===a?void 0:a.name)?w.guidelines.name:Object(u.w)("$__guidelines",1),icon:(null===(o=w)||void 0===o||null===(i=o.guidelines)||void 0===i?void 0:i.icon)?w.guidelines.icon:g.a,color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),c.a.createElement(h.a,{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))),c.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&t&&c.a.createElement(v.a,{data:L,colors:{datum:"data.color"},margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1}))),!e.load&&t&&c.a.createElement(p.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},c.a.createElement("h3",null,c.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(u.w)("$__total",1),": ",Object.keys(m.cards).filter((function(e){var t,r,n,a=(null===(t=m.cards[e].completed_at)||void 0===t?void 0:t.low)||m.cards[e].completed_at||(null===(r=m.cards[e].updated_at)||void 0===r?void 0:r.low)||m.cards[e].updated_at||(null===(n=m.cards[e].created_at)||void 0===n?void 0:n.low)||m.cards[e].created_at,o=s()(1e3*a),i=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),c=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return m.cards[e]._planId===l[0]&&o.isBetween(i,c,null,"[]")&&!m.cards[e].deleted&&m.cards[e].type.indexOf("guideline")>-1})).length)),m.status.map((function(e,t){return c.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",fontSize:"14px",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(f.a,{color:e.color},e.icon),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(u.w)(e.label,1))),c.a.createElement("div",null,Object.keys(m.cards).filter((function(t){var r,n,a,o=(null===(r=m.cards[t].completed_at)||void 0===r?void 0:r.low)||m.cards[t].completed_at||(null===(n=m.cards[t].updated_at)||void 0===n?void 0:n.low)||m.cards[t].updated_at||(null===(a=m.cards[t].created_at)||void 0===a?void 0:a.low)||m.cards[t].created_at,i=s()(1e3*o),c=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),u=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return m.cards[t]._planId===l[0]&&!m.cards[t].deleted&&i.isBetween(c,u,null,"[]")&&m.cards[t].type.indexOf("guideline")>-1&&m.cards[t].status&&m.cards[t].status===e.value})).length))})),c.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",fontSize:"14px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(f.a,{color:"red"},"assignment_late"),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(u.w)("$__late",1))),c.a.createElement("div",null,Object.keys(m.cards).filter((function(e){var t,n,a,o=(null===(t=m.cards[e].completed_at)||void 0===t?void 0:t.low)||m.cards[e].completed_at||(null===(n=m.cards[e].updated_at)||void 0===n?void 0:n.low)||m.cards[e].updated_at||(null===(a=m.cards[e].created_at)||void 0===a?void 0:a.low)||m.cards[e].created_at,i=s()(1e3*o),c=(null===j||void 0===j?void 0:j.startDate)?s()(1e3*(null===j||void 0===j?void 0:j.startDate)):s()().subtract(10,"years"),u=(null===j||void 0===j?void 0:j.endDate)?s()(1e3*(null===j||void 0===j?void 0:j.endDate)):s()();return m.cards[e]._planId===l[0]&&!m.cards[e].deleted&&i.isBetween(c,u,null,"[]")&&m.cards[e].type.indexOf("guideline")>-1&&m.cards[e].endDate&&s()(new Date(1e3*m.cards[e].endDate)).tz("America/Sao_Paulo").format()<=s()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}},871:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(200),s=r(3),u=r(6),d=r.n(u);t.default=function(e){var t=e.tittle,r=e.preview,u=e.icon,p=window.location.hash.split("/");p[0]=p[0].replace("#","");var f=s.a.getState().db,h=Object(i.useState)({}),m=Object(o.a)(h,2),g=m[0],b=m[1];Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&b(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]);var v=Object(n.a)(f.status.map((function(e,t){return{value:Object.keys(f.cards).filter((function(t){var r,n,a,o=(null===(r=f.cards[t].completed_at)||void 0===r?void 0:r.low)||f.cards[t].completed_at||(null===(n=f.cards[t].updated_at)||void 0===n?void 0:n.low)||f.cards[t].updated_at||(null===(a=f.cards[t].created_at)||void 0===a?void 0:a.low)||f.cards[t].created_at,i=d()(1e3*o),c=(null===g||void 0===g?void 0:g.startDate)?d()(1e3*(null===g||void 0===g?void 0:g.startDate)):d()().subtract(10,"years"),l=(null===g||void 0===g?void 0:g.endDate)?d()(1e3*(null===g||void 0===g?void 0:g.endDate)):d()();return f.cards[t]._planId===p[0]&&!f.cards[t].checklist&&i.isBetween(c,l,null,"[]")&&!f.cards[t].deleted&&"objective"===f.cards[t].type&&f.cards[t].status&&f.cards[t].status===e.value})).length}}))),y=0;return v.forEach((function(e){y=e.value+y})),c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(l.default,{load:e.load,data:y&&y.toString(),tittle:t,preview:r,icon:u,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)},styles:e.styles}))}},872:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(70),s=r(74),u=r(193),d=r(64),p=r(11),f=r(120),h=(r(156),r(96)),m=r(3),g=r(6),b=r.n(g),v=r(1);t.default=function(e){var t,r=b()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),g=window.location.hash.split("/");g[0]=g[0].replace("#","");var y=m.a.getState().db,x={},w=Object(i.useState)({}),_=Object(o.a)(w,2),O=_[0],j=_[1],E=Object(i.useState)([]),k=Object(o.a)(E,2),S=k[0],L=k[1],C=Object(i.useRef)([]);return Object(i.useEffect)((function(){var t,r,n;Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0&&j(Object(a.a)(Object(a.a)({},null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.dashboardConfig]),Object(i.useEffect)((function(){var t=[].concat(Object(n.a)(y.status.map((function(t,r){return{id:"await"===t.label.substring(3)?Object(v.w)("$__awaitAction"):Object(v.w)(t.label),label:"await"===t.label.substring(3)?"$__awaitAction":t.label,value:Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=y.cards[e].completed_at)||void 0===r?void 0:r.low)||y.cards[e].completed_at||(null===(n=y.cards[e].updated_at)||void 0===n?void 0:n.low)||y.cards[e].updated_at||(null===(a=y.cards[e].created_at)||void 0===a?void 0:a.low)||y.cards[e].created_at,i=b()(1e3*o),c=(null===O||void 0===O?void 0:O.startDate)?b()(1e3*(null===O||void 0===O?void 0:O.startDate)):b()().subtract(10,"years"),l=(null===O||void 0===O?void 0:O.endDate)?b()(1e3*(null===O||void 0===O?void 0:O.endDate)):b()();return y.cards[e]._planId===g[0]&&!y.cards[e].checklist&&i.isBetween(c,l,null,"[]")&&!y.cards[e].deleted&&"objective"===y.cards[e].type&&y.cards[e].status&&y.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(v.w)("$__late"),label:"$__late",value:Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=y.cards[e].completed_at)||void 0===t?void 0:t.low)||y.cards[e].completed_at||(null===(n=y.cards[e].updated_at)||void 0===n?void 0:n.low)||y.cards[e].updated_at||(null===(a=y.cards[e].created_at)||void 0===a?void 0:a.low)||y.cards[e].created_at,i=b()(1e3*o),c=(null===O||void 0===O?void 0:O.startDate)?b()(1e3*(null===O||void 0===O?void 0:O.startDate)):b()().subtract(10,"years"),l=(null===O||void 0===O?void 0:O.endDate)?b()(1e3*(null===O||void 0===O?void 0:O.endDate)):b()();return y.cards[e]._planId===g[0]&&!y.cards[e].checklist&&i.isBetween(c,l,null,"[]")&&!y.cards[e].deleted&&"completed"!==y.cards[e].status&&"objective"===y.cards[e].type&&y.cards[e].endDate&&b()(new Date(1e3*y.cards[e].endDate)).tz("America/Sao_Paulo").format()<=b()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]);(t=t.map((function(t){if(e.filter.colorsArr){var r="";return e.filter.colorsArr.forEach((function(e){t.label.substring(3)===e.label&&(r=e.color)})),Object(a.a)(Object(a.a)({},t),{},{color:r})}return t}))).forEach((function(e){var t={label:e.label.substring(3),color:e.color};C.current.some((function(e){return e.label===t.label}))||(C.current=[].concat(Object(n.a)(C.current),[t]))})),L(t)}),[e.planCards,e.filter,O]),(null===(t=y.cards[g[0]])||void 0===t?void 0:t.customColumns)&&(x=JSON.parse(y.cards[g[0]].customColumns)),c.a.createElement("div",{style:{height:"100%",width:"100%"}},c.a.createElement(h.a,null,(function(t){var n,a,o,i;return c.a.createElement("div",{style:{height:"100%"}},c.a.createElement(l.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?c.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white",borderBottom:"1px solid #D3D3D3"}},c.a.createElement(p.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey"}},"gps_fixed"),c.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(v.w)("$__objectives",1)),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(p.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"close")),c.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},c.a.createElement(p.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid  #D3D3D3",padding:"14px"}},"open_with"))):c.a.createElement(d.a,{title:(null===(n=x)||void 0===n||null===(a=n.objectives)||void 0===a?void 0:a.name)?x.objectives.name:Object(v.w)("$__objectives",1),icon:(null===(o=x)||void 0===o||null===(i=o.objectives)||void 0===i?void 0:i.icon)?x.objectives.icon:"gps_fixed",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),c.a.createElement(u.a,{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&c.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{alignSelf:"center"}},"  ",c.a.createElement("div",{className:"loader"}))),c.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&t&&c.a.createElement(f.a,{data:S,colors:{datum:"data.color"},margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1}))),!e.load&&c.a.createElement(s.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},c.a.createElement("h3",null,c.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(v.w)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){var t,r,n,a=(null===(t=y.cards[e].completed_at)||void 0===t?void 0:t.low)||y.cards[e].completed_at||(null===(r=y.cards[e].updated_at)||void 0===r?void 0:r.low)||y.cards[e].updated_at||(null===(n=y.cards[e].created_at)||void 0===n?void 0:n.low)||y.cards[e].created_at,o=b()(1e3*a),i=(null===O||void 0===O?void 0:O.startDate)?b()(1e3*(null===O||void 0===O?void 0:O.startDate)):b()().subtract(10,"years"),c=(null===O||void 0===O?void 0:O.endDate)?b()(1e3*(null===O||void 0===O?void 0:O.endDate)):b()();return y.cards[e]._planId===g[0]&&!y.cards[e].deleted&&!y.cards[e].checklist&&o.isBetween(i,c,null,"[]")&&"objective"===y.cards[e].type})).length)),y.status.map((function(t,r){return c.a.createElement("div",{key:"".concat(r,"_").concat(t.value),style:{color:"black",display:"flex",fontSize:"14px",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(p.a,{color:t.color},t.icon),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(v.w)(t.label,1))),c.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){var r,n,a,o=(null===(r=y.cards[e].completed_at)||void 0===r?void 0:r.low)||y.cards[e].completed_at||(null===(n=y.cards[e].updated_at)||void 0===n?void 0:n.low)||y.cards[e].updated_at||(null===(a=y.cards[e].created_at)||void 0===a?void 0:a.low)||y.cards[e].created_at,i=b()(1e3*o),c=(null===O||void 0===O?void 0:O.startDate)?b()(1e3*(null===O||void 0===O?void 0:O.startDate)):b()().subtract(10,"years"),l=(null===O||void 0===O?void 0:O.endDate)?b()(1e3*(null===O||void 0===O?void 0:O.endDate)):b()();return y.cards[e]._planId===g[0]&&"objective"===y.cards[e].type&&i.isBetween(c,l,null,"[]")&&y.cards[e].status&&!y.cards[e].checklist&&y.cards[e].status===t.value})).length))})),c.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",fontSize:"14px",alignItems:"center",width:"100%"}},c.a.createElement("div",{style:{display:"flex"}},c.a.createElement(p.a,{color:"red"},"assignment_late"),c.a.createElement("span",{style:{marginLeft:"15px"}},Object(v.w)("$__late",1))),c.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){var t,n,a,o=(null===(t=y.cards[e].completed_at)||void 0===t?void 0:t.low)||y.cards[e].completed_at||(null===(n=y.cards[e].updated_at)||void 0===n?void 0:n.low)||y.cards[e].updated_at||(null===(a=y.cards[e].created_at)||void 0===a?void 0:a.low)||y.cards[e].created_at,i=b()(1e3*o),c=(null===O||void 0===O?void 0:O.startDate)?b()(1e3*(null===O||void 0===O?void 0:O.startDate)):b()().subtract(10,"years"),l=(null===O||void 0===O?void 0:O.endDate)?b()(1e3*(null===O||void 0===O?void 0:O.endDate)):b()();return y.cards[e]._planId===g[0]&&!y.cards[e].checklist&&!y.cards[e].deleted&&i.isBetween(c,l,null,"[]")&&"completed"!==y.cards[e].status&&"objective"===y.cards[e].type&&y.cards[e].endDate&&b()(new Date(1e3*y.cards[e].endDate)).tz("America/Sao_Paulo").format()<=b()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}},873:function(e,t,r){"use strict";r.r(t);var n=r(19),a=r(8),o=r(2),i=r(10),c=r(5),l=r(0),s=r.n(l),u=r(6),d=r.n(u),p=r(14),f=r(13),h=r(15),m=r(3),g=r(141),b=r(196),v=r(83),y=(r(156),r(542)),x=r(1),w=r(78);r(874);function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var O=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(O,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(p.b)(null,(function(e){return Object(f.b)(h,e)}))((function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=Object(l.useRef)(!0),u=s.a.useState(!0),p=Object(c.a)(u,2),f=(p[0],p[1]),h=Object(l.useRef)({}),O=Object(l.useRef)(0);s.a.useEffect((function(){return j(),r.current=!0,function(){r.current=!1}}),[]);var j=function(){var n=Object(i.a)(_().mark((function n(){return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(w.f)(Object(o.a)(Object(o.a)({},e),{},{fnIdentification:"Components/Dashboard/Widgers/TaskDoneBar/init()"}),{ids:[t[0]],db:"cards",type:"timer",reqChildrens:!0});case 3:n.sent&&r.current&&f(!1),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),r.current&&f(!1);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})));return function(){return n.apply(this,arguments)}}(),E=m.a.getState().db,k=Object(l.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month",status:{all:!1,notStarted:!1,awaitAction:!1,paused:!1,inProgress:!1,completed:!0}}),S=Object(c.a)(k,2),L=S[0],C=S[1],I=Object(l.useState)({}),T=Object(c.a)(I,2),D=T[0],F=T[1],N=Object(l.useState)({total:{value:0,label:"completed",color:"#5A7F71",id:"completed"}}),A=Object(c.a)(N,2),P=A[0],$=A[1],M=Object(l.useState)({}),B=Object(c.a)(M,2),z=B[0],Y=B[1],R=Object(l.useRef)([{label:"completed",color:"#5A7F71"}]),G=Object(l.useRef)([]),H=function(e){for(var t=0,r=0;r<e.length;r++)t+=e.charCodeAt(r);return"#"+(t%16777215+16777216).toString(16).slice(1,7)};function W(t,r,n){for(var i,c,l,s,u,d,p=null===e||void 0===e||null===(i=e.dashboardConfig)||void 0===i||null===(c=i.colorsArr[O.current])||void 0===c?void 0:c.color,f="#",m=1;m<p.length;m+=2){var g=parseInt(p.slice(m,m+2),16);g=Math.round(g+.25*(255-g)),f+=g.toString(16).padStart(2,"0")}return(null===L||void 0===L?void 0:L.tagsColors)&&(null===L||void 0===L||null===(l=L.tagsColors)||void 0===l?void 0:l.mainColor)===t?Object.values(null===L||void 0===L?void 0:L.tagsColors).forEach((function(e){e.name===r&&(h.current=Object(o.a)(Object(o.a)({},h.current),{},Object(a.a)({},e.name,{color:e.color,name:e.name})))})):(null===(s=h.current)||void 0===s?void 0:s[r])&&p===(null===(u=h.current)||void 0===u?void 0:u.mainColor)||(h.current=Object(o.a)(Object(o.a)({},h.current),{},Object(a.a)({},r,{color:f,name:r}))),(null===(d=h.current)||void 0===d?void 0:d[r])||(h.current=Object(o.a)(Object(o.a)({},h.current),{},Object(a.a)({},r,{color:f,name:r}))),Object.values(h.current).length>0&&Object.values(h.current).forEach((function(e){e.name===r&&(f=e.color)})),f}var U=function(e){if("string"===typeof e){var t=e.split(" "),r=e;return P.length>5&&P.length<10?(r="",t[0].startsWith("#")?(t.map((function(e,n){0!==n&&(2===t.length?r=e.substring(0,3):r+=e.charAt(0))})),t[0]+r):(t.map((function(e){1===t.length?r=e.substring(0,3):r+=e.charAt(0)})),r)):P.length>10&&!(null===L||void 0===L?void 0:L.mode)?"":r.split("").length>10?r.substring(0,10)+"...":r}};return Object(l.useEffect)((function(){var t,n,a;(Object.keys(e.filter).length>0&&C(Object(o.a)(Object(o.a)({},L),e.filter)),r.current&&Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0)&&F(Object(o.a)(Object(o.a)(Object(o.a)({},L),null===e||void 0===e||null===(n=e.dashboardConfig)||void 0===n?void 0:n.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}))}),[e.filter,e.dashboardConfig]),Object(l.useEffect)((function(){L.tags&&r.current&&(G.current=[],L.tags.forEach((function(e){G.current=[].concat(Object(n.a)(G.current),[e.label])}))),h.current={}}),[L]),Object(l.useEffect)((function(){var t={},i={},c=[];O.current=0;var l,s,u=(D.startDate?D:L).startDate?d()(1e3*(D.startDate?D:L).startDate):d()().startOf("year"),p=(D.startDate?D:L).endDate?d()(1e3*(D.startDate?D:L).endDate):d()().endOf("year"),f=(l=u.format("MMMM"),s=p.format("MMMM"),l===s),h=function(r,n,l,s){var u,p,h,m,g,b,v,y,x,w,_,j;O.current<5?O.current=O.current+1:O.current=0;var E=n.label,k=d()(r.date).clone(),S=r.date.clone().format("MMMM"),L=k.clone().startOf("month"),C=k.clone().endOf("month"),I=k.clone().startOf("week"),T=k.clone().endOf("week"),D=r.date.clone().week();!i.label&&f&&function(e,t){1;for(var r=e.startOf("month").week(),n=e.endOf("month").week(),c=r;c<=n;c++){var l;i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},t,Object(o.a)(Object(o.a)({},i[t]||{}),{},Object(a.a)({},c,(null===(l=i[t])||void 0===l?void 0:l[c])||0))))}}(r.date.clone(),E),t=Object(o.a)(Object(o.a)({},t),{},Object(a.a)({},E,Object(o.a)(Object(o.a)({},t[E]||{}),{},{id:E,color:(null===e||void 0===e||null===(u=e.dashboardConfig)||void 0===u?void 0:u.colorsArr)?W(null===e||void 0===e||null===(p=e.dashboardConfig)||void 0===p||null===(h=p.colorsArr[0])||void 0===h?void 0:h.color,E):(null===n||void 0===n?void 0:n.color)||H(E),label:E,value:((null===(m=t[E])||void 0===m?void 0:m.value)||0)+1})));var F=f?D:S;i=Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},E,Object(o.a)(Object(o.a)({},i[E]||{}),{},(j={value:((null===(g=i[E])||void 0===g?void 0:g.value)||0)+1,tag:n.value,label:window.location.hostname.indexOf("eneva")>-1?E.substring(3):E},Object(a.a)(j,l,Object(o.a)(Object(o.a)({},null===(b=i[E])||void 0===b?void 0:b[l]),{},Object(a.a)({},F,((null===(v=i[E])||void 0===v||null===(y=v[l])||void 0===y?void 0:y[F])||0)+1))),Object(a.a)(j,"color",W(null===e||void 0===e||null===(x=e.dashboardConfig)||void 0===x||null===(w=x.colorsArr[0])||void 0===w?void 0:w.color,E)),Object(a.a)(j,F,((null===(_=i[E])||void 0===_?void 0:_[F])||0)+1),Object(a.a)(j,"Period__"+F,f?{start:I.startOf("day").unix("X"),end:T.endOf("day").unix("X")}:{start:L.startOf("day").unix("X"),end:C.endOf("day").unix("X")}),j)))),c=Object(o.a)(Object(o.a)({},c),{},Object(a.a)({},E,{label:E,color:(null===n||void 0===n?void 0:n.color)||H(E)}))};if(e.planCards){R.current=[];var m=L.status?Object.keys(L.status).filter((function(e){return L.status[e]})):["completed"];if(Object.keys(e.planCards).filter((function(e){return!E.cards[e].deleted&&m.includes(E.cards[e].status)})).forEach((function(r,l){var s,f,m,g=!((null===L||void 0===L||null===(s=L.users)||void 0===s?void 0:s.length)>0);L.users&&Object.keys(null===(f=E.cards[r])||void 0===f?void 0:f._users).length>0&&Object.values(null===(m=E.cards[r])||void 0===m?void 0:m._users).forEach((function(e){L.users.forEach((function(t){e._id===t&&(g=!0)}))}));if(g){var b,v,y={date:E.cards[r].completed_at?d()(1e3*(null===(b=E.cards[r].completed_at)||void 0===b?void 0:b.low)):d()(1e3*E.cards[r].created_at),tags:E.cards[r]._tags};if(y.date.isBetween(u,p,null,"[]"))if((null===L||void 0===L||null===(v=L.tags)||void 0===v?void 0:v.length)>0||L.tagsByText)y.tags.filter((function(e){return L.tags&&L.tags.length>0&&e.label&&G.current.includes(e.label)||L.tagsByText&&e.label&&e.label.toLowerCase().indexOf(L.tagsByText.toLowerCase())>-1})).forEach((function(t){h(y,t,E.cards[r].status,Object.keys(e.planCards).length)})),R.current=Object.values(c);else{t=Object(o.a)(Object(o.a)({},t),{},Object(a.a)({},E.cards[r].status,Object(o.a)(Object(o.a)({},t.total||{}),{},{value:t&&t[E.cards[r].status]&&t[E.cards[r].status].value?t[E.cards[r].status].value+1:1,label:E.cards[r].status,color:E.status.filter((function(e){return e.value===E.cards[r].status}))[0].color,id:Object(x.w)("$__".concat(E.cards[r].status))}))),i={};var w={label:E.cards[r].status,color:E.status.filter((function(e){return e.value===E.cards[r].status}))[0].color};R.current.some((function(e){return e.label===w.label}))||(R.current=[].concat(Object(n.a)(R.current),[w]))}}})),P!==t&&r.current){var g=Object.values(t);(null===L||void 0===L?void 0:L.colorsArr)&&(g=g.map((function(e){var t=null===L||void 0===L?void 0:L.colorsArr.find((function(t){return t.label===e.label}));return t?Object(o.a)(Object(o.a)({},e),{},{color:t.color}):e}))),$(g),Y(i)}}}),[e.planCards,e.load,L,D]),s.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},s.a.createElement(v.a,{handleSetSelected:function(t){C(Object(o.a)(Object(o.a)({},L),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},L),t),{},{id:e.id}))},filterConfig:{filterItems:["date","users","tags","tagsByText","unit","status"]},tittle:Object(x.w)("$__"+e.tittle),icon:e.icon,styles:e.styles,datafilter:!0,indicators:L||null,handleModal:function(){e.handleDatagridTable()},table:!0,vertical:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){JSON.stringify(t)!==JSON.stringify(L)&&C(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},L),t),{},{id:e.id}))}}),s.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),s.a.createElement("div",{style:{}}),s.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},s.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},!e.load&&Array.isArray(P)?s.a.createElement(b.a,{data:P,colors:{datum:"data.color"},margin:{top:35,right:40,bottom:35,left:function(){if(null===L||void 0===L?void 0:L.mode){var e=0;return P.map((function(t){t&&(null===t||void 0===t?void 0:t.label)&&(null===t||void 0===t?void 0:t.label.split("").length)>e&&(e=t.label.split("").length)})),11*(e>10?10:e)}return 40}()},innerRadius:0,padAngle:1.7,cornerRadius:3,layout:(null===L||void 0===L?void 0:L.mode)?"horizontal":"vertical",activeOuterRadiusOffset:8,borderWidth:1,padding:1===P.length?.35:.1,tooltipFormat:function(e){return e},axisLeft:(null===L||void 0===L?void 0:L.mode)?{format:function(e){return U(e)}}:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},axisBottom:(null===L||void 0===L?void 0:L.mode)?{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}}:{format:function(e){return U(e)}},theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}}}):s.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},s.a.createElement("div",{style:{alignSelf:"center"}},"  ",s.a.createElement("div",{className:"loader"}))))),e.filter.table?s.a.createElement("div",{style:{maxHeight:"300px",overflow:"scroll"}},s.a.createElement(y.default,{data:Object.values(z),planCards:e.planCards,filterProps:L})):s.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},s.a.createElement(g.a,{legend:Object.keys(h.current).length>0?P.filter((function(e){return e.color&&e.label})).map((function(e,t){return{key:t,color:e.color,label:e.label}})):R.current.map((function(e,t){return{key:t,color:e.color,label:e.label}})),customColors:null===L||void 0===L?void 0:L.colorsArr})))}))},874:function(e,t,r){"use strict";var n=r(2),a=r(10),o=r(0),i=r.n(o),c=r(20),l=r(64),s=r(11),u=r(737),d=r(15),p=r(3),f=r(13),h=r(14),m=r(35),g=r(1),b=r(65);function v(){v=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=Object(h.b)((function(e){return{board:e.controls.board}}),(function(e){return Object(f.b)(d,e)}))((function(e){var t=p.a.getState(),r=t.db,o=t.session;i.a.useEffect((function(){d()}),[e.board]);var d=function(){var t=Object(a.a)(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(b.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 i.a.createElement(i.a.Fragment,null);var f=window.location.hash.split("/");f[0]=f[0].replace("#","");var h=r.cards[e.board],y=h._parent?r.cards[h._parent]:null,x=y&&y._parent!==f[0]&&r.cards[y._parent]&&r.cards[y._parent]._users&&r.cards[y._parent]._users[o._id]?r.cards[y._parent]:null;return i.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backdropFilter:"blur(3px)"}},i.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()}},i.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)"}},i.a.createElement("div",{style:{position:"relative",width:"100%",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(g.d)("ColumnTitleColor")}},i.a.createElement("div",{style:{fontSize:"14px",color:Object(g.d)("colorText"),display:"flex",justifyContent:"flex-start",alignItems:"center"}},x&&x._id&&i.a.createElement("div",{style:{marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center"}},i.a.createElement(l.a,{title:"".concat((null===x||void 0===x?void 0:x.name)||Object(g.w)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===x||void 0===x?void 0:x.icon)||x.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===x.type}))[0]&&r.dataType.filter((function(e){return e.name===x.type}))[0].icon||"$__topic",iconTitle:"$__".concat(x.type),color:Object(g.d)("colorText"),backClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(n.a)(Object(n.a)({},p.a.getState().control),{},{board:x._id}))}}),i.a.createElement("div",{style:{marginTop:-5}},i.a.createElement(s.a,{icon:"navigate_next",color:Object(g.d)("textColor")}))),i.a.createElement("div",null,i.a.createElement(l.a,{title:"".concat((null===h||void 0===h?void 0:h.name)||Object(g.w)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===h||void 0===h?void 0:h.icon)||h.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===h.type}))[0]&&r.dataType.filter((function(e){return e.name===h.type}))[0].icon||"$__topic",iconTitle:"$__".concat(h.type),color:Object(g.d)("textColor")}))),i.a.createElement("div",{style:{position:"absolute",right:5,top:5}},i.a.createElement(c.a,{id:"close_kanban",title:Object(g.w)("$__close","*"),color:Object(g.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(n.a)(Object(n.a)({},p.a.getState().control),{},{board:null}))},size:"25px",transparent:!0}))),i.a.createElement("div",{style:{position:"relative",padding:"9px",height:"calc(100% - 50px)"}},i.a.createElement(m.a,null,i.a.createElement(u.a,{nodeId:e.board}))))))}))},875:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(19),o=r(5),i=r(2),c=r(10),l=r(0),s=r.n(l),u=r(6),d=r.n(u),p=r(14),f=r(13),h=r(15),m=r(3),g=r(141),b=r(120),v=r(83),y=(r(156),r(542)),x=r(1),w=r(78);function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var y={};s(y,i,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,i)&&(y=w);var O=v.prototype=g.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(O,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,m):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),m},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),C(r),m}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(p.b)(null,(function(e){return Object(f.b)(h,e)}))((function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=Object(l.useRef)(!0);s.a.useEffect((function(){return u(),r.current=!0,function(){r.current=!1}}),[]);var u=function(){var r=Object(c.a)(_().mark((function r(){return _().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:Object(w.f)(Object(i.a)(Object(i.a)({},e),{},{fnIdentification:"Components/Dashboard/Widgers/TaskDoneBar/init()"}),{ids:[t[0]],db:"cards",type:"timer",reqChildrens:!0});case 1:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}(),p=m.a.getState().db,f=Object(l.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month",status:{all:!1,notStarted:!1,awaitAction:!1,paused:!1,inProgress:!1,completed:!0}}),h=Object(o.a)(f,2),O=h[0],j=h[1],E=Object(l.useState)({}),k=Object(o.a)(E,2),S=k[0],L=k[1],C=Object(l.useState)({total:{value:0,label:"completed",color:"#5A7F71",id:"completed"}}),I=Object(o.a)(C,2),T=I[0],D=I[1],F=Object(l.useState)({}),N=Object(o.a)(F,2),A=N[0],P=N[1],$=Object(l.useRef)([{label:"completed",color:"#5A7F71"}]),M=Object(l.useRef)([]),B=function(e){for(var t=0,r=0;r<e.length;r++)t+=e.charCodeAt(r);return"#"+(t%16777215+16777216).toString(16).slice(1,7)},z=function(e){if("string"===typeof e){var t=e.split(" "),r=e;return T.length>5&&T.length<10?(r="",t[0].startsWith("#")?(t.forEach((function(e,n){0!==n&&(2===t.length?r=e.substring(0,3):r+=e.charAt(0))})),t[0]+r):(t.forEach((function(e){1===t.length?r=e.substring(0,3):r+=e.charAt(0)})),r)):T.length>10&&!(null===O||void 0===O?void 0:O.mode)?"":r.split("").length>10?r.substring(0,10)+"...":r}};return console.log(O),console.log(e.dashboardConfig),Object(l.useEffect)((function(){var t,n,a;(Object.keys(e.filter).length>0&&(console.log("pass1"),j(Object(i.a)(Object(i.a)({},O),e.filter))),r.current&&Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0)&&L(Object(i.a)(Object(i.a)(Object(i.a)({},O),null===e||void 0===e||null===(n=e.dashboardConfig)||void 0===n?void 0:n.filter),{},{colorsArr:null===(a=e.dashboardConfig)||void 0===a?void 0:a.colorsArr}))}),[e.filter,e.dashboardConfig]),Object(l.useEffect)((function(){O.tags&&r.current&&(M.current=[],O.tags.forEach((function(e){M.current=[].concat(Object(a.a)(M.current),[e.label])})))}),[O]),console.log(S),Object(l.useEffect)((function(){var t,o,c={},l={},s=[],u=(S.startDate?S:O).startDate?d()(1e3*(S.startDate?S:O).startDate):d()().startOf("year"),f=(S.startDate?S:O).endDate?d()(1e3*(S.startDate?S:O).endDate):d()().endOf("year"),h=(t=u.format("MMMM"),o=f.format("MMMM"),t===o),m=function(e,t,r){var a,o,u,p,f,m,g,b=t.label,v=d()(e.date).clone(),y=e.date.clone().format("MMMM"),x=v.clone().startOf("month"),w=v.clone().endOf("month"),_=v.clone().startOf("week"),O=v.clone().endOf("week"),j=e.date.clone().week();!l.label&&h&&function(e,t){1;for(var r=e.startOf("month").week(),a=e.endOf("month").week(),o=r;o<=a;o++){var c;l=Object(i.a)(Object(i.a)({},l),{},Object(n.a)({},t,Object(i.a)(Object(i.a)({},l[t]||{}),{},Object(n.a)({},o,(null===(c=l[t])||void 0===c?void 0:c[o])||0))))}}(e.date.clone(),b),c=Object(i.a)(Object(i.a)({},c),{},Object(n.a)({},b,Object(i.a)(Object(i.a)({},c[b]||{}),{},{id:b,color:(null===t||void 0===t?void 0:t.color)||B(b),label:b,value:((null===(a=c[b])||void 0===a?void 0:a.value)||0)+1})));var E=h?j:y;l=Object(i.a)(Object(i.a)({},l),{},Object(n.a)({},b,Object(i.a)(Object(i.a)({},l[b]||{}),{},(g={value:((null===(o=l[b])||void 0===o?void 0:o.value)||0)+1,tag:t.value,label:b},Object(n.a)(g,r,Object(i.a)(Object(i.a)({},null===(u=l[b])||void 0===u?void 0:u[r]),{},Object(n.a)({},E,((null===(p=l[b])||void 0===p||null===(f=p[r])||void 0===f?void 0:f[E])||0)+1))),Object(n.a)(g,E,((null===(m=l[b])||void 0===m?void 0:m[E])||0)+1),Object(n.a)(g,"Period__"+E,h?{start:_.startOf("day").unix("X"),end:O.endOf("day").unix("X")}:{start:x.startOf("day").unix("X"),end:w.endOf("day").unix("X")}),g)))),s=Object(i.a)(Object(i.a)({},s),{},Object(n.a)({},b,{label:b,color:(null===t||void 0===t?void 0:t.color)||B(b)}))};if(e.planCards){$.current=[];var g=O.status?Object.keys(O.status).filter((function(e){return O.status[e]})):["completed"];if(Object.keys(e.planCards).filter((function(e){return!p.cards[e].deleted&&g.includes(p.cards[e].status)})).forEach((function(e){var t,r,o,h=!((null===O||void 0===O||null===(t=O.users)||void 0===t?void 0:t.length)>0);O.users&&Object.keys(null===(r=p.cards[e])||void 0===r?void 0:r._users).length>0&&Object.values(null===(o=p.cards[e])||void 0===o?void 0:o._users).forEach((function(e){O.users.forEach((function(t){e._id===t&&(h=!0)}))}));if(h){var g,b,v={date:p.cards[e].completed_at?d()(1e3*(null===(g=p.cards[e].completed_at)||void 0===g?void 0:g.low)):d()(1e3*p.cards[e].created_at),tags:p.cards[e]._tags};if(v.date.isBetween(u,f,null,"[]"))if((null===O||void 0===O||null===(b=O.tags)||void 0===b?void 0:b.length)>0||O.tagsByText)v.tags.filter((function(e){return O.tags&&O.tags.length>0&&e.label&&M.current.includes(e.label)||O.tagsByText&&e.label&&e.label.toLowerCase().indexOf(O.tagsByText.toLowerCase())>-1})).forEach((function(t){m(v,t,p.cards[e].status)})),$.current=Object.values(s);else{c=Object(i.a)(Object(i.a)({},c),{},Object(n.a)({},p.cards[e].status,Object(i.a)(Object(i.a)({},c.total||{}),{},{value:c&&c[p.cards[e].status]&&c[p.cards[e].status].value?c[p.cards[e].status].value+1:1,label:p.cards[e].status,color:p.status.filter((function(t){return t.value===p.cards[e].status}))[0].color,id:Object(x.w)("$__".concat(p.cards[e].status))}))),l={};var y={label:p.cards[e].status,color:p.status.filter((function(t){return t.value===p.cards[e].status}))[0].color};$.current.some((function(e){return e.label===y.label}))||($.current=[].concat(Object(a.a)($.current),[y]))}}})),T!==c&&r.current){var b=Object.values(c);(null===O||void 0===O?void 0:O.colorsArr)&&(b=b.map((function(e){var t=null===O||void 0===O?void 0:O.colorsArr.find((function(t){return t.label===e.label}));return t?Object(i.a)(Object(i.a)({},e),{},{color:t.color}):e}))),D(b),P(l)}}}),[e.planCards,e.load,O,S]),console.log(O),s.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},s.a.createElement(v.a,{handleSetSelected:function(t){j(Object(i.a)(Object(i.a)({},O),t)),e.handleSetFilter(Object(i.a)(Object(i.a)(Object(i.a)({},O),t),{},{id:e.id}))},filterConfig:{filterItems:["date","users","tags","tagsByText","unit","status"]},tittle:Object(x.w)("$__"+e.tittle),icon:e.icon,styles:e.styles,datafilter:!0,indicators:O||null,handleModal:function(){e.handleDatagridTable()},table:!0,vertical:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){JSON.stringify(t)!==JSON.stringify(O)&&j(Object(i.a)({},t)),e.handleSetFilter(Object(i.a)(Object(i.a)(Object(i.a)({},O),t),{},{id:e.id}))}}),s.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),s.a.createElement("div",{style:{}}),s.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},s.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},!e.load&&Array.isArray(T)?s.a.createElement(b.a,{data:T,colors:{datum:"data.color"},margin:{top:35,right:40,bottom:35,left:function(){if(null===O||void 0===O?void 0:O.mode){var e=0;return T.forEach((function(t){t&&(null===t||void 0===t?void 0:t.label)&&(null===t||void 0===t?void 0:t.label.split("").length)>e&&(e=t.label.split("").length)})),11*(e>10?10:e)}return 40}()},innerRadius:0,padAngle:1.7,cornerRadius:3,layout:(null===O||void 0===O?void 0:O.mode)?"horizontal":"vertical",activeOuterRadiusOffset:8,borderWidth:1,padding:1===T.length?.35:.1,tooltipFormat:function(e){return console.log(e),e},axisLeft:(null===O||void 0===O?void 0:O.mode)?{format:function(e){return z(e)}}:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},axisBottom:(null===O||void 0===O?void 0:O.mode)?{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}}:{format:function(e){return z(e)}},theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}}}):s.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},s.a.createElement("div",{style:{alignSelf:"center"}},"  ",s.a.createElement("div",{className:"loader"}))))),e.filter.table&&s.a.createElement("div",{style:{maxHeight:"300px",overflow:"scroll"}},s.a.createElement(y.default,{data:Object.values(A),planCards:e.planCards,filterProps:O})),s.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},s.a.createElement(g.a,{legend:Object(a.a)($.current.map((function(e,t){return{key:t,color:e.color,label:e.label}}))),customColors:null===O||void 0===O?void 0:O.colorsArr})))}))},876:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(19),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(141),u=r(196),d=r(83),p=(r(156),r(3)),f=r(6),h=r.n(f),m=r(1);t.default=function(e){var t=p.a.getState().db,r=Object(c.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month"}),f=Object(i.a)(r,2),g=f[0],b=f[1],v=Object(c.useState)({}),y=Object(i.a)(v,2),x=y[0],w=y[1],_=Object(c.useState)({total:{total:0,month:h()().startOf("month").format("MMMM")}}),O=Object(i.a)(_,2),j=O[0],E=O[1],k=Object(c.useRef)(["total"]),S=Object(c.useRef)([]),L=Object(c.useRef)([{label:"Concluidas",color:"#5A7F71"}]),C=Object(c.useRef)([]),I=window.location.hash.split("/");I[0]=I[0].replace("#","");var T=function(e){for(var t=0,r=0;r<e.length;r++)t+=e.charCodeAt(r);return"#"+(t%16777215+16777216).toString(16).slice(1,7)};return Object(c.useEffect)((function(){var t,r,n;(Object.keys(e.filter).length>0&&b(Object(o.a)(Object(o.a)({},g),e.filter)),Object.keys(null===e||void 0===e||null===(t=e.dashboardConfig)||void 0===t?void 0:t.filter).length>0)&&w(Object(o.a)(Object(o.a)(Object(o.a)({},g),null===e||void 0===e||null===(r=e.dashboardConfig)||void 0===r?void 0:r.filter),{},{colorsArr:null===(n=e.dashboardConfig)||void 0===n?void 0:n.colorsArr}))}),[e.filter,e.dashboardConfig]),Object(c.useEffect)((function(){g.tags&&(C.current=[],0===g.tags.length&&(k.current=[],S.current=[],L.current=[]),k.current=Object(a.a)(k.current.filter((function(e){return"total"!==e}))),g.tags.forEach((function(e){C.current=[].concat(Object(a.a)(C.current),[e.label])})))}),[g]),console.log(g),Object(c.useEffect)((function(){var r={},i=[],c=[],l=[];if(e.planCards){for(var s=0;s<12;s++){var u=h()().startOf("year").add(s,"month").format("MMMM");r=Object(o.a)(Object(o.a)({},r),{},Object(n.a)({},u,{}))}Object.keys(e.planCards).forEach((function(e){var s,u,d,p=!((null===g||void 0===g||null===(s=g.users)||void 0===s?void 0:s.length)>0);g.users&&Object.keys(null===(u=t.cards[e])||void 0===u?void 0:u._users).length>0&&Object.values(null===(d=t.cards[e])||void 0===d?void 0:d._users).forEach((function(e){g.users.forEach((function(t){e._id===t&&(p=!0)}))}));if(p){var f,b={date:h()(1e3*(null===(f=t.cards[e].completed_at)||void 0===f?void 0:f.low)),tags:t.cards[e]._tags},v=x.startDate?h.a.unix(x.startDate):g.startDate?g.startDate:h()().startOf("year"),y=x.endDate?h.a.unix(x.endDate):g.endDate?g.endDate:h()().endOf("year");if(console.log(v),console.log(y),b.date.isBetween(v,y)){var w,_=b.date.format("MMMM");r=Object(o.a)(Object(o.a)({},r),{},Object(n.a)({},_,Object(o.a)(Object(o.a)({},r[_]||{}),{},{total:r&&r[_]&&r[_].total?r[_].total+1:1,month:Object(m.w)("$__".concat(_))}))),(null===g||void 0===g||null===(w=g.tags)||void 0===w?void 0:w.length)>0||g.tagsByText?(b.tags.filter((function(e){return g.tags&&g.tags.length>0&&e.label&&C.current.includes(e.label)||g.tagsByText&&e.label&&e.label.toLowerCase().indexOf(g.tagsByText.toLowerCase())>-1})).forEach((function(e){!function(e,t){var s,u,d=e.date.format("MMMM"),p=t.label;r=Object(o.a)(Object(o.a)({},r),{},Object(n.a)({},d,Object(o.a)(Object(o.a)({},r[d]||{}),{},Object(n.a)({total:((null===(s=r[d])||void 0===s?void 0:s.total)||0)+1,month:e.date.format("MMMM")},p,((null===(u=r[d])||void 0===u?void 0:u[p])||0)+1)))),k.current.includes(p)||(i=i.filter((function(e){return"#5A7F71"!==e})),i=[].concat(Object(a.a)(i),[(null===t||void 0===t?void 0:t.color)||T(p)]),c=[].concat(Object(a.a)(c),[p]),l=l.filter((function(e){return"Concluidas"!==e.label})),l=[].concat(Object(a.a)(l),[{label:p,color:(null===t||void 0===t?void 0:t.color)||T(p)}]))}(b,e)})),k.current=c,S.current=i,L.current=l):(L.current=[{label:"completed",color:"#5A7F71"}],k.current=["total"],S.current=["#5A7F71"],g.colorsArr&&(L.current=g.colorsArr.filter((function(e){return"completed"===e.label})),S.current=g.colorsArr.map((function(e){return e.color}))))}}}));var d=Object.values(r).filter((function(e){return 0!==Object.keys(e).length}));E(d)}}),[e.planCards,e.load,g,x]),l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){b(Object(o.a)(Object(o.a)({},g),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},g),t),{},{id:e.id}))},tittle:Object(m.w)("$__"+e.tittle),icon:e.icon,styles:e.styles,filterConfig:{filterItems:["users","tags","tagsByText"]},datafilter:!0,indicators:g||null,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){b(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},g),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},e.load?l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}},"  ",l.a.createElement("div",{className:"loader"}))):l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},l.a.createElement(u.a,{data:j,keys:k.current,colors:S.current,indexBy:"month",margin:{top:40,right:20,bottom:30,left:40},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!1},enableLabel:!1,yScale:{max:100},minValue:0,theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}},fill:[{match:{id:"fries"},id:"dots"},{match:{id:"sandwich"},id:"lines"}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:32},axisLeft:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-40},role:"application"})," "))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(a.a)(L.current.map((function(e,t){return{key:t,color:e.color,label:e.label}})))})))}},879:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},880:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},881:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},882:function(e,t,r){var n=r(89);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(189)).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},883:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},96:function(e,t,r){"use strict";var n=r(5),a=r(0),o=r.n(a);t.a=function(e){var t=e.children,r=e.component,i=Object(a.useState)(!1),c=Object(n.a)(i,2),l=c[0],s=c[1],u=Object(a.useRef)(null);return Object(a.useEffect)((function(){if("TimeLine"===r)return o.a.createElement(o.a.Fragment,null);var e=u.current;if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e){var t=Object(n.a)(e,1)[0];s(t.isIntersecting)}),{threshold:.2});return u.current&&t.observe(u.current),function(){e&&t.unobserve(e)}}s(!0)}),[]),"TimeLine"===r?o.a.createElement("div",{style:{width:"100%",height:"100%"}},t(!0)):o.a.createElement("div",{style:{width:"100%",height:"100%"},ref:u},t(l))}},98:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(10),i=r(0),c=r.n(i),l=r(14),s=r(13),u=r(15),d=r(3),p=r(1926),f=r(38);function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",m="completed",g={};function b(){}function v(){}function y(){}var x={};s(x,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(x=_);var O=y.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(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&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:v,configurable:!0}),v.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.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}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,g):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),g},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),C(r),g}},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;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}t.a=Object(l.b)(null,(function(e){return Object(s.b)(u,e)}))((function(e){var t=function(){var t=Object(o.a)(h().mark((function t(r,i){var c,l,s;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=i,l=d.a.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,c.map(function(){var t=Object(o.a)(h().mark((function t(r,o){var i,s,u,p;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.value||!e.dbNode||0!==l.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length){t.next=7;break}return t.next=3,f.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)&&(s=i&&i.data&&i.data.id?i.data.id:i.data.value,0===l.filter((function(e){return e.value===s})).length&&(l.push({value:s,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},d.a.getState().db),{},Object(n.a)({},e.dbNode,l)))),0===c.filter((function(e){return e.value===s})).length&&(c.splice(o,1),c.push({value:s,label:r}))),t.next=8;break;case 7:l.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length>0&&(u=l.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label}))[0])&&0===c.filter((function(e){return e.value===u.value})).length&&(c.splice(o,1),c.push({value:u.value,label:u.label}));case 8:return p=[],c.forEach((function(e){e&&e.value&&p.push(e)})),c=Array.from(p),t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:s=t.sent,Promise.all(s).then((function(){e.onChange&&e.onChange(r,c)})),t.next=10;break;case 9:e.onChange&&e.onChange(r,c);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),r=Object(a.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,c.a.createElement(p.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))}))}},[[1274,1,2]]]);
//# sourceMappingURL=main.7618c2e7.chunk.js.map